Systems Administrator Processes in Linux D : This means the process is in uninterruptible sleep mode. Usually Input and output are in this mode. R : Currently Running Process or is in the running queue. S : Is in sleep state waiting for an event to complete. T : Means the
Systems Administrator Repairing Accidental Damage to file system permissions and ownership There are cases when you might accidently change the system permissions and you want to revert it back to default permissions. You can revert ownership and permissions on installed packages by using rpm or you can copy permissions from a clone machine if you
Systems Administrator Handling Multiple SSH Keys and Ports for Multiple Machines You might have to deal with a lot of machines with different keys and ports. Here is a simple way to make that easier. Edit / Create ssh config file. vi ~yourUserName/.ssh/config Put the information about your hosts into the config file:
Systems Administrator Setting up Git on Centos In this tutorial, I am showing how to setup GIT on Centos with SSH . Packages to be installed : yum install git-core gitosis Create user and group which will own the repositories : useradd -d /path/to/repositories gituser Generate or copy a ssh key for
Systems Administrator Installing and uninstalling redmine plugins Download the plugin and extract it into the plugins directory. Go to the plugins directory and run : bundle install --without development test RAILS_ENV=production If you need to migrate the database then run the following command : rake redmine:plugins:migrate RAILS_ENV=production
Systems Administrator Installing Redmine with Passenger and Apache on Centos 6.3 1. Install prerequisite / dependencies : yum install subversion make gcc gcc-c++ zlib-devel ruby-devel rubygems ruby-libs apr-devel apr-util-devel httpd-devel mysql-devel mysql-server automake autoconf ImageMagick ImageMagick-devel curl-devel 2. Go to the directory where you want to download Redmine Code and check out the files using svn
Systems Administrator Setting Default permissions on installed packages If you mess up the permissions on installed packages some how , you can set default permissions by issuing the following command : for p in $(rpm -qa); do rpm –setugids $p; rpm –setperms $p; done
Systems Administrator Redhat Package Manager Tips & Tricks View a List of packages installed by Date : rpm -qa --qf '%{INSTALLTIME} (%{INSTALLTIME:date}): %{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' | sort -n
Systems Administrator Force Install CPAN Module in Linux from CLI Force Install CPAN Module perl -MCPAN -e “CPAN::Shell->force(qw(install HTTP::Cookies));”
Systems Administrator Changing the password hashing algorithm to sha-512 change password hashing algorithm to sha-512 # authconfig –test | grep hashing # authconfig –passalgo=sha512 –update
Systems Administrator Installing Perl Modules Its convenient to install perl modules from command line. #perl -MCPAN -e shell cpan> install PACKAGE NAME eg. cpan> install HTML::Template
Systems Administrator Grub reinstall in rescue mode You can re-install grub boot loader in rescue mode by issuing the following command : #grub-install /dev/sda1 or hda1 ( based on your boot partition) if it is scsi drive it would be sda and hda if it is ide drive. If you get something
Systems Administrator Managing Partitions *Mounting filesystem #mount (fs-type> -o <options> <partition_name> <mount_point> fs_type=vfat,ext2,ext3,iso9660 etc options=rw ro exec noexec dev nodev auto noauto suid nosuid user nouser or (owner, noowner) async sync the above
Systems Administrator Linux Filesystem Management Linux Filesystem management –>File system Ids ext2/ext3 –>83 linux swap ->82 RAID –>fd LVM –>83 above id no. are based on hex system #fdisk -l -> Disk partitioning tools .fdisk ->
Systems Administrator Linux Hardware and Kernel * Hardware Resources –>Kudzu – .It is hardware detection program that typically runs during boot time to detect any added or removed h/w. .It refers the file/etc/sysconfig/hwconf to deletct any added/removed h/w. #hwbrowser . Graphical tool that displays
Systems Administrator Controlling Services in Linux –> Controlling services service management tools: 1 .chkconfig .it is noninteractive tool that can be used in shell scripts. .xinetd-based services comes into immediate effect if actived/de-activated with this tool. .Stand-Alone service comes into effect only on next rebootif activated/de-activated using
Systems Administrator Linux Daemons Deamons (what is deamons) ——————————- .Background process are called deamons and sometimes called services) Types ——- Two types: 1. Stand-alone deamon .Location: /etc/rc.d/init.d/* .Keeps running all the time
Systems Administrator Linux Init Initialization -init initialization #vi /etc/inittab format id:runlevel:action:process id –> it is 1-4 char. long identification char. runlvele–> It represents the runlevel for which the action has to be taken. If omitted, action will be taken for all the
Systems Administrator Linux Kernel Initialization Kernel initialization ————————- .kernel detects the attached devices in the system & loads thier drivers into RAM. .mounts root filesystem into read-only memory mode. .Then initializes the ‘init’ process for further processing init=it
Systems Administrator Linux Boot process, system initialization System Initialization & Services –> Boot sequence i. BIOS initialization ii. Boot Loader initialization iii. Kernel initailization iv. init initialization Power on –> BIOS —-> BOOT LOADER(MBR) –> KERNEL–>init Kernel- Monolithik kernel -Boot Loader i.
Systems Administrator Archiving and Compression Archiving and compression at the time: Syntax: tar <option> files/dir Options: Z (if we are using gzip compression) j (if we are using bzip2) x (Extracts) v (verbose mode) f (for archived file) t (list the content of an archived file)
Systems Administrator Using Crontab CRON TABLE is used to execute tasks in unix,solaris operating systems. IT is used to execute scheduled tasks at specific times. Two files : /usr/lib/cron/cron.allow and /usr/lib/cron/cron.deny determine who can and cannot use the cron jobs.