Monday, March 30, 2009

msn protocol and bot

http://www.hypothetic.org/docs/msn/notification/authentication.php

Friday, March 27, 2009

serve gzip compressed content using apache 2

  • enable mod_deflate in httpd.conf
  • edit .htaccess file
AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript application/json
Header append Vary Accept-Encoding
  • check


http://www.port80software.com/tools/compresscheck.asp

Thursday, March 19, 2009

setup Postgresql

1. download Postgresql (postgresql-8.3.7.tar.gz) from http://www.postgresql.org/download/

2. ./configure --prefix=

3. gmake

4. gmake install

5. adduser postgres

6. mkdir /data

7. chown postgres /data

8. initdb -D /data

9. export PATH=$PATH:/bin/

setup axis2

1. download axis2 from http://ws.apache.org/axis2/
2. unzip axis2-std-0.95-bin.zip
3. jar -xvf ../axis2.war
4. export AXIS2_HOME=....

Geronimo setup

1. download Geronimo (Geronimo 1.0 with Tomcat) from http://geronimo.apache.org/

2. follow the steps in Quick start

3. start the server
java -jar server.jar
then you can see Geronimo's welcome page in http://localhost:8080/

4. mkdir webapps as

5. Deploy an application
java -jar deployer.jar --user system --password manager deploy /HelloWorld.war

6. manage applications
http://localhost:8080/console
default user: system:manager

7. export GERONIMO_HOME=...

DBT4 setup

1. download DBT4 from http://osdldbt.sourceforge.net/

2. setup Germonimo 1.0

3. setup Axis2 version 0.95

4. setup Postgresql

5. vi scripts/pgsql/pgsql_profile.in

6. autoreconf --install

7. ./configure

8. vi src/Lcg64Rng/build.xml


9. cd src/Lcg64Rng/; ant

10. vi src/data/build.xml


11. cd src/data/; ant

12. vi src/app/build.xml


13. cd src/app/; ant

14. vi src/driver/build.xml

15. cd src/driver/; ant

16. ./scripts/pgsql/build_db.sh -e 1 -g

17. unzip axis2.war

18. cp geronimo-1.0/repository/activemq/jars/activemq-core-3.2.1.jar WEB-INF/lib/

19. cp dbt4-0.5/build/lib/Lcg64Rng.jar WEB-INF/lib/

20. cp postgresql-8.3-604.jdbc4.jar WEB-INF/lib/

21. cp dbt4-0.5/build/lib/Dbt4Service.aar WEB-INF/services/

22. jar cvf ~/axis2.war ./*

23. java -jar deployer.jar --user system --password manager deploy ~/axis2.war
now you can see dbt4 service from http://localhost:8080/axis2

24. vi scripts/myjava
JDBC_DRIVER=........./postgresql-8.3-604.jdbc4.jar

24. ./scripts/run_workload.sh -b 1 -d 1





























































Monday, March 9, 2009

mysql config

connect number

add to my.cnf mysqld part

max_connections=250
tmp_table_size=67108864
sort_buffer_size=4194288
table_cache=128


mysql
show variables; to query config data for mysql

Saturday, March 7, 2009

build.xml java








mysql operation

/usr/bin/mysqladmin -u root password 'new-password'

GRANT ALL ON *.* TO 'myuser'@'somehost' IDENTIFIED BY 'mypass';

GRANT ALL PRIVILEGES ON *.* TO msentissi@"192.168.3.10" identified by
"yourpassword";

Friday, March 6, 2009

apache log

log format
http://httpd.apache.org/docs/2.2/mod/mod_log_config.html

apache code read

httpd.h
struct request_rec


mod_log_config.c

static const char *process_item(request_rec *r, request_rec *orig, log_format_item *item)

log_request_time()

web server measurment tool

webstone

linux context switch number query

sar -w 2 5

lxr

/tmp/lxr/bin/genxref /www/lxr/source/httpd-2.2.11
glimpseindex -n -o -H /www/lxr/source/httpd-2.2.11 www/lxr/source/httpd-2.2.11