Loading....

HEAD

  • 有一种精神,叫"公诚勤朴"

挣点外快

Linux+Apache+MySQL+PHP 安装配置(二)—— Apache安装
作者: 时间: 2009-06-07 12:35:51

Info

Name Version Home URL(Download HOme) Install Path Remark
Apache 2.2.11 http://httpd.apache.org/download.cgi /usr/local/apache  

Install

[root@wzhu ~]# groupadd apache
[root@wzhu ~]# useradd -g apache -m -d /usr/local/apache -r apache
[root@wzhu ~]# tar zxf httpd-2.2.11.tar.gz
[root@wzhu ~]# cd httpd-2.2.11
[root@wzhu httpd-2.2.11]# ./configure \
>                         --prefix=/usr/local/apache \
>                         --enable-modules=all \
>                         --enable-mods-shared=all \
>                         --enable-so \
>                         --with-included-apr \
>                         --with-apr \
>                         --with-apr-util \
>                         --with-ssl \
>                         --with-z

[root@wzhu mysql-5.1.35]# make
[root@wzhu mysql-5.1.35]# make install
[root@wzhu httpd-2.2.11]# cd /usr/local/apache
[root@wzhu apache]# chmod -R 755 .
[root@wzhu apache]# chown -R root.apache .
[root@wzhu apache]# chown -R apache.apache htdocs/
[root@wzhu apache]# vi conf/httpd.conf

Config httpd.conf

<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User apache
Group apache


</IfModule>
</IfModule>

Start apache server

[root@wzhu apache]# /usr/local/apache/bin/apachectl -k start
相关评论
发表评论
姓名:
图码: