April 2013
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Categories

April 2013
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Convert RHEL 6.2 to CentOS 6.x

yum clean all# rpm -e subscription-manager

# mkdir /root/centos# cd /root/centos

# wget http://mirror.centos.org/centos/6.3/os/x86_64/RPM-GPG-KEY-CentOS-6# wget http://mirror.centos.org/centos/6.3/os/x86_64/Packages/centos-release-6-3.el6.centos.9.x86_64.rpm# wget http://mirror.centos.org/centos/6.3/os/x86_64/Packages/yum-3.2.29-30.el6.centos.noarch.rpm# wget http://mirror.centos.org/centos/6.3/os/x86_64/Packages/yum-utils-1.1.30-14.el6.noarch.rpm# wget http://mirror.centos.org/centos/6.3/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

# rpm –import RPM-GPG-KEY-CentOS-6# rpm -e –nodeps redhat-release-server# rpm -e yum-rhn-plugin rhn-setup rhn-check rhn-setup-gnome rhnsd (if this is not removing you can do yum remove yum-rhn-plugin rhn-setup rhn-check rhn-setup-gnome rhnsd)# rpm -Uhv –force […]

Rsync Tips

Synchronizing data beetween two directories

# rsync -rv <src> <dst> –progress

Rsync two directories with filtered extensions

# rsync -rv –include ‘*/’ –include ‘*.txt’ –exclude ‘*’ srcDir/ desDir/

Rsync a directory excluding pesky .svn dirs

# rsync -rv –exclude .svn src/dir/ dest/dir/

Sync Source Directory to Destination Directory

# rsync -avzE -e –process /var/www/html/deploy root@X.X.X.X/backup/testing/project

[…]

How to hide web server version in Tomcat

Add the following attributes to the <Connector> in Tomcat’s server.xml to hide web server version in Tomcat at line no- 73 :-

# vim apache-tomcat/conf/server.xml

<Connector port=”8080? protocol=”HTTP/1.1?connectionTimeout=”20000?redirectPort=”8443?server=”Tomcat” />

Email Linux

@reboot /bin/mail -s “$HOSTNAME – rebooted” msn@rmoahn.com <<< “$HOSTNAME has rebooted on $(date)”

 

The ability to know when a system reboot. The tips below will send out an email when a Linux system is reboot. This should indicate to the Administrator that something went wrong with the shutdown. The tips below are for […]