Thursday, June 14, 2012

mysql change root password

mysql change root password

1, To setup root password for first time, use mysqladmin command at shell prompt as follows:
$ mysqladmin -u root password NEW_PASSWORD

2, update a root password,

$mysqladmin -u root -p'oldpassword' password newpass

For example,change old password 123 to 456
$ mysqladmin -u root -p123 password '456'

Monday, June 11, 2012

centos install git - use yum install

1,  Add the EPEL repository, then install it using yum.

  wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
 
2, Install DAG's GPG key and Verify the package you have downloaded
    rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
    rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm

3, Install it
 rpm -i rpmforge-release-0.5.2-2.el5.rf.i386.rpm

4, install git using yum
  yum install git

Thursday, May 31, 2012

ESX VM - How to reset your password in Ubuntu

1, You need  hold down the Shift key during bootup.

2, From the boot menu, select recovery mode.

3, After you select recovery mode, then select "root shell prompt".

4, add user and passwd 

Tuesday, May 29, 2012

max width for image

<style type="text/css">
.my_img {
    max-width: 500px;
    /* Resize the image for IE6 */
    width: expression(this.width > 500 ? 500: true);
}
</style>

Thursday, May 24, 2012

squid add Password Authentication Using NCSA

1, generate /etc/squid/squid_passwd file

htpasswd -c /etc/squid/squid_passwd www


2, [root@localhost ~]# vim /etc/squid/squid.conf
a, Add this to the auth_param section of squid.conf
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_passwd

b, add this line in the buttom of acl
acl ncsa_users proxy_auth REQUIRED

c, add this line in the top of http_access
http_access allow ncsa_users




Saturday, May 19, 2012

start cvs


[root@NTRCVS ~]#  CVSROOT=/cvs/CVSROOT/
[root@NTRCVS ~]# export CVSROOT
[root@NTRCVS ~]# /etc/init.d/xinetd stop
Stopping xinetd:                                           [  OK  ]
[root@NTRCVS ~]# /etc/init.d/xinetd start