Monthly Archives: December 2011

mysql reset root password

http://www.cyberciti.biz/tips/recover-mysql-root-password.htmlon fedora: /etc/init.d/mysqld on debian: /etc/initd/mysql /etc/init.d/mysql stop mysqld_safe –skip-grant-tables & mysql -u root  mysql> use mysql;mysql> update user set password=PASSWORD(“NEW-ROOT-PASSWORD”) where User=’root’;mysql> flush privileges;mysql> quit /etc/init.d/mysql start

Posted in mysql | Leave a comment

OpenLDAP

Install on ubuntu:  sudo apt-get install slapd ldap-utils sudo apt-get install phpldapadmin sudo service apache2 restart http://host/phpldapadmin Reference openldap-server.html One correction: please quote the binding dn below in bash. OpenLDAPServer How to change RootDN  /etc/ldap/slapd.d/cn=config/olcDatabase={1}hdb.ldif olcDatabase={1}hdb.ldif:olcRootDN: cn=admin,dc=example,dc=com How to change RootPWD … Continue reading

Posted in ldap | Tagged | Leave a comment

increase Linux max number of FD limits

how to increase max fd System level sudo sysctl -w fs.file-max=100000 to survive the reboot: sudo vi /etc/sysctl.conf: fs.file-max = 100000 User level sudo vi /etc/security/limits.conf: uid soft nofile 4096 uid hard nofile 10240

Posted in linux | Leave a comment

VisualVM remote monitoring JVM

JMX set up for JVM argument -Dcom.sun.management.jmxremote.port=8086 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false

Posted in java, visualvm | Leave a comment

JVM GC tuning

HeapDump-XX:+HeapDumpOnOutOfMemoryError-XX:HeapDumpPath=/home/blah/pid.hprof

Posted in java | Leave a comment

nginx load balance

http { upstream mylb {   server 127.0.0.1:9999;   server 127.0.0.1:9998;  }   server {   proxy_pass http://mylb  } }

Posted in nginx | Leave a comment