centos7.2安装apache

    centos7.2安装apache比较简单,直接上代码

    1.安装

yum install httpd

    2.启动apache

systemctl start httpd.service

    3.查看apache进程

ps -ef | grep httpd

   

    发现进程已开启后在浏览器中访问你的主页

centos7.2安装apache_第1张图片

    出现该内容则证明安装成功

    其它相关命令:

systemctl stop httpd.service //停止
systemctl restart httpd.service //重启
systemctl enable httpd.service //设置apache开机启动

    此时apache的默认安装路径:

/etc/httpd/conf/httpd.conf    //apache配置文件
/usr/sbin/apachectl     //Apache模块路径
/var/www/html     //web目录


你可能感兴趣的:(centos7.2安装apache)