Thursday, April 30, 2009
complie tpcw java using gij
javac -classpath /root/setup/apache-tomcat-5.5.27/common/lib/servlet-api.jar:/root/setup/tpc-w/src/servlets/ *.java
gij connect mysql using jdbc
please using mysql-connector-java-3.0.17-ga-bin.jar
mysql jdbc driver version 3.1, 5.0, 5.1 all not available.
java -cp .:/root/setup/mysql-connector-java-3.0.17-ga/mysql-connector-java-3.0.17-ga-bin.jar TPCW_Populate
mysql -V
mysql Ver 14.7 Distrib 4.1.12, for unknown-linux-gnu (sparc) using readline 4.3
gij --version
java version "1.4.2"
gij (GNU libgcj) version 4.1.2
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
mysql jdbc driver version 3.1, 5.0, 5.1 all not available.
java -cp .:/root/setup/mysql-connector-java-3.0.17-ga/mysql-connector-java-3.0.17-ga-bin.jar TPCW_Populate
mysql -V
mysql Ver 14.7 Distrib 4.1.12, for unknown-linux-gnu (sparc) using readline 4.3
gij --version
java version "1.4.2"
gij (GNU libgcj) version 4.1.2
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Tuesday, April 28, 2009
setup tomcat under sparc linux
1. install gcc, g++, gcj, gij 4.1.2
../gcc-4.1.2/configure --prefix=/opt/gcc-4.1.2 --program-suffix=4.1.2 --host=sparc-redhat-linux --build=sparc-redhat-linux --target=sparc-redhat-linux
2. install java compat
3. export JAVA_HOME=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0
4. download apache-tomcat-5.5.27.tar.gz and apache-tomcat-5.5.27-compat.tar.gz
5. vi bin/setclasspath.sh
_RUNJAVA='/opt/gcc-4.1.2/bin/gij4.1.2'
6. ./startup.sh
../gcc-4.1.2/configure --prefix=/opt/gcc-4.1.2 --program-suffix=4.1.2 --host=sparc-redhat-linux --build=sparc-redhat-linux --target=sparc-redhat-linux
2. install java compat
3. export JAVA_HOME=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0
4. download apache-tomcat-5.5.27.tar.gz and apache-tomcat-5.5.27-compat.tar.gz
5. vi bin/setclasspath.sh
_RUNJAVA='/opt/gcc-4.1.2/bin/gij4.1.2'
6. ./startup.sh
Sunday, April 26, 2009
URL redirect 301 by .htaccess file
RewriteEngine On
RewriteCond %{HTTP_HOST} ^francetop.net [NC]
RewriteRule ^(.*)$ http://www.francetop.net/$1 [L,R=301]
Reference
http://www.webweaver.nu/html-tips/web-redirection.shtml
Thursday, April 23, 2009
mysql slow queries log
1. config start slow query log
vi my.cnf
[mysqld]
set-variable=long_query_time=1
log-slow-queries=/home/www/log/mysql-log-slow-queries.log
2. restart mysql server
3. setup mysqlsla
yum install perl-DBI perl-DBD-MySQL perl-DBD-Pg
wget http://hackmysql.com/scripts/mysqlsla
4. using mysqlsla parse mysql slow query log
./mysqlsla-2.03/bin/mysqlsla --user xxx --password -lt slow --ex mysql-log-slow-queries.log --socke=/tmp/mysql.sock
./mysqlsla-1.8-DEBUG --user xxx --password --slow mysql-log-slow-queries.log --socke=/tmp/mysql.sock
vi my.cnf
[mysqld]
set-variable=long_query_time=1
log-slow-queries=/home/www/log/mysql-log-slow-queries.log
2. restart mysql server
3. setup mysqlsla
yum install perl-DBI perl-DBD-MySQL perl-DBD-Pg
wget http://hackmysql.com/scripts/mysqlsla
4. using mysqlsla parse mysql slow query log
./mysqlsla-2.03/bin/mysqlsla --user xxx --password -lt slow --ex mysql-log-slow-queries.log --socke=/tmp/mysql.sock
./mysqlsla-1.8-DEBUG --user xxx --password --slow mysql-log-slow-queries.log --socke=/tmp/mysql.sock
web server performance analysis
1. check system load
w
2. check cpu utilization
ps
3. check memory usage and swap disk usage
w
2. check cpu utilization
ps
3. check memory usage and swap disk usage
Monday, April 13, 2009
eAccelerator log
eAccelerator will write many log on apache error_log, link this:
EACCELERATOR hit:"/usr/local/www/xxxx.php"
To avoid this,
add option
eaccelerator.debug="0"
to your server php.ini configure.
Friday, April 10, 2009
HTTP Status Code Definitions
301 Moved Permanently
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
Chinese character UTF8 encoding
http://theorem.ca/~mvcorks/cgi-bin/unicode.pl.cgi?start=4E00&end=9FFF
http://www.zhouhaihe.com/tool/UTF-8.htm
http://www.dc9.cn/post/85.html
http://www.zhouhaihe.com/tool/UTF-8.htm
http://www.dc9.cn/post/85.html
Thursday, April 9, 2009
ssh
problem:
ssh_exchange_identification: Connection closed by remote host
Check /etc/hosts.allow and /etc/hosts.deny.
/etc/init.d/sshd restart
/etc/ssh/sshd_config
ssh_exchange_identification: Connection closed by remote host
Check /etc/hosts.allow and /etc/hosts.deny.
/etc/init.d/sshd restart
/etc/ssh/sshd_config
Monday, April 6, 2009
simics usage
- start
continue
- copy file into simics
new-file-cdrom setup.iso
cd0.insert setup
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
- network
list-port-forwarding-setup
connect-real-network-port-in ethernet-link=link0 target-ip=10.10.0.12 target-port=8080 host-port=4880 -tcp
ifconfig eth0 10.10.0.12 netmask 255.255.255.0 broadcast 10.10.0.255
- setup new OS
new-file-cdrom install-sparc64-universal-2008.0.iso
cd0.insert install-sparc64-universal-2008
save-persistent-state install-phase1.state
./simics targets/sunfire/walnut-cd-install2.simics
load-persistent-state install-phase1.state
save-persistent-state install-phase2.state
./simics targets/sunfire/walnut-common.simics
bin/craff walnut-install.disk
send mail in linux server
- send a mail
- start mail service
Sunday, April 5, 2009
forward ssh server's graphic display to client
- on client:
ForwardX11 yes
- test
- Reference:
website seo
http://www.seomoz.org
http://www.seomoz.org/blog/the-beginners-checklist-for-small-business-seo
http://www.seomoz.org/blog/the-beginners-checklist-for-learning-seo
http://www.seomoz.org/tools
http://www.seomoz.org/blog/the-beginners-checklist-for-small-business-seo
http://www.seomoz.org/blog/the-beginners-checklist-for-learning-seo
http://www.seomoz.org/tools
Saturday, April 4, 2009
SVN server configure
0. setup svn
mkdir svn_dir
cd svn_dir
svnadmin create xxx_dir
svn import . file:///xxx_dir/
svnserve -d -r svn_dir
svn co svn://domain/xxx_dir/
1. not allow anonymous access
vi conf/svnserve.conf
anon-access = none
auth-access = write
password-db = passwd
2. not cache password
vi ~/.subversion/config
store-passwords = no
store-auth-creds = no
Reference:
http://www.subversion.org.cn/svnbook/1.4/index.html
http://www.subversion.org.cn/?action-viewnews-itemid-1
mkdir svn_dir
cd svn_dir
svnadmin create xxx_dir
svn import . file:///xxx_dir/
svnserve -d -r svn_dir
svn co svn://domain/xxx_dir/
1. not allow anonymous access
vi conf/svnserve.conf
anon-access = none
auth-access = write
password-db = passwd
2. not cache password
vi ~/.subversion/config
store-passwords = no
store-auth-creds = no
Reference:
http://www.subversion.org.cn/svnbook/1.4/index.html
http://www.subversion.org.cn/?action-viewnews-itemid-1
Thursday, April 2, 2009
setup JDK JRE
http://java.sun.com/javase/6/webnotes/install/jdk/install-linux.html
get a setup file such as jdk-6u12-linux-i586.bin
run it directly
get a setup file such as jdk-6u12-linux-i586.bin
run it directly
character web browser: lynx
get it from http://lynx.isc.org/current/index.html
very cool when you on a console
./configure
make
cp lynx.cfg /usr/local/etc/
cp samples/lynx.lss /usr/local/etc/
./lynx
very cool when you on a console
./configure
make
cp lynx.cfg /usr/local/etc/
cp samples/lynx.lss /usr/local/etc/
./lynx
Subscribe to:
Posts (Atom)