首先安裝SUN ONE web server ,解壓縮sun-webserver61-rh72.tar.gz這個軟體包,到一個目錄里,例如sun,然後運行安裝程序
cd /sun tar -zxf sun-webserver61-rh72.tar.gz ./setup
以root進行安裝
過程如下,基本安默認安裝就行
Would you like to continue with installation? [Yes]: 回車 Do you agree to the license terms? [No]:yes
Choose an installation type:
1. Express installation Allows you to quickly install the servers using the most common options and pre-defined defaults. Useful for quick evaluation of the products.
2. Typical installation Allows you to specify common defaults and options.
3. Custom installation Allows you to specify more advanced options. This is recommended for experienced server administrators only.
To accept the default shown in brackets, press the Enter key.
Choose an installation type [2]: 回車(建議安典型安裝)
Install location [/opt/SUNWwbsvr]:回車(默認安裝目錄) Sun ONE Web Server components:
Components with a number in () contain additional subcomponents which you can select using subsequent screens.
1. Sun ONE Web Server, Enterprise Edition (2)
Specify the components you wish to install [All]:回車(安裝Sun ONE Web Server, Enterprise Edition)
Components with a number in () contain additional subcomponents which you can select using subsequent screens.
1. Server Core 2. Java Development Kit
Specify the components you wish to install [1, 2]: 回車(安裝代碼和開發包)
To accept the default shown in brackets, press the Enter key.
Computer name [lee.(none)]:回車(設置域名,默認主機名)
System User [nobody]:回車(設置啟動這個服務的用戶) System Group [nobody]:回車(設置啟動這個服務的用戶組) Run Web Server Administration Server as [root]:回車(運行管理服務的用戶) Web Server Admin Server User Name [admin]:回車(web管理員用戶名) Web Server Admin Server Password:(密碼) Web Server Admin Server Password (again):(確認密碼) Web Server Admin Server Port [8888]:回車(web管理的埠) Web Server Port [80]:回車(運行web服務的埠一般是80,因為我的伺服器裝了apache,所以改成了88) Web Server Content Root [/opt/SUNWwbsvr/docs]:回車(網頁根目錄) Web Server Start On Boot [yes]:回車(引導時啟動) 然後會拷貝安裝文件,一切順利,就會安裝完畢。
因為sun one web server本身支持jsp,所以不用配置。 下面介紹如何,配置cgi和php
首先配置CGI
cd /opt/SUNWwbsvr/https-lee/config 進入虛擬伺服器的配置目錄 vi obj.conf 打開配置文件,並加入如下內容 在