Initial Setup of a Linux CentOS5 / RHEL5 System

From CVL Wiki

(Difference between revisions)
Jump to: navigation, search
Line 23: Line 23:
  
 
Since the /etc/sudoers is not "write-able" by anyone, to save the file you must use ":w!" followed by ":q".  Now exit "su" with "Ctrl-D".
 
Since the /etc/sudoers is not "write-able" by anyone, to save the file you must use ":w!" followed by ":q".  Now exit "su" with "Ctrl-D".
 +
 +
===Get things up-to-date.===
 +
Apply all updates since the CD/DVD was burned.
 +
sudo yum -y update
  
 
===Add yum repositories.===
 
===Add yum repositories.===
 
There are three yum repositories I add: epel (Extra Packages for Enterprise Linux), Dag Wieers' excellent rpmforge, and for Adobe's flash and pdf.  Its a bit tricky to do this properly, the yum repos will step on each-others' feet.  Largely I follow [http://wiki.centos.org/AdditionalResources/Repositories/RPMForge this].
 
There are three yum repositories I add: epel (Extra Packages for Enterprise Linux), Dag Wieers' excellent rpmforge, and for Adobe's flash and pdf.  Its a bit tricky to do this properly, the yum repos will step on each-others' feet.  Largely I follow [http://wiki.centos.org/AdditionalResources/Repositories/RPMForge this].
 +
 +
# First install yum-priorities as suggested.

Revision as of 10:58, 18 March 2009

Running Linux straight out of the box is a bit of a raw experience. I make a number of tweaks after the initial install. I'm going to document these tweaks here.

Contents

Never login as root!

During the install, there will be a place to create an account. Create an account there. Login with the account you created during the install.

Get sudo working for your account.

Once you are logged in, start a "Terminal". Type su, type the root password. This will be the first and last time you type "su". Now, edit /etc/sudoers. Find the line

## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL

and add you account:

## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
jkh     ALL=(ALL) NOPASSWD:     ALL

I add the "NOPASSWD:" option, this allows you to run sudo with out typing your password. Many people would argue that this is a security problem. Just make sure that your password is strong.

## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
jkh     ALL=(ALL) NOPASSWD:     ALL

Since the /etc/sudoers is not "write-able" by anyone, to save the file you must use ":w!" followed by ":q". Now exit "su" with "Ctrl-D".

Get things up-to-date.

Apply all updates since the CD/DVD was burned.

sudo yum -y update

Add yum repositories.

There are three yum repositories I add: epel (Extra Packages for Enterprise Linux), Dag Wieers' excellent rpmforge, and for Adobe's flash and pdf. Its a bit tricky to do this properly, the yum repos will step on each-others' feet. Largely I follow this.

  1. First install yum-priorities as suggested.
Views
Personal tools
Support