apache安装

1、 apache的安装
[root@localhost ~]# rpm -e httpd --nodeps
[root@localhost ~]# rpm -e mysql –nodeps
[root@localhost ~]# rpm -e php –nodeps
[root@localhost ~]#yum   -y install *gcc*
[root@localhost Apahce]# tar -zxvf httpd-2.2.21.tar.gz -C /usr/src/
[root@localhost Apahce]# cd /usr/src/httpd-2.2.21/
[root@localhost httpd-2.2.21]# ./configure --prefix=/usr/local/apache2  
                                        --enable-rewrite 
                                          --enable-so 
                                           --enable-cgi 
                                          --enable-auth-digest
[root@localhost httpd-2.2.21]# make && make install
[root@localhost /]# vim /usr/local/apache2/bin/apachectl
          添加下面这句话
#!/bin/sh  
# chkconfig: 35 85 15 
# description: Apache   Server

[root@localhost httpd-2.2.21]# cp /usr/local/apache2/bin/apachectl    /etc/init.d/apache
[root@localhost httpd-2.2.21]# chkconfig --add apache
[root@localhost httpd-2.2.21]# chkconfig apache on
[root@localhost httpd-2.2.21]# service apache start

你可能感兴趣的:(职场,local,休闲)