Some setup processes to get CentOS 6 or 7 ready to use after initial install
CentOS Minimal Server download is available from: http://isoredirect.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso
CentOS allows you to set the network up during the OS install, but sometimes you need to change it afterwards. CentOS 7 has a nice GUI you can use to do everything. CentOS 6 is a pain in the ass.
-
CENTOS 7: Use the GUI editor to make interface changes (easy button)
sudo nmtui
-
CENTOS 6: Open the network configuration file for editing in VI (not easy button)
sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0
-
CENTOS 6: Modify and enter the below settings into the file (you have to hit "i" to enter edit/insert mode)
IPADDR=192.168.1.100 PREFIX=24 GATEWAY=192.168.1.1 DNS1=8.8.8.8 DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=yes IPV6_AUTOCONF=no IPV6_DEFAULTGW=2001:db8:1ce:1ce:babe::1 IPV6ADDR=2001:db8:1ce:1ce:babe::100/64 DNS2=2001:4860:4860::8888 IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=yes NAME="System eth0"
-
CENTOS 6: Hit ESC to exit edit/insert mode, then type in ":w" and hit ENTER to write the file
-
CENTOS 6: Type in ":q" and hit ENTER to exit the editor
-
CENTOS 6: Open the other network config file to set the default gateway and hostname (you have to hit "i" to enter edit/insert mode)
sudo vi /etc/sysconfig/network
-
CENTOS 6: Enter gateway and hostname info as below
NETWORKING=yes HOSTNAME=CENT6 GATEWAY=192.168.1.1 IPV6_DEFAULTGW=2001:db8:1ce:1ce:babe::1
-
CENTOS 6: Follow steps 4 and 5 above to save the file and exit the editor
-
CENTOS 6: Open the other resolv.conf file to set the DNS servers and search domains
sudo vi /etc/resolv.conf
-
CENTOS 6: Enter DNS servers and search domain info as below
search mydomain.com nameserver 8.8.8.8 nameserver 2001:4860:4860::8888
-
CENTOS 6: Follow steps 4 and 5 above to save the file and exit the editor
-
Restart the networking stack to effect changes
sudo /etc/init.d/network restart
It is always a good idea to update your OS with the latest patches when you build it
-
Check repos for available updates
sudo yum update -y
These are some packages I install on almost everything
-
Extra Packages for Enterprise Linux (EPEL) is an extensive database of useful and quality packages for RHEL-ish distro's. It automatically is seached by YUM once installed.
sudo yum install epel-release -y
-
Open VM Tools is an open version of the VMWare Tools app. Useful if on a hypervisor
sudo yum install open-vm-tools -y
-
A GIT client is a necessity if using a GIT repo
sudo yum install git -y
We can use SSHFS to connect to another Linux box file system
-
Install the SSHFS package
sudo yum install sshfs -y
-
Mount the local /mnt/ directory to a remote Linux machine
sshfs [email protected]:/root /mnt