1.通常情況下開(kāi)發(fā)的web系統(tǒng)在apache + tomcat Linux環(huán)境中測(cè)試,,使用客戶端操作工具:SSH Secure Shell 首先是安裝:SSHSecureShellClient-3.2.9.exe 安裝完成后,,打開(kāi)Secure Shell Client -> Quick Connect Host Name: 192.168.0.23 User Name: root Port 22 Authentication <Profile Settings> 默認(rèn)值 Connect -> Enter your Password -> OK 命令行界面定位到:[root@localhost root]# 同理打開(kāi):Secure File Transfer Client,用于文件傳輸,。
2.目錄結(jié)構(gòu)(圖形界面)
- /
- ...
- usr
- apache2
- ...
- conf
- ...
- httpd.conf
- bin
- ...
- apachectl
- tomcat5
- ...
- conf
- ...
- server.xml
- bin
- ...
- shutdown.sh
- startup.sh
- webapps
- ...
- eWebEditor
3.命令界面 cd /usr/tomcat5/bin 轉(zhuǎn)入到tomcat5 bin文件夾 ./shutdown.sh 關(guān)閉tomcat服務(wù) ./startup.sh 啟動(dòng)tomcat服務(wù) cd /usr/apache2/bin 轉(zhuǎn)入到apache2 bin文件夾 ./apachectl start|stop|restart|graceful 啟動(dòng)|關(guān)閉|重啟|優(yōu)化apache服務(wù) ls 查看目錄文件命令 move 文件夾 .. 移動(dòng)文件夾到上一目錄 rm -rf eWebEditor/ 刪除文件夾eWebEditor ps -ef|grep java 查看tomcat啟動(dòng)進(jìn)程信息,進(jìn)程ID kill -9 進(jìn)程ID 強(qiáng)制關(guān)閉tomcat服務(wù)進(jìn)程 緩存清理 /usr/tomcat5/work/Catalina/eWebEditor 直接刪掉eWebEditor文件夾清理緩存 4.配置文件 1./usr/tomcat5/conf 修改server.xml 增加一個(gè)Host節(jié)點(diǎn) 如下:
- <Host name="eWebEditor."
- debug="0"
- appBase=""
- unpackWARs="true"
- autoDeploy="true">
- <Context path=""
- docBase="/usr/webapps/eWebEditor/"
- debug="0"
- privileged="true"
- reloadable="true"/>
- </Host>
2./usr/apache2/conf 修改httpd.conf 增加一個(gè)VirtualHost節(jié)點(diǎn) 如下:
- <VirtualHost *>
- <LocationMatch "/WEB-INF/">
- AllowOverride None
- deny from all
- </LocationMatch>
-
- <LocationMatch "/META-INF/">
- AllowOverride None
- deny from all
- </LocationMatch>
-
- RewriteEngine on
- RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
- Rewriterule .* - [F]
-
- ServerAdmin [email protected]
- DocumentRoot /usr/webapps/eWebEditor/
- ServerName eWebEditor.
- ErrorLog logs/eWebEditor.-error_log
- CustomLog "|/usr/local/sbin/cronolog /usr/logs/apache_logs/eWebEditor._access_log.%Y%m%d" combined
- </VirtualHost>
5.本地hosts配置:C:\WINDOWS\system32\drivers\etc\hosts 192.168.0.23 eWebEditor.
6.拼是否成功:開(kāi)始->運(yùn)行->cmd ping eWebEditor. #查看域名對(duì)應(yīng)的IP地址:是內(nèi)網(wǎng)還是外網(wǎng)的方法或是否連接成功,。
7.最后在瀏覽器中輸入:http://ewebeditor./ 請(qǐng)求頁(yè)面,查看頁(yè)面顯示效果,。
備注:eWebEditor或eWebEditor.或紅色字體部分為變量,,在實(shí)際使用過(guò)程中修改過(guò)來(lái),本文以eWebEditor工程為例,。
|