-----------先使用rpm -qa查詢當下系統是否具有httpd包
-----------有?直接service httpd start開啟服務
-----------沒有?下載or上傳包,然后,rpm -ivh xxx 安裝
有
---------查詢看有沒有
[root@sink ~]# rpm -qa httpd
httpd-2.2.3-6.el5
--------有,系統已將安裝上了httpd,直接
[root@sink ~]# service httpd start
Starting httpd: httpd: Could not reliably determine the server's fully
qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
沒有
--------查詢看看有沒有
[root@sink ~]# rpm -qa httpd
...
---------------沒有,那么,首先創建上傳目錄,再rz上傳軟件包
[root@sink ~]# mkdir /soft
[root@sink ~]# ls /
bin dev etc lib lost+found misc net proc sbin soft sys tmp usr
boot dsk1 home lib64 media mnt opt root selinux srv tftpboot u01 var
[root@sink ~]# cd /soft/
[root@sink soft]# ls
...
[root@sink soft]#rz
---------cd到soft目錄下面,ls確定一下
[root@sink soft]# ls
httpd-2.2.3-6.el5.x86_64.rpm
---------find路徑
[root@sink ~]# find / -name '*httpd-2.2.3-6.el5*'
/soft/httpd-2.2.3-6.el5.x86_64.rpm
---------嗯,沒錯,那么rpm -ivh xxx 直接安裝
[root@sink soft]# rpm -ivh httpd-2.2.3-6.el5.x86_64.rpm
warning: httpd-2.2.3-6.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:httpd ########################################### [100%]
--------安裝好了,直接service httpd start就可以使用了
Starting httpd: httpd: Could not reliably determine the server's fully
qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
PS:httpd的軟件包就得自己網上下載了這里就不提供資源了