apache服务器安装配置启停[CentOS]

时间:2022-09-19 17:31:28

老生长谈,只是为记录下,基本命令,以备后便忘了,可以看看。

系统:CentOS

apache-httpd版本:2.2


查看httpd(网络情况):yum search httpd

安装httpd:yum install httpd

配置:查看配置:vim /etc/httpd/conf/httpd.conf

            将静态资源放置的目录:/var/www/html/   (默认)

启动:/etc/init.d/httpd start

停止:/etc/init.d/httpd stop

测试:访问外网 默认80端口 即可访问到apache页面


附加命令:

cat /etc/issue 查看服务器版本