SmileFace
          與java一起走過的日子
          posts - 41,  comments - 8,  trackbacks - 0
          I am trying to run wireshark in linux using sudo, but was told: i am not in the sudoer files. So I must edit this file to add my own user into this file. Steps as follows:

          1. su to root:  su-
           2. open sudoers:  visudo /etc/sudoers
          3. add my user name:  testuser ALL=(ALL) NOPASSWD:ALL
              This lines means that the user "testuser" can execute from ALL terminals, acting as ALL (any) users, and run ALL (any) command.

          The detail is in paper:  http://www.go2linux.org/sudoers-how-to






          posted @ 2009-08-28 04:28 SmileFace 閱讀(239) | 評論 (0)編輯 收藏
          In order to supports internationalization (I18N), on Tomcat some additional configuration is necessary. You must
          ensure that Tomcat's URI encoding is set to UTF-8. You can do this by editing the Tomcat configuration file
          conf/server.xml and adding URIEncoding=”UTF-8” to each connector element, as shown below:

          <Connector port="8080"
          maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
          enableLookups="false" redirectPort="8443" debug="0"
          acceptCount="100" connectionTimeout="20000"
          disableUploadTimeout="true"
          URIEncoding="UTF-8" />

          And make sure you do this for every connectort.
          posted @ 2009-08-20 13:45 SmileFace 閱讀(293) | 評論 (0)編輯 收藏
          I planned to install Roller in my centOS which need tomcat6. But centos5.3 has tomcat5 in it's yum. So I have to install tomcat6 using other way. I searched and found this good install guide in:
               http://cloudservers.mosso.com/index.php/CentOS_-_Tomcat_6 ( or http://de0ris.blogspot.com/2008/08/installing-tomcat-6x-on-centos-5.html )
          which give detail instructions. I choose some important part and paste here in case for late use.

          1.  install appache ant:  (note: download and put the tar file in /usr/share first )
             tar -xzf apache-ant-1.7.1-bin.tar.gz



          2. install tomcat:(note: download and put the tar file in /usr/share first )



          tar -xzf apache-tomcat-6.0.18.tar.gz

          3.  create a symbolic link for Ant so other applications can easily find it. Be sure to select the correct version when you create your link.
          ln -s /usr/share/apache-ant-1.7.1/bin/ant /usr/bin

          4. set JAVA_HOME:
          cd /usr/share/apache-tomcat-6.0.18/bin

          vi catalina.sh

          enter insert mode. Enter the following:

          JAVA_HOME=/usr/java/jdk1.6.0_14

          Test:
          cd /usr/share/apache-tomcat-6.0.18/bin

          ./startup.sh

          5.Automating atartup:   Right now Tomcat will not start up on it's own so we need to create a startup script for this. To do this:
          cd /etc/init.d

          vi tomcat

          Press i to enter insert mode and paste in the following:

          #!/bin/bash

          # chkconfig: 234 20 80

          # description: Tomcat Server basic start/shutdown script

          # processname: tomcat

          JAVA_HOME=/usr/java/jdk1.6.0_14

          export JAVA_HOME

          TOMCAT_HOME=/usr/share/apache-tomcat-6.0.18/bin

          START_TOMCAT=/usr/share/apache-tomcat-6.0.18/bin/startup.sh

          STOP_TOMCAT=/usr/share/apache-tomcat-6.0.18/bin/shutdown.sh

          start() {

          echo -n "Starting tomcat: "

          cd $TOMCAT_HOME

          ${START_TOMCAT}

          echo "done."

          }

          stop() {

          echo -n "Shutting down tomcat: "

          cd $TOMCAT_HOME

          ${STOP_TOMCAT}

          echo "done."

          }

          case "$1" in

          start)

          start

          ;;

          stop)

          stop

          ;;

          restart)

          stop

          sleep 10

          start

          ;;

          *)

          echo "Usage: $0 {start|stop|restart}"

          esac

          exit 0

          Be sure to change the following items in the above file:

          * JAVA_HOME path

          * TOMCAT_HOME path

          * START_TOMCAT path

          * STOP_TOMCAT path

          Once you have those changes made, save the file and quit.

          Now we need to change the permissions on the file.

          chmod 755 tomcat

          We need to set the script to start with other system services and set the runlevels.

          chkconfig --add tomcat

          chkconfig --level 234 tomcat on

          You can verify that it is listed by typing chkconfig --list tomcat.

          tomcat         	0:off	1:off	2:on	3:on	4:on	5:off	6:off

          Test your shutdown and startup script.

          sudo /sbin/service tomcat stop

          sudo /sbin/service tomcat start

          Tomcat 6 should now be installed under CentOS.

              



          posted @ 2009-08-20 13:12 SmileFace 閱讀(706) | 評論 (0)編輯 收藏
          1.Agile model driven development(AMDD): focus on model

          2.Extreme programmning: focus on full development life cycle.

          3.Jconsole: c:\program files\java\jdk1.6.0_14\bin\jconsole, which could dectect the memory issue, class loading, garbage collection...
          posted @ 2009-08-20 01:43 SmileFace 閱讀(133) | 評論 (0)編輯 收藏
          一看書名就知道又是一本通俗易懂的書。果不其然,而且比想象的更有意思(我想是簡單的緣故吧)。

          書里只是很簡單的提及了一些網絡的基本概念和運作原理,似乎各個方面都有覆蓋,但是因為描述的很淺顯,所以建議給:
          1 想大致了解DNS,ARP,router等網絡知識的人;
          2 有閑但是對于網絡感興趣的人;

          其實不錯,無聊的時候翻翻,解悶!

          posted @ 2009-08-19 14:08 SmileFace 閱讀(163) | 評論 (0)編輯 收藏
          centos

          0. /sbin/ifconfig

          1. mysql :

             *remove: yum -y remove mysql mysql-server
             *insatll: yum -y install mysql mysql-server
           
             *check: chkconfig --list | grep mysql
            
             *Set to Start on Boot:
                 chkconfig mysqld on

             *start service:
                 service --status-all
                 service mysqld start
                 check:  mysqladmin version    
           
             *setup root password:
              mysqladmin -u root password ***(this is new password)

              *run:
              mysql -u root -p

              *exit:
              \q

              *commands:ep t
              show databases;

              drop database ***;

          2. Tomcat:

              *install:
                  yum -y install tomcat5 tomcat5-webapps tomcat5-admin-webapps

              *You can find these packages using
                  yum list available tomcat5*
                  or
                  yum search tomcat5

              *Start:
                  service tomcat5 start
                 
              view:   http://localhost:8080/.

              *location:r
                   /usr/share/tomcat5 .
                  *setting:
                      "$CATALINA_HOME".

          3. JDK:

               * Originally, centOS only install jre. so we need install jdk by ourselves.
               *To install from the command line:
          $yum install java-1.6.0-openjdk-devel

          You can also install all the OpenJDK 6 packages, including the API documentation, by using the wildcard java-1.6.0-openjdk*.

                *location:         /usr/lib/jvm...
                *check:  java -version
                  






          posted @ 2009-08-13 07:31 SmileFace 閱讀(178) | 評論 (0)編輯 收藏

          <2009年8月>
          2627282930311
          2345678
          9101112131415
          16171819202122
          23242526272829
          303112345

          常用鏈接

          留言簿(2)

          隨筆分類

          隨筆檔案

          文章檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 常熟市| 横峰县| 新昌县| 贵阳市| 和顺县| 宁乡县| 高淳县| 东源县| 柳州市| 涞源县| 明光市| 大丰市| 惠安县| 海林市| 临清市| 怀宁县| 庄河市| 吉林省| 南陵县| 无极县| 彩票| 横山县| 天柱县| 安化县| 盐城市| 涿鹿县| 贵港市| 定远县| 石阡县| 上饶市| 巩留县| 休宁县| 慈利县| 昂仁县| 买车| 濮阳市| 崇仁县| 崇阳县| 察雅县| 青河县| 庆城县|