Centos7.1心得

主机为金山云centos7.1

一.安装图形化界面

查看系统自带可用源

yum grouplist  

安装图形界面

yum groupinstall "Server with GUI"

查看默认运行级别

systemctl get-default

设置默认运行级别为图形化

systemctl set-default graphical.target


二.编译安装apache

查看是否安装 APR   APR-util

rpm -qa | grep apr          查看当前主机上是否安装apr/apr-util,这个库为apache提供跨平台的支持

rpm -ql apr    查看具体位置

下载需要的源文件  (没安装的话就需下载编译库)

  httpd-2.4.27.tar.gz  http://mirrors.hust.edu.cn/apache//httpd/httpd-2.4.27.tar.gz

  apr-1.6.2.tar.gz   http://mirrors.hust.edu.cn/apache//apr/apr-1.6.2.tar.gz

  apr-util-1.6.0.tar.gz  http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-util-1.6.0.tar.gz


解压 apr   apr-util   拷贝到     httpd的srclib中    不能有版本名   

./configure --prefix=/usr/local/apache2 --with-include-apr --with-include-apr-util --enable-so --enable-ssl --enable-cgi --enable-rewrite --enable-zlib --enable-module=most --enable-mpms-shared=all --with-mpm=event


make && make install


配置httpd

cp /usr/local/apache2/bin/apachectl  /etc/rc.d/init.d/

mv /etc/rc.d/init.d/apachectl /etc/rc.d/init.d/httpd

chkconfig --add httpd  #所有开机模式下自启动

chkconfig httpd on  #345开机模式下自启动





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值