当前位置:   article > 正文

linux apache yum安装,linux下yum、编译安装配置apache服务

linux操作系统配置yum仓库安装apache服务器,创建个人主页(每题6分,共30分)1、

yum安装apache服务

yum -y install httpd*

service httpd start#启动apache服务

service httpd stop#关闭apache服务

service httpd restart#重启apache服务

service httpd reload#重新加载

service httpd status#查看状态

chkconfig httpd on#设置开机启动

chkconfig httpd on#设置开机不启动

chkconfig httpd --level 35 on#设置在3、5上开机启动

修改selinux的状态

vi /etc/selinux/config

SELINUX=disabled

编译安装apache

1、yum install ntp vim-enhanced gcc gcc-c++ gcc-g77 flex bison autoconf bzip2-devel ncurses-devel openssl-devel libtool* \

zlib-devel libxml2-devel libjpeg-devel libpng-devel libtiff-devel fontconfig-devel freetype-devel libXpm-devel \

gettext-devel curl-devel curl pam-devel e2fsprogs-devel krb5-devel libidn libidn-devel -y

2、apr-1.4.2.tar.gz的安装

# tar -zxvf apr-1.4.2.tar.gz

# cd apr-1.4.2.tar.gz

# ./configure  --prefix=/usr/local/apr

# make  && make install

3、apr-util-1.3.10.tar.gz的安装

# tar -zxvf apr-util-1.3.10.tar.gz

# cd apr-util-1.3.10.tar.gz

# ./configure \

--prefix=/usr/local/apr-util \

--with-apr=/usr/local/apr

# make && make install

4、# tar -zxvf pcre-8.10.tar.gz

# cd pcre-8.10

# ./configure --prefix=/usr/local/pcre

# make && make install

5、tar xvf tar xvf httpd-2.4.2.tar.gz

./configure \

--prefix=/usr/local/apache \

--with-apr-util=/usr/local/apr-util/ \

--with-pcre=/usr/local/pcre/

make && make install

6、/usr/local/apache/bin/apachectl start

/usr/local/apache/conf/httpd.conf

DocumentRoot "/usr/local/apache//htdocs"

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/669116
推荐阅读
相关标签
  

闽ICP备14008679号