warren myers bglug 4 aug 2014. digital ocean sign in/up ( create droplet (vm) virtualbox create...

8
Basics of Initial CentOS/RHEL 6.x Server Configuration Warren Myers BGLUG 4 Aug 2014

Upload: horatio-carroll

Post on 22-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Warren Myers BGLUG 4 Aug 2014.  Digital Ocean Sign in/up ( Create Droplet (VM)  VirtualBox Create new VM Mount OS ISO Boot and

Basics of Initial CentOS/RHEL 6.x Server

ConfigurationWarren Myers

BGLUG 4 Aug 2014

Page 2: Warren Myers BGLUG 4 Aug 2014.  Digital Ocean Sign in/up ( Create Droplet (VM)  VirtualBox Create new VM Mount OS ISO Boot and

Create a Server Digital Ocean

• Sign in/up (http://bit.ly/1ukcuUK)• Create Droplet (VM)

VirtualBox• Create new VM• Mount OS ISO• Boot and install

Page 3: Warren Myers BGLUG 4 Aug 2014.  Digital Ocean Sign in/up ( Create Droplet (VM)  VirtualBox Create new VM Mount OS ISO Boot and

First Steps Post Build Turn off unnecessary services

• chkconfig --list | grep ‘:on’• chkconfig <servicename> off

Install any updated packages• yum -y upgrade

Basic sanity on ssh• Create a new user• Give user sudo privileges

visudo Enable wheel group Add user to wheel

• Disallow password authentication for root

Page 4: Warren Myers BGLUG 4 Aug 2014.  Digital Ocean Sign in/up ( Create Droplet (VM)  VirtualBox Create new VM Mount OS ISO Boot and

Second Steps Post Build Add swap (if you didn’t during install)

• Do you “need” swap? Yes! No! Maybe!

• Partition or swapfile? As root

dd if=/dev/zero of=/swapfile bs=8096 count=524288 mkswap /swapfile swapon /swapfile Add to /etc/fstab

/swapfile swap swap defaults 0 0

Page 5: Warren Myers BGLUG 4 Aug 2014.  Digital Ocean Sign in/up ( Create Droplet (VM)  VirtualBox Create new VM Mount OS ISO Boot and

Third Steps Post Build User management Configure postfix (or exim or …) Install apps/services you want/need

• Apache/Nginx• PHP• ftp

ftp access should be highly limited Install helpful utilities

• yum -y install screen emacs

Page 6: Warren Myers BGLUG 4 Aug 2014.  Digital Ocean Sign in/up ( Create Droplet (VM)  VirtualBox Create new VM Mount OS ISO Boot and

What About RHEL/CentOS 7?

Pros• Kernel now on 3.x series• Better virtualization support• Lots of updated packages

Cons• chkconfig doesn’t manage most services• Seemingly-small changes bigger than in

previous version upgrades

Page 7: Warren Myers BGLUG 4 Aug 2014.  Digital Ocean Sign in/up ( Create Droplet (VM)  VirtualBox Create new VM Mount OS ISO Boot and

What About My Favorite Distro? Ubuntu / Debian / Mint

• Configs similar• Uses update-rc.d instead of chkconfig• Mint isn’t a server distro!

Slackware• Many configs similar• No standard tool like chkconfig

SuSE• Configs similar-ish … but more “European”• Also uses chkconfig

Everything else (Arch, *BSD, etc)• <shrug/>

Page 8: Warren Myers BGLUG 4 Aug 2014.  Digital Ocean Sign in/up ( Create Droplet (VM)  VirtualBox Create new VM Mount OS ISO Boot and

What About Desktops/Workstations?