码迷,mamicode.com
首页 > 其他好文 > 详细

centos7 install httpd

时间:2014-07-29 15:58:49      阅读:367      评论:0      收藏:0      [点我收藏+]

标签:centos httpd

[1]Install Httpd for Centos7-media

# yum --enablerepo=centos7-media -y install httpd
Installed:
  httpd.x86_64 0:2.4.6-18.el7.centos

[2]start httpd,开机启动

# systemctl start httpd.service
# systemctl enable httpd.service
ln -s ‘/usr/lib/systemd/system/httpd.service‘ ‘/etc/systemd/system/multi-user.target.wants/httpd.service‘

[3]Test Access httpd

http://$ip/

bubuko.com,布布扣[4]configure httpd server

# rm -f /etc/httpd/conf.d/welcome.conf     #删除默认欢迎界面
# vi /etc/httpd/conf/httpd.conf
86 ServerAdmin linux_zcy@163.com
95 ServerName mariadb.carso.cn:80
151     AllowOverride All
164     DirectoryIndex index.html index.cgi index.php
配置文件最后添加:
ServerTokens Prod    # 禁止显示或发送Apache版本号
KeepAlive On
# systemctl restart httpd.service
# vi /var/www/html/index.html
<html>
<body>
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">
Welcom to Carson Space!
</div>
</body>
</html>

[5]访问测试

Welcom to Carson Space!

本文出自 “西伯利亚·狼” 博客,请务必保留此出处http://kernal.blog.51cto.com/8136890/1531545

centos7 install httpd,布布扣,bubuko.com

centos7 install httpd

标签:centos httpd

原文地址:http://kernal.blog.51cto.com/8136890/1531545

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!