CentOS7.0安装Apache服务器httpd

转自:http://blog.csdn.net/clementad/article/details/41620631


Apache在Linux系统中,其实叫“httpd”,可以使用yum来安装。

1、查看httpd包是否可用:
# yum list | grep httpd

2、安装Apache
# yum install httpd
3、配置ServerName
# vi /etc/httpd/conf/httpd.conf
如果没有域名,则:ServerName localhost:80

启动
# httpd
停止
# httpd -k stop
设置开机自动启动:
chkconfig httpd on
安装目录介绍
Apache默认将网站的根目录指向/var/www/html 目录
默认的主配置文件是/etc/httpd/conf/httpd.conf
配置存储在的/etc/httpd/conf.d/目录

相关文章

linux下开机自启: 在/etc/init.d目录下新建文件elasticsear...
1、因为在centos7中/etc/rc.d/rc.local的权限被降低了,所以...
最简单的查看方法可以使用ls -ll、ls-lh命令进行查看,当使用...
ASP.NET Core应用程序发布linux在shell中运行是正常的。可一...
设置时区(CentOS 7) 先执行命令timedatectl status|grep &...
vim /etc/sysconfig/network-scripts/ifcfg-eth0 B...