安装Apache Httpd 2.4.9

来源:互联网 发布:时时彩网站源码php 编辑:程序博客网 时间:2024/06/14 18:25
   安装最新版的Httpd服务器,提前要做的准备,安装依赖包。
yum install gccyum install makeyum install openssl-develyum install pcre-devel


下载Httpd 2.4.9
http://httpd.apache.org/download.cgi
   下载Apr和Apr-util包
http://apr.apache.org/download.cgi
安装命令如下所示:
tar -xf httpd-2.4.9.tar.bz2cp apr* httpd-2.4.9/srclib/cd httpd-2.4.9/srclib/tar -xf apr-1.5.1.tar.bz2tar -xf apr-util-1.5.3.tar.bz2mv apr-1.5.1 aprmv apr-util-1.5.3 apr-utilcd ..# Configure, compile, and install:./configure \    --prefix=/usr/local/apache-2.4.9 \    --with-included-apr \    --enable-nonportable-atomics=yes \    --enable-so \    --enable-sslmake && make installcd /usr/local/ln -s apache-2.4.9 apache#-------------------开机启动服务-------------------cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpdvim /etc/rc.d/init.d/httpd#------------------edit the file like following----------#!/bin/sh##chkconfig: 2345  85  15#description: httpd service scripts#---------------------------------------------------------chkconfig --add httpd chkconfig httpd on# 配置httpd.conf文件vim /etc/local/apache/conf/httpd.conf#修改项ServerName ServerName 192.168.177.177:80#启动服务service httpd start


0 0
原创粉丝点击