jasmine214--love

          只有當你的內心總是充滿快樂、美好的愿望和寧靜時,你才能擁有強壯的體魄和明朗、快樂或者寧靜的面容。
          posts - 731, comments - 60, trackbacks - 0, articles - 0

          SSH Secure Shell的web方面的使用

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

          1.通常情況下開發的web系統在apache + tomcat Linux環境中測試,使用客戶端操作工具: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> 默認值
           Connect -> Enter your Password -> OK
          命令行界面定位到:[root@localhost root]#
          同理打開:Secure File Transfer Client,用于文件傳輸。

           

          2.目錄結構(圖形界面)

          Xml代碼 復制代碼
          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  轉入到tomcat5 bin文件夾
              ./shutdown.sh       關閉tomcat服務
              ./startup.sh           啟動tomcat服務
           cd /usr/apache2/bin 轉入到apache2 bin文件夾
              ./apachectl start|stop|restart|graceful    啟動|關閉|重啟|優化apache服務
           ls                             查看目錄文件命令
           move 文件夾 ..          移動文件夾到上一目錄
           rm -rf eWebEditor/   刪除文件夾eWebEditor
           ps -ef|grep java    查看tomcat啟動進程信息,進程ID
             kill -9 進程ID         強制關閉tomcat服務進程
           緩存清理
             /usr/tomcat5/work/Catalina/eWebEditor  直接刪掉eWebEditor文件夾清理緩存
           
          4.配置文件
           1./usr/tomcat5/conf 修改server.xml
            增加一個Host節點 如下:

          Xml代碼 復制代碼
          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
            增加一個VirtualHost節點 如下:

          Xml代碼 復制代碼
          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.拼是否成功:開始->運行->cmd
           ping eWebEditor.7234.com.cn
           #查看域名對應的IP地址:是內網還是外網的方法或是否連接成功。

           

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

           

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

          主站蜘蛛池模板: 东乌珠穆沁旗| 方城县| 永仁县| 西乡县| 南雄市| 秦皇岛市| 宜宾县| 繁昌县| 五华县| 乐都县| 阿拉善左旗| 电白县| 祁阳县| 黎川县| 田林县| 柳江县| 临清市| 博兴县| 清水河县| 大同县| 长顺县| 阳谷县| 杭州市| 沙田区| 隆安县| 阳城县| 西畴县| 临安市| 昌宁县| 山西省| 鹤山市| 宜兰县| 祁门县| 浏阳市| 融水| 德惠市| 五河县| 三亚市| 措美县| 永善县| 比如县|