IT源码网

yum安装Apache2.4讲解

lxf 2019年12月26日 程序员 419 0

一、系统环境

系统版本为centos6.5最小化安装 
# cat /etc/centos-release  
CentOS release 6.5 (Final) 
查看系统自带yum库Apache版本 
# yum list httpd 
httpd.x86_64 2.2.15-69.el6.centos

 

二、下载安装Apache2.4 yum源

# cd /etc/yum.repos.d/ 
# wget http://repos.fedorapeople.org/repos/jkaluza/httpd24/epel-httpd24.repo 
查看Apache2.4软件包 
# yum list httpd24 
httpd24.x86_64 1-6.el6 epel-httpd24

 

三、安装Apache2.4

# yum install httpd24 httpd24-httpd-devel -y 
查看安装文件 
# rpm -ql httpd24-httpd 
默认安装路径为/opt/rh/httpd24/root 
添加配置文件链接 
# ln -s /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf /etc/httpd.conf 
添加二进制命令链接 
# ln -s /opt/rh/httpd24/root/usr/bin/* /usr/local/bin 
# ln -s /opt/rh/httpd24/root/usr/sbin/* /usr/local/sbin 
添加开机启动脚本 
# cp /etc/init.d/httpd24-httpd /etc/init.d/httpd 
# chkconfig httpd --level 35 on 
查看Apache版本 
# httpd -v 
Server version: Apache/2.4.6 (Red Hat) 
Server built: Sep 25 2013 05:25:46 
查看安装详细信息 
# httpd -V 
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message 
Server version: Apache/2.4.6 (Red Hat) 
Server built: Sep 25 2013 05:25:46 
Server's Module Magic Number: 20120211:23 
Server loaded: APR 1.4.8, APR-UTIL 1.5.2 
Compiled using: APR 1.4.8, APR-UTIL 1.5.2 
Architecture: 64-bit 
Server MPM: prefork 
threaded: no 
forked: yes (variable process count) 
Server compiled with.... 
-D APR_HAS_SENDFILE 
-D APR_HAS_MMAP 
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) 
-D APR_USE_SYSVSEM_SERIALIZE 
-D APR_USE_PTHREAD_SERIALIZE 
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT 
-D APR_HAS_OTHER_CHILD 
-D AP_HAVE_RELIABLE_PIPED_LOGS 
-D DYNAMIC_MODULE_LIMIT=256 
-D HTTPD_ROOT="/opt/rh/httpd24/root/etc/httpd" 
-D SUEXEC_BIN="/opt/rh/httpd24/root/usr/sbin/suexec" 
-D DEFAULT_PIDLOG="/opt/rh/httpd24/root/var/run/httpd/httpd.pid" 
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status" 
-D DEFAULT_ERRORLOG="logs/error_log" 
-D AP_TYPES_CONFIG_FILE="conf/mime.types" 
-D SERVER_CONFIG_FILE="conf/httpd.conf"

 

发布评论
IT源码网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!

Bitbucket - 用git 用法讲解
你是第一个吃螃蟹的人
发表评论

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。