jasmine214--love

          只有當(dāng)你的內(nèi)心總是充滿快樂、美好的愿望和寧靜時(shí),你才能擁有強(qiáng)壯的體魄和明朗、快樂或者寧靜的面容。
          posts - 731, comments - 60, trackbacks - 0, articles - 0

          SSH Secure Shell的web方面的使用

          Posted on 2010-10-20 16:14 幻海藍(lán)夢 閱讀(896) 評論(0)  編輯  收藏 所屬分類: Linux版本管理

          1.通常情況下開發(fā)的web系統(tǒng)在apache + tomcat Linux環(huán)境中測試,使用客戶端操作工具:SSH Secure Shell
          首先是安裝:SSHSecureShellClient-3.2.9.exe
          安裝完成后,打開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]#
          同理打開:Secure File Transfer Client,用于文件傳輸。

           

          2.目錄結(jié)構(gòu)(圖形界面)

          Xml代碼 復(fù)制代碼
          1. /   
          2.  ...   
          3.  usr   
          4.    apache2   
          5.      ...   
          6.      conf   
          7.        ...   
          8.        httpd.conf   
          9.      bin   
          10.        ...   
          11.        apachectl   
          12.    tomcat5   
          13.      ...   
          14.      conf   
          15.        ...   
          16.        server.xml   
          17.      bin   
          18.        ...   
          19.        shutdown.sh   
          20.        startup.sh   
          21.    webapps   
          22.      ...   
          23.      eWebEditor  

            
          3.命令界面
           cd /usr/tomcat5/bin  轉(zhuǎn)入到tomcat5 bin文件夾
              ./shutdown.sh       關(guān)閉tomcat服務(wù)
              ./startup.sh           啟動tomcat服務(wù)
           cd /usr/apache2/bin 轉(zhuǎn)入到apache2 bin文件夾
              ./apachectl start|stop|restart|graceful    啟動|關(guān)閉|重啟|優(yōu)化apache服務(wù)
           ls                             查看目錄文件命令
           move 文件夾 ..          移動文件夾到上一目錄
           rm -rf eWebEditor/   刪除文件夾eWebEditor
           ps -ef|grep java    查看tomcat啟動進(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) 如下:

          Xml代碼 復(fù)制代碼
          1. <Host name="eWebEditor.7234.com.cn"    
          2.     debug="0"    
          3.     appBase=""    
          4.     unpackWARs="true"    
          5.     autoDeploy="true">  
          6.  <Context path=""    
          7.       docBase="/usr/webapps/eWebEditor/"    
          8.       debug="0"    
          9.       privileged="true"    
          10.       reloadable="true"/>  
          11. </Host>  

           
           2./usr/apache2/conf 修改httpd.conf
            增加一個(gè)VirtualHost節(jié)點(diǎn) 如下:

          Xml代碼 復(fù)制代碼
          1. <VirtualHost *>  
          2.         <LocationMatch "/WEB-INF/">  
          3.         AllowOverride None   
          4.         deny from all   
          5.         </LocationMatch>  
          6.   
          7.         <LocationMatch "/META-INF/">  
          8.         AllowOverride None   
          9.         deny from all   
          10.         </LocationMatch>  
          11.   
          12.         RewriteEngine on   
          13.         RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)   
          14.         Rewriterule .* - [F]   
          15.   
          16.         ServerAdmin aaa@7234.com   
          17.         DocumentRoot /usr/webapps/eWebEditor/   
          18.         ServerName eWebEditor.7234.com.cn   
          19.         ErrorLog logs/eWebEditor.7234.com.cn-error_log   
          20.         CustomLog "|/usr/local/sbin/cronolog /usr/logs/apache_logs/eWebEditor.7234.com.cn_access_log.%Y%m%d" combined   
          21.   </VirtualHost>  

           

          5.本地hosts配置:C:\WINDOWS\system32\drivers\etc\hosts
           192.168.0.23 eWebEditor.7234.com.cn

           

          6.拼是否成功:開始->運(yùn)行->cmd
           ping eWebEditor.7234.com.cn
           #查看域名對應(yīng)的IP地址:是內(nèi)網(wǎng)還是外網(wǎng)的方法或是否連接成功。

           

          7.最后在瀏覽器中輸入:http://ewebeditor.7234.com.cn/ 請求頁面,查看頁面顯示效果。

           

          備注:eWebEditor或eWebEditor.7234.com.cn或紅色字體部分為變量,在實(shí)際使用過程中修改過來,本文以eWebEditor工程為例。
          原文:http://simpledev.javaeye.com/blog/353642

          主站蜘蛛池模板: 巢湖市| 阜南县| 潞西市| 章丘市| 合肥市| 天祝| 连江县| 华宁县| 永嘉县| 甘洛县| 克拉玛依市| 醴陵市| 武胜县| 安顺市| 手游| 汉沽区| 庆阳市| 云龙县| 揭阳市| 许昌县| 青阳县| 东丰县| 红河县| 夏津县| 松江区| 盈江县| 闽侯县| 玛沁县| 福建省| 武山县| 锡林郭勒盟| 张家口市| 南丹县| 晋城| 泗水县| 南部县| 泾源县| 留坝县| 嘉峪关市| 新竹市| 阳泉市|