CentOS 7

CentOS7下的各种应用


Apache之httpd服务安装

<p>在 <code>yum install -y httpd</code>后,启动<code>systemctl start httpd</code>服务后,查看<code>system status httpd</code>日志如下:</p> <pre><code class="language-bash">Nov 28 09:17:07 itdb_server.localdomain systemd[1]: Starting The Apache HTTP Server... Nov 28 09:17:07 itdb_server.localdomain httpd[17578]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using itdb_server.localdomain. Set the 'ServerName' directive globally to suppress this message Nov 28 09:17:07 itdb_server.localdomain systemd[1]: Started The Apache HTTP Server. Nov 28 09:39:07 itdb_server.localdomain systemd[1]: Stopping The Apache HTTP Server... Nov 28 09:39:08 itdb_server.localdomain systemd[1]: Stopped The Apache HTTP Server. Hint: Some lines were ellipsized, use -l to show in full.</code></pre> <p>其中有报错信息如下:</p> <pre><code class="language-bash">Nov 28 09:17:07 itdb_server.localdomain httpd[17578]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using itdb_server.localdomain. Set the 'ServerName' directive globally to suppress this message</code></pre> <p>解决办法: 1)进入apache的安装目录:(视个人安装情况而不同) <code>[root@itdb_server conf]# cd /etc/httpd/conf</code> 2)编辑httpd.conf文件,搜索&quot;#ServerName&quot;,没有就添加ServerName localhost 说明:CentOS7中的httpd.conf文件跟其它Linux系统稍微有点区别 <code>ServerName itdb_server.localdomain</code> 3)重启apache服务 <code>systemctl restart httpd</code></p>

页面列表

ITEM_HTML