本篇內(nèi)容主要講解“Linux服務(wù)器安裝apache的過程”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實用性強。下面就讓小編來帶大家學(xué)習(xí)“Linux服務(wù)器安裝apache的過程”吧!

10余年的南沙網(wǎng)站建設(shè)經(jīng)驗,針對設(shè)計、前端、開發(fā)、售后、文案、推廣等六對一服務(wù),響應(yīng)快,48小時及時工作處理。
全網(wǎng)營銷推廣的優(yōu)勢是能夠根據(jù)用戶設(shè)備顯示端的尺寸不同,自動調(diào)整南沙建站的顯示方式,使網(wǎng)站能夠適用不同顯示終端,在瀏覽器中調(diào)整網(wǎng)站的寬度,無論在任何一種瀏覽器上瀏覽網(wǎng)站,都能展現(xiàn)優(yōu)雅布局與設(shè)計,從而大程度地提升瀏覽體驗。
創(chuàng)新互聯(lián)建站從事“
南沙網(wǎng)站設(shè)計”,“
南沙網(wǎng)站推廣”以來,每個客戶項目都認(rèn)真落實執(zhí)行。
Apache安裝
1、安裝Apache,使用命令“yum install httpd -y
”
[root@localhost ~]# yum install httpd -y
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
base | 4.0 kB 00:00 ...
Setting up Install Process
|
2、啟動apache
[root@localhost ~]# service httpd start
正在啟動 httpd : httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
[ 確定 ]
[root@localhost ~]#
|
3、設(shè)置apache開機自啟
[root@localhost ~]# chkconfig --level 5 httpd on
[root@localhost ~]# chkconfig --list httpd
httpd 0: 關(guān)閉 1: 關(guān)閉 2: 關(guān)閉 3: 關(guān)閉 4: 關(guān)閉 5: 啟用 6: 關(guān)閉
[root@localhost ~]#
|
4、修改防火墻
想要其他機器訪問到該主機的apache,要么關(guān)閉防火墻,要么就修改防火墻的配置
1)關(guān)閉防火墻,
在終端輸入setup命令
[root@localhost ~]# setup
|
彈出窗口,選擇防火墻

彈出窗口,用空格關(guān)閉防火墻,保存退出(有*是啟動)

2)修改防火墻配置,
在終端輸入命令“setup”,在彈出的框中選擇“防火墻”,接著選擇“定制”

使用空格鍵選中“http“、”https“,接著選擇“轉(zhuǎn)發(fā)”
選擇“添加“
添加端口80,協(xié)議tcp,然后確定

回到最初的界面,“確定”

重啟防火墻
[root@localhost ~]# service iptables restart
iptables :將鏈設(shè)置為政策 ACCEPT : filter nat [ 確定 ]
iptables :清除防火墻規(guī)則: [ 確定 ]
iptables :正在卸載模塊: [ 確定 ]
iptables :應(yīng)用防火墻規(guī)則: [ 確定 ]
[root@localhost ~]#
|
重啟apache
[root@localhost ~]# service httpd restart
停止 httpd : [ 確定 ]
正在啟動 httpd : httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
[ 確定 ]
[root@localhost ~]#
|
5、測試,在其他局域網(wǎng)電腦輸入本機的ip地址,看到如下界面代表apache安裝成功

到此,相信大家對“Linux服務(wù)器安裝apache的過程”有了更深的了解,不妨來實際操作一番吧!這里是創(chuàng)新互聯(lián)網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢,關(guān)注我們,繼續(xù)學(xué)習(xí)!
本文標(biāo)題:Linux服務(wù)器安裝apache的過程-創(chuàng)新互聯(lián)
網(wǎng)頁網(wǎng)址:
http://fisionsoft.com.cn/article/dsgigs.html