一、 安装apache
1.切换光盘为linux.iso
2.挂载光盘
mount /dev/cdrom /mnt/
3.解压http压缩包
tar -zxvf /mnt/httpd-2.2.17.tar.gz -C /usr/src/
4.进入http目录配置http
./configure --prefix=/usr/local/httpd --enable-cgi --enable-so --enable-rewrite --enable-charset-lite
5.进行编译和安装
make && make install
6.优化apache命令
ln -s /usr/local/httpd/bin/* /usr/local/bin/
7.生成服务控制文件并添加执行权限
cp /usr/local/httpd/bin/apachectl /etc/init.d/httpd
chmod +x /etc/init.d/httpd
8.修改服务控制文件设置进程
vim /etc/init.d/httpd
#chkconfig:35 21 80
#Description:Apache Server
9.添加系统服务设置开机启动
chkconfig --add httpd