|

Oracle 查询索引

Select index_name FROM user_indexes Where table_name='table_name';

analyze table t1 compute statistics for table for all indexes for all indexed columns;

set autotrace traceonly explain;


http://www.cnblogs.com/dongzhiquan/archive/2012/01/20/2328365.html


http://www.laoxiong.net/null_value_index.html

固定链接 | 评论: 0 | 引用: 0 | 查看次数: 22

安装subversion 笔记

 

 注: 安装subversion 必需要安装apache, apache安装见   http://www.javaen.com/article/other/62.html

  Subersion    http://subversion.tigris.org/  下载源代码包

  subversion-1.7.8.tar.gz

  subversion-deps-1.6.19.tar.gz

 

  tar - zxvf subversion-1.7.8.tar.gz

  tar -zxvf subversion-deps-1.6.19.tar.gz   http://archive.apache.org/dist/subversion/

  cd  subversion-deps-1.6.19 

  目录下subversion-deps-1.6.19/ neon  复制到目录下  /home/tztrans/sw/subversion-1.7.8/subversion

  命令 : cp -R neon  /home/tztrans/sw/subversion-1.7.8/subversion  

   进入neon目录,执行configure,生成Makefile文件(/home/tztrans/sw/subversion-1.7.8/subversion/neon)

  ./configure --prefix=/home/svn/subversion/neon --with-libxml2=/home/svn/apache2x/libxml2 --with-expat=/home/svn/subversion/expat

  make

  make install

  安装 expat-2.1.0.tar.gz

  http://sourceforge.net/projects/expat/files/expat/2.1.0/expat-2.1.0.tar.gz/download

  cd  subversion-1.7.8

./configure --prefix=/home/tztrans/tools/subversion --with-apr=/home/tztrans/apache2x/apr --with-apr-util=/home/tztrans/apache2x/apr-util --with-apxs=/home/tztrans/apache2x/bin/apxs

 make

 注make出错,提示configure: error: Subversion requires SQLite ,

 下载 SQLIte  :网址:http://www.sqlite.org/download.html 【 wget http://www.sqlite.org/sqlite-autoconf-3071501.tar.gz】

  ./configure --prefix=/home/tztrans/tools/sqlite

  make

  make install

./configure --prefix=/home/tztrans/tools/subversion --with-apr=/home/tztrans/apache2x/apr --with-apr-util=/home/tztrans/apache2x/apr-util --with-apxs=/home/tztrans/apache2x/bin/apxs --with-sqlite=/home/tztrans/tools/sqlite  --with-neon=/home/tztrans/tools/subversion/neon

  make 

 make install 

 

 

 

 

固定链接 | 评论: 0 | 引用: 0 | 查看次数: 28

apache 安装配置

 1. 安装 apr-1.4.6

./configure --prefix=/home/tztrans/apache2x/apr
make
make install
 
2. 安装 apr-util-1.5.1
./configure --prefix=/home/tztrans/apache2x/apr-util --with-apr=/home/tztrans/apache2x/apr
make 
make install
 
3. 安装 pcre-8.32
./configure --prefix=/home/tztrans/apache2x/pcre
make 
make install
 
4. 安装 libxml2-2.9.0
./configure --prefix=/home/tztrans/apache2x/libxml2
这里会报错【/bin/rm: cannot remove `libtoolT’: No such file or directory】
【 解决方案:configure,把 $RM “$cfgfile” 那17035行删除掉,重新再运行 ./configure 就可以了】
make
make install
 
 
5. 安装 httpd-2.4.3
./configure --prefix=/home/tztrans/apache2x/ --with-apr=/home/tztrans/apache2x/apr --with-apr-util=/home/tztrans/apache2x/apr-util --with-pcre=/home/tztrans/apache2x/pcre --with-libxml2=/home/tztrans/apache2x/libxml2
make
make install
 
6. 安装 mod_proxy_html/mod_proxy_html.c
/home/tztrans/apache2x/bin/apxs -c -I/home/tztrans/apache2x/libxml2/include/libxml2/ -i -I. mod_proxy_html.c
 
7. 安装 mod_proxy_html/mod_xml2enc.c
/home/tztrans/apache2x/bin/apxs -c -I/home/tztrans/apache2x/libxml2/include/libxml2/ -i -I. mod_xml2enc.c
 
固定链接 | 评论: 0 | 引用: 0 | 查看次数: 27

nginx 安装并配置

一. 下载相关包
     1. 依赖包 pcre包    网址:http://www.pcre.org/
     2. 依赖包 zlib包     网址:http://zlib.net/
     3. 依赖包 openssl 包  网址:http://www.openssl.org
     4. 工具   网址:http://subversion.apache.org
     4.  nginx         下载网址: http://nginx.org
二.  安装
      假设 nginx  安装在 /home/tztrans 用户下  nginx 目前
     1. 安装pcre
          ./configure --prefix=/home/tztrans/nginx/pcre
          make
          make install  

     2. 安装zlib
         tar -zxvf zlib-1.2.7.tar.gz
         cd zlib-1.2.7
          ./configure --prefix=/home/tztrans/nginx/zlib
         make
         make install

      3. 安装subversion, 见 (http://www.javaen.com/article/other/63.html)
      
      4. 下载html内容替换模块(官方模块不支持多替换)
          svn checkout http://substitutions4nginx.googlecode.com/svn/trunk/ /home/tztrans/sw/substitutions4nginx-read-only      

      
      5. 安装 openssl
          ./config --prefix=/home/tztrans/nginx/openssl  
          make
          make install

      6. 安装  googlepreftools 下载:http://code.google.com/p/gperftools/downloads
        wget http://gperftools.googlecode.com/files/gperftools-2.0.tar.gz
         tar -zxvf gperftools-2.0.tar.gz
         cd gperftools-2.0
          ./configure --prefix=/home/tztrans/nginx/gperftools
         make
         make install

     3. 安装 nginx
          复制 cp -R /home/tztrans/sw/substitutions4nginx-read-only /home/tztrans/nginx/thirdsources
          复制  cp -R /home/tztrans/sw/openssl-1.0.1c  /home/tztrans/nginx/thirdsources
          复制  cp -R /home/tztrans/sw/pcre-8.32  /home/tztrans/nginx/thirdsources
          复制  cp -R  /home/tztrans/sw/zlib-1.2.7 /home/tztrans/nginx/thirdsources

.
./configure --prefix=/home/tztrans/nginx  --pid-path=/home/tztrans/nginx/nginx.pid  --with-pcre=/home/tztrans/nginx/thirdsources/pcre-8.32  --with-zlib=/home/tztrans/nginx/thirdsources/zlib-1.2.7 --add-module=/home/tztrans/nginx/thirdsources/substitutions4nginx-read-only --with-openssl=/home/tztrans/nginx/thirdsources/openssl-1.0.1c --with-http_ssl_module --with-ipv6 --http-client-body-temp-path=/home/tztrans/nginx/systemp/clientbody_temp --http-proxy-temp-path=/home/tztrans/nginx/systemp/proxy_temp --http-fastcgi-temp-path=/home/tztrans/nginx/systemp/fastcgi_temp --http-uwsgi-temp-path=/home/tztrans/nginx/systemp/uwsgi_temp --http-scgi-temp-path=/home/tztrans/nginx/systemp/scgi_temp  --with-http_ssl_module  --with-http_sub_module --with-http_stub_status_module --user=tztrans --group=users

          make
           make install
         备注: 如果有错误【make -f objs/Makefile
make[1]: Entering directory `/home/tztrans/sw/nginx-1.2.6'
cd /home/tztrans/nginx/pcre \
&& if [ -f Makefile ]; then make distclean; fi \
&& CC="gcc" CFLAGS="-O2 -fomit-frame-pointer -pipe " \
./configure --disable-shared
/bin/sh: ./configure: 没有那个文件或目录
make[1]: *** [/home/tztrans/nginx/pcre/Makefile] 错误 127
make[1]: Leaving directory `/home/tztrans/sw/nginx-1.2.6'
make: *** [build] 错误 2】
        解决办法(是因为pcre 要指向源码目录,而不是安装目录)
        
  
  
    

固定链接 | 评论: 0 | 引用: 0 | 查看次数: 40

apache 虚拟主机配置2

<VirtualHost *:8081>
    ProxyPreserveHost On
    ServerName lt3g.chainbuy.cn
    RewriteEngine On
    RewriteRule  ^/rudd-web(.*) http://132.35.76.52:9081/rudd-web$1 [P,L]

    RewriteRule ^/(.*) http://esales.10010.com/$1 [P,L]
    ProxyPassReverseCookieDomain 10010.com lt3g.chainbuy.cn
    ProxyPassReverseCookiePath / /
  <Location ~ "^(?!\/Js\/(datepicker|time)\/)">
      ProxyHTMLEnable On
       ProxyHTMLExtended On
       ProxyHTMLMeta On
       ProxyHTMLDoctype XHTML Legacy
       ProxyHTMLURLMap http://132.35.76.52:9081 http://lt3g.chainbuy.cn:8081 e
       RequestHeader    unset  Accept-Encoding
   </Location>
  ErrorLog "|/home/tztrans/apache2x/bin/rotatelogs /home/tztrans/apache2x/logs/10010.com-error_%y-%m-%d.log 86400"
  CustomLog "|/home/tztrans/apache2x/bin/rotatelogs /home/tztrans/apache2x/logs/10010-access_%y-%m-%d.log 86400" common
</VirtualHost>

<VirtualHost *:80>
    ProxyPreserveHost On
    ServerName www.g.com
    RewriteEngine on
    RewriteRule ^/m(.*) http://127.0.0.1:8080/m$1 [L,R=301,P,NC]
    RewriteRule (.*) http://127.0.0.1:8080/$1 [L,R=301,P,NC]
    ErrorLog "d:/dummy-host2.javaen.com-error.log"
    CustomLog "d:/dummy-host2.javaen.com-access.log" common
</VirtualHost>

<VirtualHost *:80>
    ProxyPreserveHost On
    ServerName www.g.com  
    ProxyPass / http://127.0.0.1:8080/a/
    ProxyPassReverse / http://127.0.0.1:8080/a/
    ProxyPassReverseCookieDomain 127.0.0.1:8080/a/ www.g.com
    ProxyPassReverseCookiePath / /
    ErrorLog "d:/dummy-host2.javaen.com-error.log"
    CustomLog "d:/dummy-host2.javaen.com-access.log" common  
</VirtualHost>

<VirtualHost *:80>
    ProxyPreserveHost On
    ServerName www.g.com  
    ProxyPass /manager/ http://127.0.0.1:8080/m/
    ProxyPassReverse /manager/ http://127.0.0.1:8080/m/
    ProxyPassReverseCookieDomain 127.0.0.1:8080/m/ www.g.com
    ProxyPassReverseCookiePath / /manager/
    ErrorLog "d:/dummy-host2.javaen.com-error.log"
    CustomLog "d:/dummy-host2.javaen.com-access.log" common  
</VirtualHost>

<VirtualHost *:80>
    ProxyPreserveHost On
    ServerName lt3g.g.com  
    RewriteEngine on
    RewriteRule  ^/rudd-web(.*) http://132.35.76.52:9081/rudd-web$1 [L,R=301,P,NC]
    RewriteRule ^/(.*) http://esales.10010.com/$1 [L,R=301,P,NC]
    ProxyPassReverseCookieDomain 10010.com lt3g.g.com
    ProxyPassReverseCookiePath / /
    <Location />  
     ProxyHTMLEnable On
     ProxyHTMLMeta On
     ProxyHTMLExtended On
     ProxyHTMLURLMap http://132.35.76.52:9081 http://lt3g.g.com
    </Location>  
    ErrorLog "d:/dummy-host2.javaen.com-error.log"
    CustomLog "d:/dummy-host2.javaen.com-access.log" common  
</VirtualHost>

  <VirtualHost *:8080>
    ProxyPreserveHost On
    ServerName lt3g.chainbuy.net
    RewriteEngine on
    RewriteRule  ^/rudd-web(.*) http://132.35.76.52:9081/rudd-web$1 [L,R=301,P,NC]
    RewriteRule ^/(.*) http://esales.10010.com/$1 [L,R=301,P,NC]
    ProxyPassReverseCookieDomain 10010.com lt3g.chainbuy.net
    ProxyPassReverseCookiePath / /
    <Location />
       ProxyHTMLEnable On
       ProxyHTMLExtended On
       ProxyHTMLURLMap http://132.35.76.52:9081 http://lt3g.chainbuy.net:8080
RequestHeader    unset  Accept-Encoding
</Location>
    ErrorLog "|/home/tzweb/apache2-http-2.4.3/bin/rotatelogs /home/tzweb/apache2-http-2.4.3/logs/lt3g.chainbuy.net-error_%y-%m-%d.log 86400"
    CustomLog "|/home/tzweb/apache2-http-2.4.3/bin/rotatelogs /home/tzweb/apache2-http-2.4.3/logs/lt3g.chainbuy.net-access_%y-%m-%d.log 86400" common
</VirtualHost>

<VirtualHost *:8081>
    ProxyPreserveHost On
    ServerName lt3g.chainbuy.cn
    RewriteEngine On
    RewriteRule  ^/rudd-web(.*) http://132.35.76.52:9081/rudd-web$1 [P,L]

    RewriteRule ^/(.*) http://esales.10010.com/$1 [P,L]
    ProxyPassReverseCookieDomain 10010.com lt3g.chainbuy.cn
    ProxyPassReverseCookiePath / /
  <Location ~ "^(?!\/Js\/(datepicker|time)\/)">
      ProxyHTMLEnable On
       ProxyHTMLExtended On
       ProxyHTMLMeta On
       ProxyHTMLDoctype XHTML Legacy
       ProxyHTMLURLMap http://132.35.76.52:9081 http://lt3g.chainbuy.cn:8081 e
       RequestHeader    unset  Accept-Encoding
   </Location>
  ErrorLog "|/home/tztrans/apache2x/bin/rotatelogs /home/tztrans/apache2x/logs/10010.com-error_%y-%m-%d.log 86400"
  CustomLog "|/home/tztrans/apache2x/bin/rotatelogs /home/tztrans/apache2x/logs/10010-access_%y-%m-%d.log 86400" common
</VirtualHost>


http://xinkang120.blog.163.com/blog/static/1946682232012118111458471/
http://www.blogjava.net/libin2722/articles/344405.html

固定链接 | 评论: 0 | 引用: 0 | 查看次数: 68

apache 反向代理 tomcat会话丢失

关键在于tomcat 中的应用context 路径是 /m, 而外部访问context 路径是 / ,JSESSIONID 的值从浏览器经过反向代理到达tomcat时,由于cookie时内外路径不一致,使tomcat每次重写设置JSESSIONID 的值,导致session丢失现象,在apache VirtualHost中需要通过ProxyPassReverseCookiePath  指令做一个路径映射,详细如下:
    ProxyPreserveHost On
    ProxyPass / http://127.0.0.1:8080/m/
    ProxyPassReverse / http://127.0.0.1:8080/m/
    ProxyPassReverseCookieDomain locahost www.domain.cn
    ProxyPassReverseCookiePath /m /

固定链接 | 评论: 0 | 引用: 0 | 查看次数: 62

java 快速开发项目

固定链接 | 评论: 0 | 引用: 0 | 查看次数: 45

KindEditor 编辑器

固定链接 | 评论: 0 | 引用: 0 | 查看次数: 42

Linux学习过程

掌握至少50个以上的常用命令
理解shell管道"|",文件流重定向">"及追加">>"等
熟悉Gnome/KDE等X-windows桌面环境操作
掌握.tgz.rpm.biz等软件包的常用安装方法
学习添加外设,安装设备驱动程序(比如modem)

固定链接 | 评论: 0 | 引用: 0 | 查看次数: 17

CQRS-待续

固定链接 | 评论: 0 | 引用: 0 | 查看次数: 20