隨筆-69  評(píng)論-0  文章-5  trackbacks-0
            2006年12月11日
          先占個(gè)地兒
          http://blog.csdn.net/boat1980/archive/2008/07/23/2698318.aspx

          posted @ 2008-09-22 11:36 liunix 閱讀(243) | 評(píng)論 (0)編輯 收藏
          <html>
          <head>
          <script>
          function overlay() {
              el 
          = document.getElementById("overlay");
              el.style.visibility 
          = (el.style.visibility == "visible"? "hidden" : "visible";
          }
          </script>
          <style>
          body 
          {
               height
          :100%;
               margin
          :0;
               padding
          :0;
          }
          /*外層全部*/
          #overlay
          {
               visibility
          : hidden;
               position
          : absolute;
               left
          : 0px;
               top
          : 0px;
               width
          :100%;
               height
          :100%;
               text-align
          :center;
               z-index
          : 1000;
               background-color
          :#000;
               filter
          : alpha(opacity=70); /*ie支持的半透明,下面兩名為ff支持的*/
               -moz-opacity
          : 0.7;
               opacity
          :.70;
          }
          /*外層的顯示區(qū)*/
          #overlay div 
          {
               width
          :300px;
               margin
          : 100px auto;
               background-color
          : #FFFFFF;
               border
          :1px solid #000;
               padding
          :15px;
               text-align
          :center;
          }
          </style>
          </head>
          <body id="body">
          <div id="overlay">
               
          <div>
                  用戶名:
          <input type="text" name="" /><br/>
                  密  碼:
          <input type="text" name="" /><br/>
                  
          <input type="button" value="關(guān)閉" onclick="overlay()" />
               
          </div>
          </div>

          <href='#' onclick='overlay()'>Click here to show the overlay</a>
          </body>
          </html>   
          posted @ 2008-08-29 16:23 liunix 閱讀(652) | 評(píng)論 (0)編輯 收藏
          一、DESede加密(對(duì)應(yīng)SunJCE不提供模式和填充的情況)
          declare
              result raw(
          2000);
              l_mod number :
          = dbms_crypto.ENCRYPT_3DES+dbms_crypto.CHAIN_ECB+dbms_crypto.PAD_PKCS5;
          begin
              result :
          = dbms_crypto.Encrypt(src => utl_i18n.string_to_raw('wwww'),typ => l_mod,key => hextoraw('123456789012345678901234567890123456')
              );
              dbms_output.put_line(result);
          end;
          /

          二,摘要
          dbms_crypto.Hash(utl_i18n.string_to_raw('input'),dbms_crypto.MD5))
          posted @ 2008-07-21 14:54 liunix 閱讀(679) | 評(píng)論 (0)編輯 收藏
          用了幾天jira管理對(duì)它的權(quán)限模式有了初步理解:



          project和permission schema多對(duì)一,從而形成了permission schema的重用
          而permission schema本身則代表了group/user和pemission之前的映射關(guān)系

          另外,jira還有一個(gè)Project Role的概念更增加了jira權(quán)限管理的靈活性
          其實(shí)它實(shí)質(zhì)上就是一個(gè)角色(RBAC中的R),可以和group/user多對(duì)多關(guān)聯(lián),
          (當(dāng)然也可和Permission通過(guò)schema進(jìn)行關(guān)聯(lián))
          使jira的權(quán)限配置更新靈活的同時(shí),也增加了相當(dāng)?shù)膹?fù)雜性

          posted @ 2008-07-17 16:06 liunix 閱讀(1309) | 評(píng)論 (0)編輯 收藏
          一,造libmysql.def文件
             1, ${mysql_home}/include/libmySQL.def文件如果有直接用
             2, 否則下載pexports工具,執(zhí)行pexprots libmySQL.dll> libmySQL.def(libmySQL.dll在${mysql_home}/bin目錄下一般會(huì)有)
          二,轉(zhuǎn)換成靜態(tài)庫(kù)
             dlltool --input-def libmySQL.def --dllname libmySQL.dll --output-lib libmysql.a -k
          三,配置Eclipse(靜態(tài)庫(kù)和動(dòng)態(tài)庫(kù)加法都是-L${DIR} -l${libname},但誰(shuí)的優(yōu)先級(jí)高呢?)
              1, 加上庫(kù)目錄,如"${workspace_loc:/hello_mysql/libs}"
              2, 加上libmysql.a的庫(kù)名: mysql
              3, 構(gòu)建,報(bào)錯(cuò):  #ff0000 reference to `mysql_real_connect@32'之類的錯(cuò)
              4, 修改def文件,將mysql_real_connect改成mysql_real_connect@32,其它錯(cuò)誤同理,并重新生成靜態(tài)庫(kù)
              5, 重新構(gòu)建完成
          四,示例程序(只須修改連接信息及表名)
          #include <stdio.h>
          /*下面這一行一定要加上*/
          #include 
          <my_global.h>
          #include 
          <mysql.h>

          int main() {
              MYSQL mysql;
              MYSQL_RES 
          *result;
              MYSQL_ROW row;

              
          int numrows, numcols, c;

              mysql_init(
          &mysql);

              
          if (!mysql_real_connect(&mysql, "localhost""opencart""opencart""opencart"0, NULL, 0)) {
                  fprintf(stderr,
          "Failed to connect to database: Error %d:%s\n", mysql_errno(&mysql), mysql_error(&mysql));
              }
              
          char query[] = "SELECT * FROM product";

              
          if (mysql_query(&mysql, query))
              {
                  fprintf(stderr,
          "Error executing query: Error %d: %s\n", mysql_errno(&mysql), mysql_error(&mysql));
              }

              result 
          = mysql_use_result(&mysql);

              
          if (!result) {
                  fprintf(stderr,
          "Error executing query: Error %d: %s\n", mysql_errno(&mysql), mysql_error(&mysql));
              }
              numcols 
          = mysql_num_fields(result);

              
          while (row = mysql_fetch_row(result)) {
                  
          for (c = 0; c < numcols; c++) {
                      printf(
          "%s\t", row[c]);
                  }
                  printf(
          "\n");
              }
          }

             
          posted @ 2008-07-14 15:36 liunix 閱讀(1039) | 評(píng)論 (0)編輯 收藏
          一、安裝
          1, 安裝xampp
          2, 安裝zend studio[6]

          二、配置調(diào)式
          1,在http.conf中指定php.ini的位置
              PhpIniDir "D:/xampp/php"

          2, 在php.ini中的zend的部分指定以下內(nèi)容(ZendDebugger.dll是從zend studio中搜出來(lái)的)
          [Zend]
          zend_extension_ts = "D:\xampp\php\zendOptimizer\lib\ZendDebugger_5.2.12.dll"
          ;下面部分可選
          zend_debugger.allow_hosts=127.0.0.1/32,127.0.0.1/24
          zend_debugger.expose_remotely=allowed_hosts


          posted @ 2008-07-07 11:38 liunix 閱讀(291) | 評(píng)論 (0)編輯 收藏
          放在/usr/local/bin下,挺好用
           #!/bin/sh
           # this script converts an rpm into a plain tarball

           mkdir $$.cpio
           rpm2cpio $@ 
          > $$.cpio/foo
           cd $$
          .cpio
           cpio 
          ---< foo
           rm 
          -f foo
           find 
          . -type d -perm 700 -exec chmod 755 {} \;
           tar cvzf 
          ../`basename $@ .rpm`.tar.gz .
           cd 
          ../
           rm 
          -rf $$.cpio


          posted @ 2008-06-18 11:37 liunix 閱讀(347) | 評(píng)論 (0)編輯 收藏
          1,去http://rpm.pbone.net/下載下列rpm包并安裝
          libnasl-2.2.9-1.fc5.i386.rpm
          nessus-core-2.2.9-1.fc5.i386.rpm
          nessus-core-debuginfo-2.2.9-1.fc5.i386.rpm(可選)
          nessus-libraries-2.2.9-1.fc5.i386.rpm
          nessus-server-2.2.9-1.fc5.i386.rpm
          nessus-gui-2.2.9-1.fc5.i386.rpm
          2, 找個(gè)能用的郵箱去http://www.nessus.org/plugins/index.php?view=register注冊(cè)一下
          3, 按郵件中的方式運(yùn)行nessus-fetch --register ****
          4, 運(yùn)行nessus-adduser增加一個(gè)沒有rule的用戶
          5, 運(yùn)行nessus-mkcert造個(gè)證書
          6, 運(yùn)行nessus-fetch --check檢查一下狀態(tài)
          7, 如果前面沒啥問題,運(yùn)行service nessusd start
             如果這一步除了成功沒啥別的輸出就ok啦


          posted @ 2008-06-18 10:44 liunix 閱讀(277) | 評(píng)論 (0)編輯 收藏
          限制本機(jī)的對(duì)外訪問(例如不讓測(cè)試環(huán)境訪問生產(chǎn)庫(kù)):
          iptables -t filter -A OUTPUT -d 192.168.2.2 -p tcp --dport 1521 -j REJECT

          #端口轉(zhuǎn)發(fā)到另一臺(tái)機(jī)器上
          -A PREROUTING -d $ip1 -i eth0 -p tcp -m tcp --dport $port1 -j DNAT --to-destination $ip2:$port2
          -A POSTROUTING -d $ip2 -p tcp -m tcp --dport $port2 -j SNAT --to-source $ip1
          #本機(jī)端口相互映射
          -A PREROUTING -p tcp --dport $port1 -j REDIRECT --to-port $port2
          posted @ 2008-06-02 11:07 liunix 閱讀(224) | 評(píng)論 (0)編輯 收藏
          pre-commit.tmpl,然后更名pre-commit并加上執(zhí)行權(quán)限:
          #!/bin/sh

          REPOS
          ="$1"
          TXN
          ="$2"

          RES
          ="OK"
          # Make sure that the log message contains some text.
          SVNLOOK=/app/subversion/bin/svnlook
          $SVNLOOK log -"$TXN" "$REPOS" | egrep "[^[:space:]]+" >/dev/null || unset RES
          if [ "$RES" != "OK" ]
          then
              echo 
          "You must input some comments for you commit" >&2
              
          exit 1
          fi

          # All checks passed, so allow the commit.
          exit 0


          posted @ 2008-05-28 14:18 liunix 閱讀(1495) | 評(píng)論 (0)編輯 收藏
          fisheye(1.4.3):
              cenqua_com_licensing.atlassian.license.DefaultLicense
                 isExpired(),getExpiryDate()
              cenqua_com_licensing.atlassian.license.DefaultLicenseType(重點(diǎn))
                 isEvaluationLicenseType(),expires().....

          posted @ 2008-05-28 11:13 liunix 閱讀(518) | 評(píng)論 (0)編輯 收藏

          一,將pem格式的key文件導(dǎo)入keystore

          摘抄備用:http://www.agentbob.info/agentbob/79-AB.html

          說(shuō)明: 經(jīng)試驗(yàn)證書的pem文件可能通過(guò)keytool直接導(dǎo)入keystore中的

          Apache Tomcat and many other Java applications expect to retrieve SSL/TLS certificates from a Java Key Store (JKS). Jave Virtual Machines usually come with keytool  to help you create a new key store.

          Keytool helps you to:

          • create a new JKS with a new private key
          • generate a Certificate Signung Request (CSR) for the private key in this JKS
          • import a certificate that you received for this CSR into your JKS

          Keytool does not let you import an existing private key for which you already have a certificate. So you need to do this yourself, here's how:

          Let's assume you have a private key (key.pem) and a certificate (cert.pem), both in PEM format as the file names suggest.

          PEM format is 'kind-of-human-readable' and looks like e.g.

          -----BEGIN CERTIFICATE-----
          Ulv6GtdFbjzLeqlkelqwewlq822OrEPdH+zxKUkKGX/eN
          .
          . (snip)
          .
          9801asds3BCfu52dm7JHzPAOqWKaEwIgymlk=
          ----END CERTIFICATE-----

          Convert both, the key and the certificate into DER format using openssl :

          openssl pkcs8 -topk8 -nocrypt -in key.pem -inform PEM -out key.der -outform DER
          openssl x509 -in cert.pem -inform PEM -out cert.der -outform DER

          Now comes the tricky bit, you need something to import these files into the JKS. ImportKey will do this for you, get the ImportKey.java (text/x-java-source, 6.6 kB, info) source or the compiled (Java 1.5 !) ImportKey.class (application/octet-stream, 3.3 kB, info) and run it like

          user@host:~$ java ImportKey key.der cert.der
          Using keystore-file : /home/user/keystore.ImportKey
          One certificate, no chain.
          Key and certificate stored.
          Alias:importkey Password:importkey

          Now we have a proper JKS containing our private key and certificate in a file called keystore.ImportKey, using 'importkey' as alias and also as password. For any further changes, like changing the password we can use keytool.



          二、將私鑰導(dǎo)出成pem文件(默認(rèn)keytool是不能導(dǎo)出私鑰的)
          import sun.misc.BASE64Encoder;
          import java.security.cert.Certificate;
          import java.security.*;
          import java.io.File;
          import java.io.FileInputStream;
           
          class ExportPriv {
              
          public static void main(String args[]) throws Exception{
              ExportPriv myep 
          = new ExportPriv();
              myep.doit();
              }
           
              
          public void doit() throws Exception{
           
              KeyStore ks 
          = KeyStore.getInstance("JKS");
              String fileName 
          = "store.jks";
           
              
          char[] passPhrase = "password".toCharArray();
              BASE64Encoder myB64 
          = new BASE64Encoder();
              
           
              File certificateFile 
          = new File(fileName);
              ks.load(
          new FileInputStream(certificateFile), passPhrase);
           
              KeyPair kp 
          = getPrivateKey(ks, "alias", passPhrase);
                  
              PrivateKey privKey 
          = kp.getPrivate();
              
           
              String b64 
          = myB64.encode(privKey.getEncoded());
           
              System.out.println(
          "-----BEGIN PRIVATE KEY-----");
              System.out.println(b64);
              System.out.println(
          "-----END PRIVATE KEY-----");
           
              }
           
          // From http://javaalmanac.com/egs/java.security/GetKeyFromKs.html
           
             
          public KeyPair getPrivateKey(KeyStore keystore, String alias, char[] password) {
                  
          try {
                      
          // Get private key
                      Key key = keystore.getKey(alias, password);
                      
          if (key instanceof PrivateKey) {
                          
          // Get certificate of public key
                          Certificate cert = keystore.getCertificate(alias);
              
                          
          // Get public key
                          PublicKey publicKey = cert.getPublicKey();
              
                          
          // Return a key pair
                          return new KeyPair(publicKey, (PrivateKey)key);
                      }
                  } 
          catch (UnrecoverableKeyException e) {
                  } 
          catch (NoSuchAlgorithmException e) {
                  } 
          catch (KeyStoreException e) {
                  }
                  
          return null;
              }
           
          }
           

          posted @ 2008-04-17 16:27 liunix 閱讀(8007) | 評(píng)論 (0)編輯 收藏
          去年rails正火的時(shí)候,仿active record用hibernate實(shí)現(xiàn)了一個(gè)BasePo,當(dāng)時(shí)用的是一個(gè)
          靜態(tài)sessionfactory注入的方式,感覺很不好,當(dāng)明也沒想到好的方案,后來(lái)發(fā)現(xiàn)有人通過(guò)
          threadlocal實(shí)現(xiàn)了下面這個(gè),可以看看:
           1 public class Persistent implements Lifecycle, Validatable, Serializable {
           2    
           3    protected Serializable _id;
           4    protected int _version;
           5 
           6    public Serializable getIdentifier() {
           7       return _id;
           8    }
           9    public void setIdentifier(Serializable id) {
          10       _id = id;
          11    }
          12    public int getVersion() {
          13       return _version;
          14    }
          15    public void setVersion(int version) {
          16       _version = version;
          17    }
          18 
          19    public Long persist() throws HibernateException, SQLException {
          20       HibernateSession.currentSession().saveOrUpdate(this);
          21       return _id;
          22    }
          23    public void delete() throws HibernateException, SQLException {
          24       HibernateSession.currentSession().delete(this);
          25    }
          26    public void refresh() throws HibernateException, SQLException {
          27       HibernateSession.currentSession().load(this, _id);
          28    }
          29    public void lock() throws HibernateException, SQLException {
          30       HibernateSession.currentSession().lock(this, LockMode.UPGRADE);
          31    }
          32 
          33    public boolean onSave(Session s) throws CallbackException {
          34       return NO_VETO;
          35    }
          36    public boolean onDelete(Session s) throws CallbackException {
          37       return NO_VETO;
          38    }
          39    public boolean onUpdate(Session s) throws CallbackException {
          40       return NO_VETO;
          41    }
          42    public void onLoad(Session s, Serializable id) {
          43       _id = id;
          44    }
          45 
          46    public void validate() throws ValidationFailure {
          47    }
          48 }

          原文:http://hibernate.bluemars.net/46.html?cmd=prntdoc

          下面是hibernatesession的源碼,應(yīng)該考濾一下如何與spring事務(wù)結(jié)合的問題(還是加一個(gè)doInTransaction 的callback?)
           1 import java.util.Collection;
           2 
           3 import net.sf.hibernate.HibernateException;
           4 import net.sf.hibernate.Session;
           5 import net.sf.hibernate.Transaction;
           6 
           7 import org.apache.commons.logging.Log;
           8 import org.apache.commons.logging.LogFactory;
           9 
          10 /**
          11  * @author Ralph Schaer
          12  * @version $Revision: 1.6 $ $Date: 2004/05/22 12:24:32 $
          13  */
          14 public class HibernateSession {
          15 
          16   private static final Log LOG = LogFactory.getLog(HibernateSession.class);
          17   public static final ThreadLocal SESSION = new ThreadLocal();
          18 
          19   public static Session currentSession() throws HibernateException {
          20 
          21     Session s = (Session) SESSION.get();
          22     if (s == null) {
          23       s = HibernateFactoryManager.getSessionFactory().openSession();
          24       SESSION.set(s);
          25     }
          26     return s;
          27   }
          28 
          29   public static Session getSession() throws HibernateException {
          30     return HibernateFactoryManager.getSessionFactory().openSession();
          31   }
          32 
          33   public static void closeSession() {
          34     try {
          35       Session s = (Session) SESSION.get();
          36       SESSION.set(null);
          37       if (s != null) {
          38         s.close();
          39       }
          40 
          41     } catch (HibernateException e) {
          42       LOG.error("HibernateSession:  closeSession", e);
          43     }
          44 
          45   }
          46 
          47   public static void rollback(Transaction tx) {
          48     if (tx != null) {
          49       try {
          50         tx.rollback();
          51         closeSession();
          52       } catch (HibernateException he) {
          53         LOG.error("HibernateSession: rollback", he);
          54       }
          55     }
          56   }
          57 
          58   //Utility methods
          59   public static int collectionSize(Collection coll) throws HibernateException {
          60     return ((Integer) currentSession().createFilter(coll, "select count(*)").iterate().next()).intValue();
          61   }
          62 
          63 }


          還有一種考慮泛型的方式可以參考:
          http://privacyneed.info/index.php?hl=f5&q=uggc%3A%2F%2Fcrgreonpxyhaq.oybtfcbg.pbz%2F2007%2F07%2Fvzcyrzragvat-npgvirerpbeq-va-wnin.ugzy
          posted @ 2008-03-28 11:30 liunix 閱讀(483) | 評(píng)論 (0)編輯 收藏
          從網(wǎng)上找了一段,寫得挺麻煩,但可以借一下思路
          cat watch.sh

          #!/bin/sh
          cd /root/bin

          PID
          =`ps -aef | grep Xms500M | grep -grep | gawk '{print $2}'`
          PID
          =`expr $PID + 1 - 1`

          date
          free
          echo 
          $PID
          echo 
          "------------------"

          if [ $PID -eq 0 ]
          then
          sleep 10
          /usr/java/tomcat/bin/startup.sh
          sleep 160
          fi

          while [ 1 ]
          do
          date
          free
          echo 
          "Tomcat process ID is $PID"
          wget http
          ://192.168.1.101/jsp/w_blog/blog.jsp -O working.jpg 2>> /dev/null &
          sleep 120
          touch working
          .jpg
          SIZE
          =`du working.jpg | gawk '{print $1}'`
          if [ $SIZE -le 20 ]
          then


          WID
          =`ps -aef | grep 192.168.1.101 | grep -grep | gawk '{print $2}'`
          WID
          =`expr $WID + 1 - 1`

          if ! test -$WID
          then
          killall wget
          fi


          echo 
          "Tomcat restart checking"
          free
          vmstat
          FREEMEM
          =`free | grep Mem | gawk '{print $4}'`

          if [ $FREEMEM -le 15000 ]
          then

          if [ $PID -ne 0 ]
          then
          kill -9 $PID
          ls 
          -l
          /usr/java/tomcat/bin/shutdown.sh
          fi

          /usr/java/tomcat/bin/shutdown.sh
          sleep 10
          /usr/java/tomcat/bin/startup.sh
          sleep 30
          fi

          date
          ps 
          -aef | grep -v httpd
          ls 
          -l
          PID
          =`ps -aef | grep Xms500M | grep -grep | gawk '{print $2}'`
          PID
          =`expr $PID + 1 - 1`

          fi

          rm 
          -f working.jpg

          done


          posted @ 2008-03-24 19:25 liunix 閱讀(1300) | 評(píng)論 (0)編輯 收藏
          1,設(shè)置好WEB-INF/classes/xplanner-customer.properties中的數(shù)據(jù)連接,建mysql庫(kù)[xplanner]
          2, 運(yùn)行會(huì)自動(dòng)創(chuàng)建數(shù)據(jù)庫(kù)表和sysadmin/admin用戶
          3, 中文亂碼,先導(dǎo)出數(shù)據(jù)庫(kù)[主要保存用戶維護(hù)數(shù)據(jù)]
              mysqldump --opt --database xplanner > xplanner.sql
          4, 將sql中的create database語(yǔ)句改成default charset utf8;
          5, souce xplanner.sql
          6, 將server-config.wsdd[WEB-INF]下的附件上傳位置改成合適目錄
          7, 重啟xplanner即可

          posted @ 2008-03-20 20:22 liunix 閱讀(257) | 評(píng)論 (0)編輯 收藏
          概念:
              唯一的就是一個(gè)候選鍵(數(shù)據(jù)庫(kù)理論基礎(chǔ))
          所以要增加唯一性就是增加一個(gè)Alternate key

          操作:
              單擊表模型,選中keys簽,增加一個(gè)key,不選primary即可

          信息來(lái)源sybooks online:
              http://infocenter.sybase.com/help/index.jsp
          查找unique constraint找出和PDM相關(guān)的內(nèi)容

          posted @ 2008-03-19 15:36 liunix 閱讀(179) | 評(píng)論 (0)編輯 收藏
          網(wǎng)上說(shuō)的比較多
          不過(guò)一定要記住看服務(wù)進(jìn)程的log:
          view /var/log/mysql.log
          在我這里問題是:


          /usr/libexec/mysqld: Can't create/write to file '/tmp/'


          說(shuō)明mysql用戶無(wú)權(quán)使用/tmp目錄,改一下目錄權(quán)限就好了
          chmow -R 777 /tmp

          posted @ 2008-03-18 14:29 liunix 閱讀(176) | 評(píng)論 (0)編輯 收藏
          一,JIRA安裝
              1, 下載最新的JIRA(要注冊(cè)才能得到測(cè)試liense)
              2,  創(chuàng)建數(shù)據(jù)庫(kù)用戶[注意:jira用的utf8],create database jira default charset utf8; (mysql)
              3,  按官網(wǎng)WIKI配置數(shù)據(jù)庫(kù),所有表會(huì)自動(dòng)創(chuàng)建


          二,SUBVERSION-PLUGIN
              1, 下載插件
              2,  拷完lib到指定位置即可(不要拷properties)   
              3, 在管理端增加倉(cāng)庫(kù)位置

          三,svnwebclient
              1, enscript不是語(yǔ)法加亮,只是加彩而已(而且大部分linux版本自帶)

          posted @ 2008-03-18 14:04 liunix 閱讀(221) | 評(píng)論 (0)編輯 收藏
          1, 下載http://www.allwiki.com/wiki/Mediawiki
          2,  解壓放到/var/www/html下,將config目錄權(quán)限改為777
          3,  給apache增加一個(gè)配置文件mediawiki.conf,內(nèi)容如下:
          <Directory "/var/www/html/mediawiki">
              AllowOverride None
              Options +ExecCGI
              Order allow,deny
              Allow from all
          </Directory>
          4,瀏覽器中輸入:http://hostname/mediawiki/index.php
          5,安裝看是否缺php-mysql,如果缺到fc5的cd-rom中安裝
          6, 創(chuàng)建數(shù)據(jù)庫(kù)
              mysql -u root
              create database mediawiki;
              grant all on mediawiki.* to mediawiki@'localhost' identified by 'mediawiki';
          6, 輸入各項(xiàng)配置
          7, mysql5創(chuàng)建表有問題,尚未解決,實(shí)在不行只能換個(gè)wiki看看了

          posted @ 2008-03-15 15:59 liunix 閱讀(156) | 評(píng)論 (0)編輯 收藏
          1, 下載bugzilla
              運(yùn)行./checksetup.pl
          2, 根據(jù)提示安裝perl模塊
              位置:http://search.cpan.org/search?query=IO%3A%3AScalarArray&mode=all
              下載后:
              perl Makefile.pl
              make
              make test
              make install
              (過(guò)程如果有依整性錯(cuò)誤,請(qǐng)安裝相應(yīng)模塊)
          3,配置mysql
              mysql -u root
              create database bugs
              grant all on bugs.* to bugzilla@'localhost' identified by 'bugs'
          4,配置vi ./localconfig設(shè)置數(shù)據(jù)庫(kù)
          5, 再次運(yùn)行./checksetup.pl會(huì)創(chuàng)建數(shù)據(jù)庫(kù)和設(shè)置bugzilla管理員(以mail作為登錄名)
          6, 將bugzilla目錄拷到/www/html/下
          7, 在/etc/httpd/conf.d/下增加bugzilla.conf內(nèi)容如下:
          AddHandler cgi-script .cgi .pl
          <Directory "/var/www/html/bugzilla">
              AllowOverride None
              Options +ExecCGI
              Order allow,deny
              Allow from all
          </Directory>
          8,運(yùn)行apachectl restart
          9,訪問:http://hostname/bugzilla/index.cgi
             

          posted @ 2008-03-15 14:41 liunix 閱讀(166) | 評(píng)論 (0)編輯 收藏
          常用操作:
          -- job 權(quán)限
          grant create job to somebody;

          -- job 創(chuàng)建
          begin
           dbms_scheduler.create_job (
               job_name 
          => 'AGENT_LIQUIDATION_JOB',
               job_type 
          => 'STORED_PROCEDURE',
               job_action 
          => 'AGENT_LIQUIDATION.LIQUIDATION'--存儲(chǔ)過(guò)程名
               start_date => sysdate,
               repeat_interval 
          => 'FREQ=MONTHLY; INTERVAL=1; BYMONTHDAY=1;BYHOUR=1;BYMINUTE=0;BYSECOND=0',  -- 按月,間隔為1個(gè)(月),每月1號(hào),凌晨1點(diǎn)
               comments => '執(zhí)行代理商清分程序'
           );
          end;
          /

          -- job 執(zhí)行時(shí)間測(cè)試
          DECLARE
              start_date date;
              return_date_after date;
              next_run_date date;
          BEGIN
              start_date :
          = sysdate;--to_timestamp_tz('10-OCT-2004 10:00:00','DD-MM-YYYY HH24:MI:SS');
              return_date_after := start_date;
          FOR i IN 1..10 LOOP
               DBMS_SCHEDULER.EVALUATE_CALENDAR_STRING(
          'FREQ=MONTHLY; INTERVAL=1; BYMONTHDAY=1;BYHOUR=1;BYMINUTE=0;BYSECOND=0',start_date, return_date_after, next_run_date);
               DBMS_OUTPUT.PUT_LINE(
          'next_run_date: ' || to_char(next_run_date,'yyyy-mm-dd HH24:MI:SS'));
               return_date_after :
          = next_run_date;
              
          END LOOP;
          END;
          /

          -- job 查詢
          select owner, job_name, state from dba_scheduler_jobs;
          select job_name, state from user_scheduler_jobs;

          -- job 啟用
          begin
              dbms_scheduler.enable(
          'BACKUP_JOB');
          end;
          /

          -- job 運(yùn)行
          begin
              dbms_scheduler.run_job(
          'COLA_JOB',TRUE); -- true代表同步執(zhí)行
          end;
          /

          -- job 停止(不太好用)
          begin
              dbms_scheduler.stop_job(job_name 
          => 'COLA_JOB',force => TRUE);
          end;
          /

          -- job 刪除(對(duì)停job來(lái)說(shuō)好用)
          begin
              dbms_scheduler.drop_job(job_name 
          => 'COLA_JOB',force => TRUE);)
          end;
          /

          posted @ 2008-03-14 10:36 liunix 閱讀(624) | 評(píng)論 (0)編輯 收藏
          位置:
          http://xfire.codehaus.org/HTTP+Transport
          posted @ 2008-03-13 14:58 liunix 閱讀(533) | 評(píng)論 (0)編輯 收藏
          1,一定不要下載.zip,而用tar.gz或bz2
          2, 安裝到/usr/local/subverion時(shí)再啟apache
              出現(xiàn): /usr/local/subverion/lib/libaprutil-0.so.0: undefined symbol: gdbm_errno
              解決:export LD_PRELOAD=/usr/lib/libgdbm.so.2 再執(zhí)行 apachectl start(或 service httpd start)
              可以將export這一行放入apachectl腳本中
          3, 安裝可以自動(dòng)更新apache中的moudle, 不用換rpm安裝剩下的svn等命令,這些只不過(guò)是服務(wù)器上的客戶端
              只要以后執(zhí)行/usr/local/subverion/bin下的命令即可(可以在profile中修改PATH)

          posted @ 2008-03-11 13:40 liunix 閱讀(228) | 評(píng)論 (0)編輯 收藏
          1, 準(zhǔn)備相關(guān)JAVA包
          2,  jce_policy-1_4_2.zip中的兩個(gè)jar到D:\jdk14\jre\lib\security
          3,  bcprov-jdk14-138.jar到D:\jdk14\jre\lib\ext并修改D:\jdk14\jre\lib\security\java.security加入
              security.provider.6=org.bouncycastle.jce.provider.BouncyCastleProvider


          posted @ 2008-03-07 20:13 liunix 閱讀(208) | 評(píng)論 (0)編輯 收藏
           


          posted @ 2008-03-03 16:21 liunix 閱讀(926) | 評(píng)論 (0)編輯 收藏
          一,基本安裝

          如果不能獲得額外的IP
          vmware-tool的安裝:
          0, 將fc5安裝CD中的kernel-devel安裝上
          1,將CD-ROM置為默認(rèn)狀態(tài)
          2, 在菜單中選取安裝vmware-tool
          3,將cd mount上
          4, install
          5, 運(yùn)行vmware-any-any-update101.tar.gz中的runme.pl(改其中的路徑/etc/vmware --> /etc/vmware-tools   /usr/bin/vmware-config.pl -->/usr/bin/vmware-tool-config.pl)


          -- 下面這個(gè)可能依賴前一項(xiàng)的成功
          vm:網(wǎng)卡配置選nat
          vm的linux中:netconfig 指定與"VMware Network Adapter VMnet8"相同的IP網(wǎng)段地址和子網(wǎng)
          vm的linux中:子網(wǎng)默認(rèn)網(wǎng)關(guān)和edit->virtual network setting->nat 中的網(wǎng)關(guān)地址一樣(還可以在neat中加上路由)
          vm的dns: 和主機(jī)相同
          vm的linux中:service network restart

          二、添加硬盤
          基本知識(shí):
                硬盤命名規(guī)則-----hda代表硬盤名,hda1則代表hda上的第1個(gè)分區(qū)
          過(guò)程如下:
          0,   在vmware中用新增硬盤向?qū)砑右粔K硬盤,下面就是操作linux的fdisk的事情了
          1,   fdisk -l   ----------查看當(dāng)前硬盤的分區(qū)情況
          2,   fdisk  /dev/hdb  --為指定硬盤分區(qū)
          3,   m          -----------查看幫助
          4,   n           -----------新建分區(qū)(要選主分區(qū),不知何為)
          5    w           -----------寫入磁盤的分區(qū)表
          6,   mkfs -t ex2 /dev/hdb1  --為新建分區(qū)創(chuàng)建文件系統(tǒng)(或mkfs.ex2  /dev/hdb1,都是mkfs.$type 命令系列)
          ##7,   mount  /hdb1   /dev/hdb1 加載新建文件系統(tǒng)
          若使用了邏輯卷管理器:則用system-config-lvm調(diào)整,可以將新建的分區(qū)邏輯地加到原來(lái)的
          mount點(diǎn)下,等于動(dòng)態(tài)擴(kuò)展了原來(lái)的磁盤(比較好用)



          posted @ 2008-02-27 09:19 liunix 閱讀(184) | 評(píng)論 (0)編輯 收藏
          xplanner         進(jìn)度
          bugzilla(--jira) bug
          eclipse mylyn    任務(wù)
          emma             覆蓋
          cs               集成
          SVN              版本
          ant              構(gòu)建
          selenium         黑盒測(cè)試
          --wiki           文檔

          junit            白盒測(cè)試
          ant              構(gòu)建

          --powerdesigner    數(shù)據(jù)庫(kù)設(shè)計(jì)
          --rose/vision      UML/流程圖工具
          --word             文檔工具

          人個(gè)schedule     qorganizer


          說(shuō)明: --為收費(fèi)工具
          posted @ 2008-02-26 11:07 liunix 閱讀(128) | 評(píng)論 (0)編輯 收藏
          ant

          <?xml version="1.0"?>
          <project name="PGAgent" basedir="." default="default">
              
              
          <target name="default" depends="deploy" description="代理商平臺(tái)構(gòu)建" />
              
              
          <property name="build.path" value="build" />
              
              
          <tstamp>
                  
          <format property="date.MMdd" pattern="MMdd"/>
              
          </tstamp>
              
              
          <filterset id="filter.test">
                  
          <filter token="dataSource.url" value="jdbc:oracle:thin:@1.2.3.4:1521:p5dbb1"/>
                  
          <filter token="dataSource.username" value="gagent"/>
                  
          <filter token="dataSource.password" value="gagent"/>
                  
          <filter token="log4j.path" value="/home/xuzhijin/logs/pgagent/pgagent.log"/>
              
          </filterset>
              
              
          <filterset id="filter.deploy">
                  
          <filter token="dataSource.url" value="null"/>
                  
          <filter token="dataSource.username" value="null"/>
                  
          <filter token="dataSource.password" value="null"/>
                  
          <filter token="log4j.path" value="null"/>
              
          </filterset>    

              
          <target name="deploy" depends="test_tidy,deploy_tidy">
                  
          <antcall target="clean_before" />
                     
          <zip destfile="${build.path}/${ant.project.name}_test_${date.MMdd}.zip" basedir="${build.path}/test" />
                     
          <zip destfile="${build.path}/${ant.project.name}_deploy_${date.MMdd}.zip" basedir="${build.path}/deploy" />
                  
          <antcall target="clean_after" />
              
          </target>
              
              
          <target name="deploy_tidy">
                  
          <copy todir="${build.path}/deploy/${ant.project.name}/">
                      
          <fileset dir="${basedir}/WebRoot/">
                          
          <exclude name="**/.svn"/>
                          
          <exclude name="**/.svn/*.*"/>
                      
          </fileset>
                  
          </copy>
                  
          <copy todir="${build.path}/deploy/${ant.project.name}/WEB-INF/classes" overwrite="true" >
                      
          <fileset dir="${basedir}/buildFilter/">
                          
          <include name="*.properties"/>
                      
          </fileset>                
                      
          <filterset refid="filter.deploy" />
                  
          </copy>
              
          </target>
              
              
          <target name="test_tidy">
                  
          <copy todir="${build.path}/test/${ant.project.name}/">
                      
          <fileset dir="${basedir}/WebRoot/">
                          
          <exclude name="**/.svn"/>
                          
          <exclude name="**/.svn/*.*"/>
                      
          </fileset>
                  
          </copy>
                  
          <copy todir="${build.path}/test/${ant.project.name}/WEB-INF/classes/" overwrite="true" >
                      
          <fileset dir="${basedir}/buildFilter/">
                          
          <include name="*.properties"/>
                      
          </fileset>            
                      
          <filterset refid="filter.test" />
                  
          </copy>
              
          </target>    
              
              
          <target name="clean_after">
                  
          <delete dir="${build.path}/test" />
                  
          <delete dir="${build.path}/deploy" />
              
          </target>
              
              
          <target name="clean_before">
                  
          <delete file="${build.path}/${ant.project.name}_test_${date.MMdd}.zip" />
                  
          <delete file="${build.path}/${ant.project.name}_deploy_${date.MMdd}.zip" />
              
          </target>

          </project>



          bash:
          #!/bin/bash
          file_prefix=PGAgent_test
          dest_dir
          =/usr/local/ciecc/webapps/
          today
          =`date +%m%d`
           
          rm 
          -rf $dest_dir${file_prefix%_*}
          unzip 
          -$dest_dir $file_prefix'_'$today.zip
          tail 
          -/home/xuzhijin/logs/pgagent/pgagent.log

          posted @ 2008-02-22 20:28 liunix 閱讀(155) | 評(píng)論 (0)編輯 收藏
              String.prototype.trim = function() {
                  return this.replace(/^\s+|\s+$/g,"");
              }
             
              String.prototype.isBlank = function() {
                  return this == null || this == "";
              }
              
              function validate_required(form){
                  for(var i=0;i<form.elements.length;i++){
                      var element  = form.elements[i];
                      if(null != element.getAttribute('required') && 'TRUE' == element.getAttribute('required').toUpperCase()){
                          if(element.value.trim().isBlank()){
                              alert('所有必填項(xiàng)都不能為空');
                              return false;
                          }
                      }
                 }
                 return true;
              }
             
              function validate_pattern(form){
                  for(var i=0;i<form.elements.length;i++){
                      var element  = form.elements[i];
                      if(null != element.getAttribute('pattern')){
                          if( !element.value.trim().isBlank() && !new RegExp(element.getAttribute('pattern').split("/")[0]).test(element.value.trim())){
                              alert(element.getAttribute('pattern').split("/")[1]);
                              return false;
                          }
                      }
                 }
                 return true;                         
              }
             
              -- 校驗(yàn)不必填的傳真只填一半的特殊情況
              function validate_other(form){
                  if(form.cpFaxPart1.value.isBlank() != form.cpFaxPart2.value.isBlank()){
                     alert('公司傳真未填寫完整(也可完全不填)');
                     return false;
                  }
                  return true;
              }
                     
              function validate(form){
                  return validate_required(form) && validate_pattern(form) && validate_other(form);
              }
          posted @ 2008-02-15 15:52 liunix 閱讀(165) | 評(píng)論 (0)編輯 收藏
          alter session set max_dump_file_size=unlimited;
          alter session set timed_statistics=true;
          alter session set events '10046 trace name context forever, level 12';
          select 'Hello, world; today is '||sysdate from dual; exit;

          tkprof card_ora_13226.trc trace.txt print=100 record=sql.txt sys=no

          然后查年trace.txt就是分析內(nèi)容了
          posted @ 2007-11-06 09:52 liunix 閱讀(378) | 評(píng)論 (0)編輯 收藏
          #少了一步安裝 fcgi本身的
          #將public下面的所有ruby路徑改正確
          #詳細(xì)說(shuō)明如何啟用fcgi而不是cgi(改.htpaccess)
          #將ruby-fcgi按README安裝完全
          #啟用SYBASE要設(shè)置/etc/ld.so.conf加上sybase的lib路徑(APACHE以NOBODY啟動(dòng),LD_LIBRARY_PATH似乎沒用)


          1,為編譯fastcgi,安裝httpd-dev包
              rpm -ivh httpd-dev***.rpm    #會(huì)要求安裝其它依賴包
          2,構(gòu)建mod_fastcgi.so,正常構(gòu)建會(huì)報(bào)缺少文件(對(duì)fc4自動(dòng)安裝apache而言),會(huì)自動(dòng)加入/usr/lib/httpd/module中,/etc/httpd/conf/httpd.conf也會(huì)自動(dòng)加載(但語(yǔ)法不對(duì))
              apxs -n mod_fastcgi -i -a -c mod_fastcgi.c fcgi_buf.c fcgi_config.c fcgi_pm.c fcgi_protocol.c fcgi_util.c  #在解壓后的mod_fast2.4.2包中執(zhí)行,構(gòu)建mod_fast.so
              chmod 755 /usr/lib/httpd/modules/mod_fastcgi.so #修改訪問權(quán)限
          3,ruby的fcgi模塊正確安裝方法
             1,下載ruby-fcgi-0.8.7.tar.gz
             2,ruby install.rb config -- --with-fcgi-include=/usr/local/include --with-fcgi-lib=/usr/local/lib  (指向正確的fcgi安裝路徑)
             3,其余按readme
          4,為apache配置虛擬主機(jī)(客戶機(jī)的host要配合指向)---還要加上一條時(shí)間選項(xiàng)
              <Directory /var/www/>
                  AllowOverride all
              </Directory>

              LoadModule fastcgi_module modules/mod_fastcgi.so
              FastCgiConfig -singleThreshold 100 -killInterval 300 -autoUpdate -idle-timeout 240  -pass-header HTTP_AUTHORIZATION
              AddHandler fastcgi-script .fcgi

              <VirtualHost *:80>
                  ServerAdmin webmaster@example.com
                  DocumentRoot /var/www/rails/testapp/public        #testapp即為你rails程序的根目錄
                  ServerName www.example.com
                  ErrorLog /var/log/httpd/testapp-error_log
                  CustomLog /var/log/httpd/testapp-access_log common
                  Options Indexes ExecCGI FollowSymLinks
                  RewriteEngine On
              </VirtualHost>
          6,啟動(dòng)apache,看歡迎頁(yè)面
              apachectl start   #用這種方式可以在控制臺(tái)查看錯(cuò)誤消息(應(yīng)該會(huì)報(bào)一條無(wú)效的加截so的行190?)
          7,根據(jù)需要修改rails應(yīng)用(producation環(huán)境,facgi的dispatch,數(shù)據(jù)庫(kù)支持)


          8,后續(xù)修改如下
              chown -R apache.apache ${railsapp}
              mkdir /tmp/fcgi_ipc
              httpd.conf-->FastCgiIpcDir "/tmp/fcgi_ipc/"
              chown -R apache.apache /tmp/fcgi_ipc





          錯(cuò)誤情況分析:
          1,apache的error.log或app的error.log會(huì)報(bào):(權(quán)限問題)
              [Sun Nov 19 14:05:29 2006] [crit] (13)Permission denied:
              FastCGI: can't create (dynamic) server "/var/www/rails/testapp/public/dispatch.fcgi":
              bind() failed [/etc/httpd/logs/fastcgi/dynamic/3c713fbde3044b67e240a7bf3791f36b]

          2,測(cè)試dispatch.fcgi的方法ruby -d dispatch.fcgi

          3,app下面的fastcgi.crash.log中產(chǎn)生----注意,說(shuō)方法丟失可能是c的動(dòng)態(tài)庫(kù)沒有找到
             Dispatcher failed to catch: undefined method `is_cgi?' for FCGI:Class (NoMethodError)
             fcgi的問題


          posted @ 2007-08-10 11:46 liunix 閱讀(967) | 評(píng)論 (0)編輯 收藏
          1, 安裝系統(tǒng)時(shí)盡量不要選擇ruby,如果已安裝
              rpm -qa | grep ruby
              rpm -e ${已安裝上ruby包名}

          2, 檢查系統(tǒng),確定已安裝gcc,make
              gcc -v
              make -v

          3, 安裝ruby 1.8.5
              wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.5.tar.gz
              tar xzvf ruby-1.8.5.tar.gz
              cd ruby-1.8.5
              ./configure --prefix=/usr/local/ruby
              make && make install
              export PATH=$PATH:/usr/local/ruby/bin/

          4, 安裝rubygems
              wget http://rubyforge.org/frs/download.php/20990/rubygems-0.9.4.zip
              unzip rubygems-0.9.4.zip && cd rubygems-0.9.4
              ruby setup.rb

          5, 安裝rails
              gem install rails  -v=1.2.3
              各種依賴庫(kù)均選Y

          6, 安裝mongrel(有平臺(tái)選項(xiàng)的均選ruby)
              gem install mongrel
              各種依賴庫(kù)均Y

          7, 安裝sybase-ruby庫(kù)
              wget http://enjoy1.bb-east.ne.jp/~tetsu/sybct-ruby-0.2.9.tar.gz
              tar xzvf sybct-ruby-0.2.9.tar.gz
              cd sybct-ruby-0.2.9
              編緝extconf.rb文件,指向正確sybase路徑
              ruby extconf.rb
              make
              cp sybct.o sybct.so sybct.rb sybsql.rb /usr/local/ruby/lib/ruby/site_ruby/1.8/i686-linux
              export LD_LIBRARY_PATH=${SYBASE_HOME}/OCS-12_5/lib

          8, 結(jié)合apache與mongrel (APP_ROOT為應(yīng)用程序根目錄)
             參見文章: http://mongrel.rubyforge.org/docs/apache.html

          9, 安裝ImageMagick和RMagic(不要安裝RMagic的gem包)
              先檢查依賴庫(kù):libpng,libjpeg,libtiff,gd-devel
              unzip ImageMagick-6.3.4-4.zip
              cd ImageMagick-6.3.4-4
              ./configure --prefix=/usr/local/ImageMagick
              make && make install
              export PATH=$PATH:/usr/local/ImageMagic/bin
              編輯:/etc/ld.so.conf,加入
              /usr/local/ImageMagick/lib
              執(zhí)行:ldconfig

             
              tar xzvf RMagick-1.15.6.tar.gz
              cd RMagick-1.15.6
              ./configure
              make && make install


          posted @ 2007-07-11 12:44 liunix 閱讀(629) | 評(píng)論 (0)編輯 收藏
          cygwin清屏:
          1, ctrl+l
          2, alias cls='echo -e "\E[2J"'

          復(fù)制,粘帖:
          控制臺(tái)的編輯選項(xiàng)選上"快帶編輯"
          就可以左鍵直接選取,右鍵粘帖了
          posted @ 2007-06-11 20:19 liunix 閱讀(2540) | 評(píng)論 (0)編輯 收藏
          為了rails的圖形開發(fā)
          參照 robbin說(shuō)法:
          http://robbin.javaeye.com/blog/post/296400

          補(bǔ)充一下:
          下ImageMagick的源碼版(即便安裝了rpm,也再下一版)
              configure時(shí)一定指定路徑
          RMagick也最好是源碼版

          posted @ 2007-05-31 20:33 liunix 閱讀(146) | 評(píng)論 (0)編輯 收藏
          目的:為了用老的gcc進(jìn)行sybase的c開發(fā)

          -,fc6 上安裝  VMware

          1, 下載VMware-server-1.0.1-29996.tar.gz,vmware-any-any-update109.tar.gz,yum install xined

          2, 安裝vmware(一路default),config.pl報(bào)錯(cuò),運(yùn)行update109,搜一個(gè)注冊(cè)碼填上

          3,啟動(dòng)xinted,vmware的xined腳本

          4, 啟動(dòng)客戶端vmare

          二,vmware安裝rh7

          圖形界面,不說(shuō)了

          安裝 sshd_server,setup 配置開啟sshd服務(wù), 然后service sshd start

          執(zhí)行ipchains -A input -p tcp -s 192.168.1.6 -d 192.168.1.8 22 -j ACCEPT

          打開防火墻端口:ipchains(7.1就變成真的iptable了)

          三,openclient 12.5
          先裝common rpm再openclient.rpm


          posted @ 2007-05-25 23:48 liunix 閱讀(327) | 評(píng)論 (0)編輯 收藏
          一,3.12版

          1, 慢
              3.12版真的很慢,那就用ibm的jre吧,聽說(shuō)4.0就好了

          2, 類庫(kù)的引入
              project properties--->c/c++builder-->Tools setting選項(xiàng)中

          3, 2中的warning選項(xiàng)最好別改,否則build項(xiàng)目會(huì)有問題

          4, 剛上手的話,最好使用managed c project

          5, 問題binaries要變沒,那就換瀏覽視圖找到二進(jìn)制文件右鍵debug吧



          二,4,0 m版 

          總得來(lái)說(shuō),快了,功能多了,復(fù)雜了,可以直接用sun的jdk了,run/debug沒前一版方便了

          1, 配eclipse 3.3 m版

          2,   項(xiàng)目的配置界面變化不小

          3,  項(xiàng)目默認(rèn)不啟用自動(dòng)構(gòu)建

          4, 問題:加入線程庫(kù)的L和l后,編譯還會(huì)報(bào)找不到,一個(gè)鐘頭過(guò)去了
                             直接鏈接的字串中手工加上lpthread即可,這個(gè)應(yīng)該算是個(gè)偏方了。。。

          posted @ 2007-05-17 14:39 liunix 閱讀(1365) | 評(píng)論 (0)編輯 收藏
          顯示行號(hào):

          第一步:安裝setnu.el到/usr/share/emacs/site-lisp目錄下;
          第二步:在.emacs中添加
          (require 'setnu)
          (setnu-mode t)
          第三步:在啟動(dòng)emacs后M-x setnu-mode即可以!


          posted @ 2007-05-14 10:07 liunix 閱讀(158) | 評(píng)論 (0)編輯 收藏
          出現(xiàn)check sum metadata error 的時(shí)候:
          yum clean all

          posted @ 2007-05-14 10:05 liunix 閱讀(122) | 評(píng)論 (0)編輯 收藏
          1, 手工清除后,數(shù)據(jù)庫(kù)中還會(huì)存有記錄:
          select * from v$flash_recovery_area_usage;

          2, 然后:
          rman target /
          crosscheck archivelog all;
          delete expired archivelog all;

          說(shuō)明:2是修復(fù)1的辦法,也應(yīng)該是正常清除歸檔日志的辦法吧


          posted @ 2007-05-11 18:16 liunix 閱讀(2068) | 評(píng)論 (0)編輯 收藏
          1, 編譯通過(guò)helloworld
          cc hello.c -o b.out `pkg-config --cflags --libs gtk+-2.0`
          后面的``內(nèi)容主要是類庫(kù)和頭文件的引入,看來(lái)要仔細(xì)看看gcc的東西了

          posted @ 2007-04-30 11:22 liunix 閱讀(306) | 評(píng)論 (0)編輯 收藏
          1,啟用審計(jì)記錄
              alter system set audit_trail=DB   SCOPE=SPFILE                                  //audit_trail的可選值為:OS或者NONE  
              startup force

          2,  啟/禁用審計(jì)
              audit table by scott
              noaudit table by scott
          3,  查詢審計(jì)
              先從字典中找出audit的相關(guān)視圖
              dba_stmt_audit_opts                   關(guān)于已定義的審計(jì)
              dba_trail                                          已有審計(jì)的記錄


          ....這里是stmt審計(jì),其它種類審計(jì)待續(xù)...................

          posted @ 2007-04-27 10:06 liunix 閱讀(233) | 評(píng)論 (0)編輯 收藏
          一個(gè)月前裝ralis
              gem install rails --include-dependencies
               版本為1.2.1

          現(xiàn)在升級(jí)
              gem update rails --include-dependencies
              版本為1.2.3
          (反安裝gem uninstall ? -v=?, 要一個(gè)包一個(gè)包的來(lái))
          但原的程序是在1.1.4上做的

          出現(xiàn)問題,只好建了一個(gè)1.2.3的工程,將程序手工復(fù)制過(guò)來(lái),
          我是在fc上開發(fā),出現(xiàn)編碼錯(cuò)誤,在環(huán)境文件中加上
          $KCODE="none"
          即可

          附:gem 使用說(shuō)明

          gem --help 列出用法

          gem help commands 列出所有子命令

          gem help ${subcommand} 列出子命令用法



          posted @ 2007-04-23 19:05 liunix 閱讀(450) | 評(píng)論 (0)編輯 收藏
          1, realplayer直接下載安裝.bin即可
                 可能會(huì)輸入法有沖突,那么將realplay文件頭中加上export GTK_IM_MODULE=xim

          2, mplayer

          裝yum擴(kuò)展庫(kù)
                  rpm -ivh http://rpm.livna.org/livna-release-6.rpm
                  rpm -import http://rpm.livna.org/RPM-LIVNA-GPG-KEY
                  ( rpm -ivh http://ftp.freshrpms.net/pub/freshrpms/fedora/linux/6/freshrpms-release/freshrpms-release-1.1-1.fc.noarch.rpm 可選)
                  yum -y install mplayer
          裝maplayer菜單項(xiàng)
                 yum install mplayer-gui

                 yum install mplayerplug-in

          讓firefox正確打開mms媒體
                  地址欄:about:config
                  在顯示網(wǎng)頁(yè)的區(qū)域單擊右鍵,選擇新建字符串,串名是
                  network.protocol-handler.app.mms
                  串值是:
                  /usr/bin/mplayer

          posted @ 2007-04-19 20:35 liunix 閱讀(185) | 評(píng)論 (0)編輯 收藏
          一,聯(lián)機(jī)日志文件

          1,查看概要信息
              select l.group#,l.bytes/1024/1024 M,f.member from v$log l,v$logfile f
              where l.group#=f.group# order by 1

          2,增/刪一個(gè)新組
              alter database add logfile
              group 4
              ('/oracle/oradata/orcl/redo04.log')
              size 50M
              /
              系統(tǒng)會(huì)自動(dòng)創(chuàng)建文件  


              alter database drop logfile group 4
              /
              rm logfile redo04.log
              在fc6不知為何還要手工刪除

          3,為一個(gè)組增刪日志成員
             
              先建一個(gè)多文件的測(cè)試組,(前面的建的單文件的測(cè)試組增加成員時(shí)會(huì)報(bào)文件名字錯(cuò)誤), 可見日志組的成員數(shù)并不要求一致
              alter database add logfile
              group 4
              ('/oracle/oradata/orcl/redo0401.log',
              '/oracle/oradata/orcl/redo0402.log')
              size 50m

              增加文件(不用指定文件大小)
              alter database add logfile member
              '/oracle/oradata/orcl/redo0403.log'
             to group 4
              /
            
              刪除文件
              alter database drop logfile member '/oracle/oradata/orcl/redo0403.log'
              rm redo0403.log

          4, 重命名日志文件會(huì)用到 alter database rename file 'old' to 'new' ,過(guò)程麻煩,還不如刪了重建


          5, 清理日志組(刪除并重建)
                alter database clear logfile group 4
                /



          二,歸檔日志文件


          1,查看歸檔日志是否啟用的方法
                achive log list
                select log_mode from v$database

          2, db_recovery_file_dest == USE_DB_RECOVERY_FILE_DEST (地址)

          3, shutdown immediate
           
          4, startup mount

          5, alter database archivelog

          6, alter database open

          7,  alter database switch logfile  生成一個(gè)新的

          posted @ 2007-04-12 17:55 liunix 閱讀(1842) | 評(píng)論 (0)編輯 收藏
          1, 數(shù)據(jù)文件
                 dba_data_files
          2,日志文件
                v$log          大小
                v$logfile    路徑
          3,   控制文件
               show parameter control

          posted @ 2007-04-12 17:49 liunix 閱讀(204) | 評(píng)論 (0)編輯 收藏
          1, 找到glogin.sql

          設(shè)置:
              -- custom setup
          REM Number of lines of SELECT statement output before reprinting headers
          SET PAGESIZE 999

          REM Width of displayed page, expressed in characters
          SET LINESIZE 132

          REM Enable display of DBMS_OUTPUT messages. Use 1000000 rather than
          REM "UNLIMITED" for databases earlier than Oracle Database 10g Release 2
          SET SERVEROUTPUT ON SIZE UNLIMITED FORMAT WRAPPED

          REM Change default to "vi improved" editor
          DEFINE _EDITOR = /usr/bin/vim

          REM Format misc columns commonly retrieved from data dictionary
          COLUMN segment_name FORMAT A30 WORD_WRAP
          COLUMN object_name FORMAT A30 WORD_WRAP

          REM set the prompt (works in SQL*Plus from Oracle9i Database or later)
          SET SQLPROMPT "_USER'@'_CONNECT_IDENTIFIER > "


          2, c /a/b/g  替換

          3,   a [_][_] asdf  追加,注意兩個(gè)空格

          4,   column ${列名} format aNN  格式化字符
                 column ${列名} format 99999.99  格式化數(shù)字,一個(gè)9代表1位
          posted @ 2007-04-12 17:44 liunix 閱讀(176) | 評(píng)論 (0)編輯 收藏
          declare
              my_exception EXCEPTION;
              pragma EXCEPTION_INIT(my_exception,-20000);
          begin
              raise_application_error(-20000,'自定義錯(cuò)語(yǔ)');
          exception when my_exception then
              dbms_output.put_line('捕到了:'||sqlcode||sqlerrm);
          end;
          /


          posted @ 2007-04-12 16:48 liunix 閱讀(427) | 評(píng)論 (0)編輯 收藏
          操作手順:

          1, alter database back controlfile to trace

          2, show parameter user

                  user_dump_dest                       string      /oracle/admin/orcl/udump

          3, cd /oracle/admin/orcl/udmp

          4, ll | srot -k 6  (按日期排序文件,sort 的用法和手上的不一樣)



          二,多路復(fù)用控制文件

          1, 注意scope = spfile,若是init.ora文件,則必須關(guān)閉

          alter system set control_files=
          '/oracle/oradata/orcl/control01.ctl',
          '/oracle/oradata/orcl/control02.ctl',
          '/oracle/oradata/orcl/control03.ctl',
          '/oracle/oradata/orcl/control04.ctl'
           scope=spfile
          /

          這時(shí)show parameter control  顯示沿未更改

          2, shutdown immediate

          3,    cp control01.ctl control04.ctl

          4,  startup

          5,  show parameter control  顯示已經(jīng)修改
          posted @ 2007-04-11 19:17 liunix 閱讀(292) | 評(píng)論 (0)編輯 收藏
          裝apacheds時(shí)

          如果su root的號(hào),服務(wù)啟動(dòng)不了,報(bào)log文件無(wú)法寫的問題,不知道為什么

          但login root就沒有問題了,這幾天要搞清楚

          posted @ 2007-04-10 20:36 liunix 閱讀(147) | 評(píng)論 (0)編輯 收藏
          一,右鍵菜單

          右鍵菜單方法1:

          在 ~/.gnome2/nautilus-scripts 目錄下增加一個(gè)腳本文件,使之可執(zhí)行

              如: gnome-terminal --working-directory=$PWD


          右鍵菜單方法2:

          安裝一個(gè)插件
               
          yum -y install nautilus-open-terminal


          二,nautilus默認(rèn)顯示地址欄

          yum install gconf-editor
          運(yùn)行 gconf-editor打開配置管理器-apps-nautilus-preferences-always_use_location_entry此項(xiàng)勾選就是默認(rèn)顯示地址欄。


          三,總是以瀏覽文件夾的方式查看文件和目錄而不是每次啟一個(gè)新窗

          nautilus--編緝--首選項(xiàng)--行為--總是在瀏覽器窗口中打開    選中   即可

          posted @ 2007-04-06 09:01 liunix 閱讀(180) | 評(píng)論 (0)編輯 收藏
          有一個(gè)cmptradeservice的類
          deal(byte[] buffer)
          deal(isomsg msg)

          在windows下遠(yuǎn)程無(wú)事,到了fc下完蛋了,浪費(fèi)我了幾個(gè)hours...

          切忌:

          不要用hessian編寫多態(tài)的遠(yuǎn)程調(diào)用!!!!!!!!

          posted @ 2007-04-05 21:30 liunix 閱讀(207) | 評(píng)論 (0)編輯 收藏
          理論說(shuō)明:

          ~/.vimrc 是配置文件,一般可設(shè)置
          set nu
          set shiftwidth=4
          set tabstop=4

          一,打標(biāo)記:
              1, m$標(biāo)記名鍵
               2, '單引號(hào)$標(biāo)記名鍵            即可定位

          二,選取復(fù)制
               1,按v可視
              2,  選完按y 復(fù)制
              4,  p粘貼

          三,清空緩沖區(qū)(%代表1,$ 對(duì)其它命令亦可用)
              %d

          四,列編緝,超好用
              在光標(biāo)指定列上ctrl+v
              用j/k移動(dòng)光標(biāo)到合適的行上
              按I(即shift+i)輸入內(nèi)容
              按ESC兩次,搞定輸入

              刪除的話
              在移動(dòng)j/k選完行后再h/l(即小寫L)選列,會(huì)出現(xiàn)一個(gè)可視區(qū),直接按d即可刪除

          五,大小寫轉(zhuǎn)換
              先ctr+v 選中文本,然后用命令gu或gU改變成小寫或大寫
              命令guu將一行全改成小寫,gUU將一行全改成大小
              guw和gUw改一個(gè)word
              gggUG和ggguG改變整個(gè)緩沖區(qū)

          例子: vi 綜合操作舉例

          原文

                          <entry key="0200/000000" value-ref="baseValidator" />
                          <entry key="0100/300000" value-ref="baseValidator" />
                          <entry key="0200/400000" value-ref="twoStepValidator" />
                          <entry key="0200/020000" value-ref="twoStepValidator" />
                          <entry key="0100/120000" value-ref="twoStepValidator" />
                          <entry key="0200/420000" value-ref="twoStepValidator" />
                                                                             
                          <entry key="0400/000000" value-ref="baseValidator" />
                          <entry key="0400/300000" value-ref="baseValidator" />
                          <entry key="0400/400000" value-ref="twoStepValidator" />
                          <entry key="0400/020000" value-ref="twoStepValidator" />
                          <entry key="0400/120000" value-ref="twoStepValidator" />
                          <entry key="0400/420000" value-ref="twoStepValidator" />

                                  props.setProperty("","");
                                  props.setProperty("","");
                                  props.setProperty("","");
                                  props.setProperty("","");
                                  props.setProperty("","");
                                  props.setProperty("","");


          目標(biāo)文本:
                              props.setProperty("0200/000000","0400/000000");
                              props.setProperty("0100/300000","0400/300000");
                              props.setProperty("0200/400000","0400/400000");
                              props.setProperty("0200/020000","0400/020000");
                              props.setProperty("0100/120000","0400/120000");
                              props.setProperty("0200/420000","0400/420000");

          操作:
           
          1  ,替換: % s/<entry key="http://g
          2,     替換: % s/" .*$//g  (中間有一空格,  引號(hào)和控格在vi中都不是元字符)
          3,  給props.setPropery("","") 中的每一對(duì)引號(hào) 中間加一空格(列編緝),否則會(huì)被覆蓋
          4, 拷貝相應(yīng)上面的塊到下面的塊中



          后記:
          1,今天不小心將vim的前端字體變成黃色了,看著難受呀,搜了半天也沒解決,不小心打了個(gè):color ,竟然好了
          posted @ 2007-04-03 19:05 liunix 閱讀(426) | 評(píng)論 (0)編輯 收藏
          設(shè)置:
          ruby PATH
          make PATH
          oracle_home PATH
          ld_libraray_path  (看指南)


          裝:
          ruby_devel會(huì)提示依賴,那就yum


          然后make,make install
          最后會(huì)說(shuō)一個(gè)permision的問題對(duì)liboci.so

          是selinux作怪

          操作:
          管理---》安全級(jí)別和防火墻->selinux簽-->改成允許-->點(diǎn)擊下面一個(gè)箭頭--》內(nèi)存保護(hù)---->點(diǎn)上“允許無(wú)限制的可執(zhí)行文件使用沒有打textrel_shlib_t標(biāo)簽的需要文字重定位的庫(kù)文件”





          posted @ 2007-04-02 20:05 liunix 閱讀(272) | 評(píng)論 (0)編輯 收藏
          1,java_home/jre/lib/fonts下建立fallback
          2, 拷貝C:\WINDOWS\Fonts下的simsun.ttc文件到剛建好的目錄下


          完事兒



          posted @ 2007-04-02 14:18 liunix 閱讀(297) | 評(píng)論 (0)編輯 收藏
          sun.reflect.Reflection.getCallerClass(0)

          StackTraceElement stack[] = (new Throwable()).getStackTrace();?
          posted @ 2007-03-30 08:37 liunix 閱讀(323) | 評(píng)論 (0)編輯 收藏
          一,ECLIPSE

          1,Eclipse 和 wtp 或 myeclipse(可能有問題,但jsp editor 至少可用) 結(jié)合

          2,sysdeo tomcat plugin for Eclipse 3.2

          3,subclipse 1.2 (要安裝javahl庫(kù),指定LA_LIBRARY_PATH=/usr/lib,具體看subclipse faq)


          二,ORACLE
               安裝oracle sql developer for linux


          三,PDF,CHM
               PDF自帶的文檔查看器即可用,也可去adobe下載中文的reader
               chm---> yum install chmsee

          四,文本編緝
                vi, gedit
                圖形的vim是vim-X11包(而不是gvim),如果沒安裝yum -y install vim-X11

          五,ruby & rails & radrails

                 1, yum install ruby ruby-libs ruby-devel ruby-irb ruby-ri ruby-docs      
                  2, 下載gem,按文檔安裝
                  3, gem install rails
                  4, radrails
                  5, oci for linux(注意ruby-devel包依賴、oracle lib路徑 和 裝后selinux問題)

          六,通訊  gaim(1.5.0)
             ./configure時(shí)一定要指定下面的參數(shù)(均在/usr/include和/usr/lib下)
            --with-nspr-includes=PREFIX     Specify location of Mozilla nspr4 includes.
            --with-nspr-libs=PREFIX         Specify location of Mozilla nspr4 libs.
            --with-nss-includes=PREFIX      Specify location of Mozilla nss3 includes.
            --with-nss-libs=PREFIX          Specify location of Mozilla nss3 libs.

          七,瀏覽器  firefox

          八,NTFS盤          yum install ntfs-3g

          posted @ 2007-03-27 21:02 liunix 閱讀(367) | 評(píng)論 (0)編輯 收藏
          1,裝庫(kù)(盤里帶的就行)
          compat-gcc-7.3-2.96.122
          compat-gcc-c++-7.3-2.96.122
          compat-libstdc++-7.3-2.96.122
          compat-libstdc++-devel-7.3-2.96.122
          compat-db-4.0.14.5

          libXp.so.6

          libaio //建庫(kù)用


          2,三者同名
          hostname
          /etc/sysconfig/newwork
          /etc/hosts

          3,建用戶
          groupadd dba
          useradd oracle -G dba
          passwd oracle

          4, 設(shè)變量
          export ORACLE_BASE=/u01/app/oracle
          export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
          export ORACLE_SID=TESTFC
          export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
          export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
          #export LC_CTYPE=en_US(安裝臨時(shí)需要)

          export CLASSPATH=$ORACLE_HOME/jre
          export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
          export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
          export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
          export JAVA_HOME=$ORACLE_HOME/jre/1.4.2
          export JRE=$JAVA_HOME/bin/java
          export NETTOOLSDIR=$ORACLE_HOME/network/tools


          5, 準(zhǔn)備安裝
          mkdir /oracle
          chown -R dba.oracle /oracle
          chmod +x runinstall(直接解壓zip不需要)
          chmod +x install/*


          6,安裝
          跳過(guò)檢查 runinstall -IgnoreSysPreReqs

          (安裝日志:界面提示)

          7,開放端口
          /etc/sysconfig/iptables 打開端口:1158,5560,1521

          8,建庫(kù)
          dbca

          9,配置listener
          netca

          10,啟動(dòng)web控制臺(tái)
          emctl start dbconsole //1158
          posted @ 2007-03-08 08:49 liunix 閱讀(668) | 評(píng)論 (0)編輯 收藏
          在線廣播


          中國(guó)國(guó)際廣播電臺(tái):
          mms://living.chinabroadcast.cn/inet

          hit fm:
          mms://live.hitfm.cn/fm887

          cri easy fm:
          mms://enmms.chinabroadcast.cn/fm91.5




          在線電視


          cctv-9

          mms://winmedia.cctv.com.cn/live3

          posted @ 2007-02-26 17:50 liunix 閱讀(174) | 評(píng)論 (0)編輯 收藏
          ???? < target? name ="jdoc" >
          ????????
          < javadoc?
          ??????????? destdir ="${basedir}/doc/api"
          ????????????author
          ="true"
          ????????????version
          ="true"
          ????????????use
          ="true"
          ??????????? fork="true"
          ??? ?? ?? ? forkmode="perBatch"
          ????????????windowtitle="Project?API">
          ????????????
          <fileset?dir="${basedir}/src"?includes="**/*.java"/>
          ????????????
          <classpath?refid="classpath"></classpath>
          ????????????
          <doctitle><![CDATA[<h1>Project?API</h1>]]></doctitle>
          ????????????
          <bottom><![CDATA[<i>Copyright?&#169;?2005</i>]]></bottom>
          ????????
          </javadoc>
          ????
          </target>

          1,源文通過(guò)fileset指定較為靈活
          2,注意將項(xiàng)目的classpath加入其內(nèi)
          3,對(duì)fork和formode的使用主要是為測(cè)試性能考慮(如有數(shù)據(jù)庫(kù)連接靜態(tài)初始化之類的操作會(huì)大大加快速度)

          posted @ 2007-02-13 11:36 liunix 閱讀(223) | 評(píng)論 (0)編輯 收藏
          ???? < target? name ="test" >
          ????????
          < junit? printsummary ="on" ?failureproperty ="testsFailed" >
          ????????????
          < classpath? refid ="classpath" ? />
          ????????????
          < formatter? type ="xml" />
          ????????????
          < batchtest? todir ="${basedir}/doc/junitReport" >
          ????????????????
          < fileset? dir ="${basedir}/web/WEB-INF/classes" ?includes ="**/*Test.class" ? />
          ????????????
          </ batchtest >
          ????????
          </ junit >
          ????????
          < junitreport? todir ="${basedir}/doc/junitReport" >
          ????????????
          < fileset? dir ="${basedir}/doc/junitReport" >
          ????????????????
          < include? name ="TEST-*.xml" />
          ????????????
          </ fileset >
          ????????????
          < report? todir ="${basedir}/doc/junitReport/html" />
          ????????
          </ junitreport >
          ????
          </ target >
          1,命名TEST-*.xml大小寫有別
          2,有可能須要xalan放到eclipse的ant/lib下(不確定)
          3, 和cruisecontrol結(jié)合使用時(shí)junitreport就不要了,否則會(huì)生成雙分的測(cè)試結(jié)果
          posted @ 2007-02-12 14:09 liunix 閱讀(334) | 評(píng)論 (0)編輯 收藏
          rem ---------------------------------------------------------------------------
          rem 和eclipse建立遠(yuǎn)程調(diào)試的方法,管用
          rem ---------------------------------------------------------------------------
          SET CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000

          加入catalina.bat(在CATALINA_OPTS使用之前)文件

          在eclipse的remote debug設(shè)置對(duì)應(yīng)的主機(jī)地址和端口號(hào)即可

          和tomcat的命令行方式配合使用,可以省插件了
          posted @ 2007-01-24 17:29 liunix 閱讀(427) | 評(píng)論 (0)編輯 收藏
          ??? <!--ssl連接,如果要驗(yàn)證客戶端證書,只需要將clientauth設(shè)為true即可-->
          ??? <Connector port="8443"
          ?????????????? maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
          ?????????????? enableLookups="false" disableUploadTimeout="true"
          ?????????????? acceptCount="100" debug="0" scheme="https" secure="true"
          ?????????????? clientAuth="false" sslProtocol="TLS"
          ?? ??? ??? ??? keystoreFile="/D:/tomcat_command/teststore"
          ?? ??? ??? ??? keystorePass="125521"
          ?? ??? ??? ??? />
          posted @ 2006-12-25 16:08 liunix 閱讀(413) | 評(píng)論 (0)編輯 收藏
          1,按說(shuō)明安裝ruby的apache mod
          2,配置文件如下:
           1  #########################################################
           2  #     ruby cgi 配置
           3  #########################################################
           4  LoadModule ruby_module /usr/lib/httpd/modules/mod_ruby.so
           5  
           6  <IfModule mod_ruby.c>
           7      RubyRequire apache/ruby-run
           8      <Files *.rbx><!--不要誤以為源文件以.rbx結(jié)尾,還是.rb(在windows下要用.rb)-->
           9          SetHandler ruby-object
          10          RubyHandler Apache::RubyRun.instance
          11      </Files>
          12      RubyRequire apache/eruby-run
          13      <Files *.rhtml>
          14          SetHandler ruby-object
          15          RubyHandler Apache::ERubyRun.instance
          16      </Files>
          17      #for debug
          18      RubyRequire auto-reload
          19  </IfModule>


          windows:說(shuō)明
          先裝:RubyForApache-1.3.1.exe
          后裝:eruby-1.0.5-i386-mswin32-1.8.zip
          posted @ 2006-12-12 15:56 liunix 閱讀(1122) | 評(píng)論 (0)編輯 收藏
          命令形式:
          java -classpath D:\tomcat5\bin\bootstrap.jar;D:\jdk15\lib\tools.jar -Dcatalina.home=D:\tomcat5 -Dcatalina.base=E:\webwork1_base? org.apache.catalina.startup.Bootstrap -config E:\webwork1_base\conf\tomcat_server.xml start

          說(shuō)明:
          1,catalina.base要有一些類似tomcat安裝目錄的結(jié)構(gòu)和文件
          ??? ?? --conf?? ?? #從安裝目錄將文件拷過(guò)來(lái)
          ??? ?? --webapps?? #最好將應(yīng)用放在這下面
          ??? ?? --work????? #運(yùn)行時(shí)目錄
          2,tomcat_server.xml文件的最后加入一個(gè)類似的context
          <Context debug="0" docBase="/E:/webwork1_base/webapps/webwork1/web/" path="" reloadable="false" workDir="/E:/webwork1_base/work/webwork1/work"/>

          3,關(guān)閉方式
          把start換成stop就行了

          4,有啥用?
          想試驗(yàn)tomcat配置的,便可不用改原server.xml文件而隨心所欲了
          還有自動(dòng)構(gòu)造建布署等等啦
          posted @ 2006-12-11 22:21 liunix 閱讀(2446) | 評(píng)論 (0)編輯 收藏
          主站蜘蛛池模板: 柳州市| 项城市| 定西市| 依兰县| 铁岭县| 广元市| 尤溪县| 易门县| 墨竹工卡县| 吉首市| 桃园市| 枣强县| 喀喇沁旗| 安吉县| 大新县| 东源县| 新野县| 和平县| 砀山县| 延寿县| 丘北县| 麻城市| 四子王旗| 凉城县| 石阡县| 丹阳市| 平乡县| 华蓥市| 金华市| 平昌县| 沙湾县| 五指山市| 沙洋县| 盐池县| 舒兰市| 清丰县| 荔浦县| 资兴市| 阳东县| 岑巩县| 水城县|