Posts

How to install CVS on centOS / RHEL 5

Here I am trying to guide you, to install CVS within a few minutes without any hassle. here we go....... Install cvs yum install cvs Logged in as root Add group cvs # groupadd cvs Add user cvs #useradd -g cvs cvs Create repository cvs -d /path_to_repository init Change ownership of cvs repository to cvs chown cvs:cvs /Path_to_cvsroot cat /etc/services and check is there followings exist cvspserver 2401/tcp #CVS Pserver cvspserver 2401/udp #CVS PServer If not add them into /etc/services Edit /etc/xinetd.d/cvs service cvspserver { disable = no port = 2401 socket_type = stream protocol = tcp wait = no user = root passenv = PATH server = /usr/bin/cvs env = HOME=/path_to_repository server_args = -f --allow-ro...

Device or resource busy ,when trying to unmount usb device

When you trying to unmount you will get a warning as followed. umount -f /mnt/Mounted_directory/ umount2: Device or resource busy umount: /mnt/Mounted_directory: device is busy umount2: Device or resource busy umount: /mnt/Mounted_directory: device is busy use #fuser -km /mnt/Mounted_directory See the man fuser for more details

Metadata file does not match checksum with yum install

When trying to install packages using yum, sometimes you will get following error message. example: http://mirror.centos.org/centos/4/up...rimary.xml.gz: [Errno -1] Metadata file does not match checksum Trying other mirror Most probably it is because of ISPs cache try followings one by one to solve the issue. 1. yum clean all and yum clean metadata 2. yum -y remove yum-fastestmirror 3. export http_proxy=[my actual proxy server]

Disable ssh root login

There is a potential Crackers can get in to your server via ssh by figuring out the password of the root using brute force attack. So that it is better to control root access of the server via ssh. For that use different user to log into the server and use sudo after logged in. follow the steps to deny root access via ssh : Create user with preferable username #useradd chamara give a strong password for the user #passwd chamara edit the following file with your favourite editor (vi is my favourite ;) ) #vim /etc/ssh/sshd_config find the #PermitRootLogin yes and uncomment it and do "yes" to "no" like as below PermitRootLogin no save it and close the file After that restart the sshd #/etc/init.d/sshd restart Thats all, have fun

Install oracle on SUSE 10 , 11

Install oracle 10g on SUSE 10,11 Pre-requirements At least 1GB RAM Swap space = 2 x physical RAM (until 3 GB) after 3GB swap should equal to physical RAM size 500MB on /tmp directory 5 GB on /home/oracle Install following packages binutils gcc gcc-c++ glibc gnome-libs libstdc++ compat- libstdc++ libstdc++-devel libaio libaio-devel make pdksh sysstat openmotif (if you are not using gnome , gnome-libs is optional ) After all install orarun package which compatible to architecture of the PC Edit following files 1. /etc/SuSE-release Insert following details on it SUSE Linux Enterprise Server 9 (i586) VERSION = 9 2. /etc/hosts Insert the ip address of the PC and comment the 127.0.0.2 line Ex: # 127.0.0.2 demo.chaamaa.com demo 192.168.1.5 demo.chaamaa.com demo Run one of followings as root to set kernel parameters “ /etc/init.d/oracle start ” or “ rcoracle start ”. If none of them works edit /...

Basic Linux Commands III - Gzip , Tar, Bzip2

### Gzip , Tar, Bzip2 ### gzip a. gzip -c 12thousnd.txt > 12thousnd.txt.gz b. gunzip 12thousnd.txt.gz -dumps to file and delete the compressed version c. gzip -c 12thousnd.txt.gz d. zcat 12thousnd.txt.gz dumps to STDOUT zcat 12thousnd.txt.gz > test12th.txt bzip2 a. bzip2 -c 12thousnd.txt >12thousnd.txt.bz2 can have more compression b. bunzip 12thousnd.txt.bz2 c. bzcat 12thoousnd.txt.bz2 zip & unzip a. zip filename.zip path_to_source_file/ ex: zip 12thousnd.txt.zip 12thousnd.txt (differ from gzip ,bzip2) b. unzip 12thousnd.txt.zip tar and gzip/bzip2 a. tar -cvf filename.tar path_for_source/ need extra overhead(memory) b. tar -czvf filename.tar.gz path_for source/ (creates filename.tar.gz) c. tar -cjvf filename.tar.bz2 path_for source/ (creates filename.tar.bz2...

How to add wheel user in linux

How to add wheel user in linux Make sure is there any entry in /etc/group like as wheel:x:10:root /etc/pam.d directory, and edit the file su . Find these lines in that file like as follow # Uncomment the following line to require a user to be in the “wheel” group. #auth required pam_wheel.so use_uid Edit the sudorer configuration file with visudo Uncomment the following (colored) entry # Uncomment to allow people in group wheel to run all commands # %wheel ALL=(ALL) ALL This will allow anyone in the wheel group to execute commands using sudo