赞
踩
想要启动apache(httpd)服务,执行以下命令都不行↓
service httpd start (sentos7之前版本的命令)
systemctl start httpd命令(sentos7之后版本的命令)
/etc/init.d/httpd start
出现以下结果,如图:
1.使用命令yum install httpd httpd-devel 安装完apache
yum install httpd httpd-devel
2. 然后等待,会出现需要确认下载项 y/d/n 输入y,Enter即可
3.等待安装完成之后,可使用命令启动apache
4.可通过命令 service httpd status查看apache运行状态
service httpd status(cemtos6)
systemctl status httpd(centos7)
5.也可以在虚拟机的浏览器中查看apache的页面,如果装成功了能访问到的页面如图,用120.0.1或者是通过ip访问
6.查看ip的命令是ifconfig
ifconfig
扩展:
systemctl start httpd.service #启动
systemctl stop httpd.service #停止
systemctl restart httpd.service #重启
systemctl enable httpd.service #开机自启
systemctl disable httpd.service #开机不启动
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。