Monday, July 28, 2008

Disable Media Check for cdrom

Grub.conf
dma=off apci=off apm=off

/etc/hdparm.conf
command_line {
hdparm -d1 /dev/cdrom
}

command_line {
hdparm -d1 /dev/cdrom1
}

sysctl.conf
dev.cdrom.check_media = 0

MySQL Compilation

# groupadd mysql
# useradd -g mysql -c "MySQL Server" mysql
# tar zxf mysql-5.0.45.tar.gz
# cd /usr/local/src/ mysql-5.0.45
# .chown -R root.root *
# ./configure \--prefix=/usr/local/mysql \--localstatedir=/usr/local/mysql/data \--disable-maintainer-mode \--with-mysqld-user=mysql \--with-unix-socket-path=/tmp/mysql.sock \--without-comment \--without-debug \

# groupadd mysql
# useradd -g mysql -c "MySQL Server" mysql
# tar zxf mysql-5.0.45.tar.gz
# cd /usr/local/src/ mysql-5.0.45
# chown -R root.root *
# ./configure \--prefix=/usr/local/mysql \--localstatedir=/usr/local/mysql/data \--disable-maintainer-mode # \--with-mysqld-user=mysql \--with-unix-socket-path=/tmp/mysql.sock \--without-comment \--without-debug \--without-bench
# make && make install
# ./scripts/mysql_install_db
# chown -R root:mysql /usr/local/mysql
# chown -R mysql:mysql /usr/local/mysql/data
# cp support-files/my-medium.cnf /etc/my.cnf
# chown root:sys /etc/my.cnf
# chmod 644 /etc/my.cnf
# echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
# ldconfig
# cp ./support-files/mysql.server /etc/rc.d/init.d/mysql
# chmod +x /etc/rc.d/init.d/mysql
# /sbin/chkconfig --level 3 mysql on
# cd /usr/local/mysql/bin
# for file in *; do ln -s /usr/local/mysql/bin/$file /usr/bin/$file;

# /etc/init.d/mysql start

Open multiple tabs with Gnome-Tminal

gnome-terminal --geometry=125x75 --tab -e "ssh
192.168.0.67 -l myuser" --tab -e "ssh
192.168.0.45 -l root" --tab -e "ssh 192.168.0.88 -l
root" --tab -e "ssh 192.168.1.145 -l root -p 22999"

Set date from CLI

# date 030710532008
date
Fri Mar 7 10:53:01 IST 2008