Showing posts with label Linux/UNIX Admin. Show all posts
Showing posts with label Linux/UNIX Admin. Show all posts

Tuesday, November 16, 2010

RPM Package installing Guide in Linux


rpm -ihv name.rpm :- Install the rpm package called name
rpm -Uhv name.rpm :- Upgrade the rpm package called name
rpm -e package :- Delete the rpm package called package
rpm -l package :- List the files in the package called package
rpm -ql package :- List the files and state the installed version of the package called package
rpm -i --force package :- Reinstall the rpm package called name having deleted parts of it (not deleting using rpm -e)
tar -zxvf archive.tar.gz or, tar -zxvf archive.tgz :- Decompress the files contained in the zipped and tarred archive called archive
./configure :- Execute the script preparing the installed files for compiling

Important Security Files in Linux:-


Security - Important Files:-


/etc/passwd - password file
/etc/shpasswd - shadow password file
/etc/group -lists groups and users contained in groups
/etc/services - lists network services and their ports
/etc/ftpusers - contains list of accounts that cannot use ftp
/etc/hosts.equiv - generic list of remote users
~/.rhosts - list of remote users for a specific account
/etc/hosts - host definition list
/etc/hosts.lpd - hosts who can use remote printing
/etc/hosts.allow - lists services that remote users are allowed to use
/etc/hosts.deny - lists services tthat remote users are not allowed to use
/etc/nologin - no login message that also disables logins
/etc/securetty - lists legal terminals for root to login from
/etc/exports - lists locations that can be remotely accessed via NFS
/etc/syslog.conf - configures the syslog facility
/etc/inetd.conf - configures inetd

Set Date and time in Linux:-

Linux Set Date

Use the following syntax to set new data and time:
date set="STRING"


For example, set new data to 2 Oct 2006 18:00:00, type the following command as root user:

# date -s "2 OCT 2006 18:00:00"

OR

# date set="2 OCT 2006 18:00:00"

You can also simplify format using following syntax:

# date +%Y%m%d -s "20081128"

Linux Set Time
To set time use the following syntax:


# date +%T -s "10:13:13"

Where,

10: Hour (hh)
13: Minute (mm)
30: Second (ss)
Use %p locale’s equivalent of either AM or PM, enter:

# date +%T%p -s "6:10:30AM"

# date +%T%p -s "12:10:30PM"