Visit http://httpd.apache.org/
點擊 Downloads > from a mirror
Click Downloads > from a mirror
點擊 2.2.15 後下載 httpd-2.2.15.tar.gz (暫時儲存至 Desktop 位置方便尋找)
(2.2.15 是 2010-03-16 最新版本)
Click 2.2.15 and download httpd-2.2.15.tar.gz (Save at Desktop for easy find)
(2.2.15 is the latest version on 2010-03-16)
下載 .tar.gz 檔案後開啟 Terminal
輸入以下指令
After download the .tar.gz file then open the Terminal
Enter the command below
1 | cd "/home/abc/Desktop" |
abc is the user login name
1 | tar -zxvf "./httpd-2.2.15.tar.gz" |
Unzip the .tar.gz
1 | cd "./httpd-2.2.15" |
change directory to httpd directory
1 | "./configure" --prefix= "/usr/local/apache" |
setup the config file (unless prefix there are other options but we install the general settings)
1 | make |
Compile the file
1 | sudo make install |
進行安裝
You need to enter the password when you use sudo
Begin to install
以上三句指令都需時間處理
The above 3 commands need more time to deal
處理後
After the process
1 | sudo gedit "/usr/local/apache/conf/httpd.conf" |
ServerName 127.0.0.1:80
(若不是使用 port 80 是可以更改的)
Open gedit and search #ServerName www.example.com:80
and type ServerName 127.0.0.1:80 at the next line
(If you don't use port 80 you can change it)
1 | sudo /usr/local/apache/bin/apachectl start |
Start the Apache HTTP Server
有需要的話可以輸入以下指令
If you need you can enter this command
1 | sudo cp "/usr/local/apache/bin/apachectl" "/etc/init.d/httpd" |
This can be through
1 | sudo service httpd start |
Start the Apache HTTP Server and don't need to type a long path
(將 start 改為 stop 則是終止運作)
(change start to stop to stop the server)
開啟任何瀏覽器並於網址列輸入 http://127.0.0.1:80/
若能夠顯示 It works! 表示設定完成 Apache HTTP Server 可以運作
若不能夠願顯示則未設定好完成請重新確認設定資料,有需要時由頭重新設定
Open any Web Browser and type http://127.0.0.1:80/ in URL bar
If shows It works! that means the Apache HTTP Server is running
If can't, check the config file, or you need to re-install the Server
沒有留言 :
張貼留言