Linux搭建基於Apache的HTTP服務器
實驗目標:
通過本實驗掌握基於Linux的WWW服務器搭建。
實驗步驟:
1、安裝http服務
2、防火牆放通http服務
3、編輯測試網頁
4、開啟http服務,瀏覽測試
參考命令:
1、安裝http
Apache(阿帕奇)是Linux平台的http軟件
[root@server dhcp]# yum install httpd -y
已安裝則對比軟件倉庫中的版本,如果版本相同則提示nothing to do
2、防火牆放通http服務
permanent 為添加一條永久規則,重啟依然生效
reload 為重啟防火牆
3、編輯測試網頁
Apache默認存放首頁的位置為/var/www/html
4、開啟httpd服務,並瀏覽測試
服務器端
[root@server html]# systemctl enable httpd
[root@server html]# systemctl start httpd
客戶機端