在Linux下安装、启动、配置Apache |
您所在的位置:网站首页 › 启动oracle服务器的命令是 › 在Linux下安装、启动、配置Apache |
Tip:建议使用root账户登录Linux系统 第一步:安装Apache使用yum安装Apache yum install httpd –y 第二步:启动Apache服务 systemctrl start httpd 第三步:解决报错信息(若为出现,请跳过此步骤)若出现“Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "jour”报错信息。可参考以下解决办法: 1、使用systemctl status httpd.service命令查看Apache HTTP 服务器的当前状态 说明: systemctl status httpd.service是用于显示名称为 httpd.service 的系统服务的当前状态。在默认情况下,httpd.service 常用指示代 Apache HTTP 服务器。 2、修改/etc/httpd/conf/httpd.conf文件:将httpd.conf的最后一行(也就是第353行)注释掉(使用#注释) 3、再次启动Apache服务即可。 第四步:检查Apache服务的运行状态 systemctl status httpd.service若出现以下信息,说明启动成功: 说明:在该信息中,httpd.service的状态为“active (running)”,主进程ID为3570,服务启动自2023-05-07 10:02:11,公共处理已有0个请求等信息。 第五步:使用浏览器测试Apache服务在Linux中打开浏览器:在地址栏输入http://127.0.0.0或者http://localhost 若出现index of,说明Apache服务已经启动,但是没有找到index.html文件(默认的主页文件) 解决方法:查看配置文件httpd.conf(通常在/etc/httpd/conf目录下)中的DocumentRoot的配置项 找到该目录/var/www/html,并在该目录下创建index.html网页文件,编写index.html文件并保存后,再次刷新浏览器即可正常显示网页内容 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |