雲服務器操作系統:CentOS 6.2 64位
客戶端操作環境:Mac OSX Teminal
操作步驟:
1. 運行 Terminal,輸入命令 ssh username@ip,然后輸入密碼。
2. 安裝 Apache 軟件:yum install httpd
3. 設置 Apache 在服務器啟動時運行:chkconfig --levels 235 httpd on
4. 在 Apache 配置文件中配置域名:vi /etc/httpd/conf/httpd.conf,找到 ServerName ,添加“域名:80”,保存並退出。
5. 重啟 Apache:service httpd restart
6. 瀏覽器中訪問第4步配置的域名,如果出現“Apache 2 Test Page powered by CentOS”的頁面,說明配置成功。