Blogs‎ > ‎

Setting up CentOS 6.6 Minimal

posted 28 Jul 2015, 14:03 by Andrew at Lycom
For a server I am setting up on some older hardware I used the latest CentOS 'minimal' build - this gives you a a bare-metal installation without a GUI. Can be a bit painful at first, but this is what I did (mostly cribbed from here, thanks).

Installed from the CentOS minimal ISO, followed the setup instructions as normal. After boot login as root.

# ifconfig

shows just LO interface, we need to manually add network connection:

cd /etc/sysconfig/network-scripts
[root@localhost network-scripts]# vi ifcfg-eth0

DEVICE=eth0

...

ONBOOT=yes
BOOTPROTO=none
IPADDR=your.ip.address.here
NETMASK=255.255.255.0
Then restart network:


# service network restart
Shutting down interface eth0:                              [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:  Determining if ip address your.ip.address.here is already in use for 
device eth0...
[ OK ]
Add hostname (if not already done) and gateway IP:

# vi /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=www.mydomain.com
GATEWAY=192.168.113.254
restart network.  

Edit hosts file

# vi /etc/hosts

your.ip.address.here     www www.mydomain.com
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
Set up name resolution:

# vi /etc/resolv.conf
search subdom.mydomain.com mydomain.com
nameserver 8.8.8.8

Time zone was already set up from initial setup.

Followed the author's advice to add EPEL:

EPEL

EPEL repository installation steps are as follows:

  • Install the repository's key, so the package can be verified and trusted.
  • Installl the repository package for your distribution.
  • Configure, if desired, the repository configuration files found /etc/yum.repos.d.

For CentOS 6.5 64 bit

# rpm --import http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6
# rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Did an update:

# yum update
Then rebooted:

# reboot
All OK.
 
Next I added webmin web control panel using the standard Redhat package. First, install wget and some other stuff

# yum install wget

# wget http://prdownloads.sourceforge.net/webadmin/webmin-1.760-1.noarch.rpm

# yum install perl perl-Net-SSLeay

then do

# rpm -ivh webmin-1.760-1.noarch.rpm 

Webmin setup, check

# service webmin status
Webmin (pid 1144) is running

OK, tried to connect to webmin on http://my.server.name:10000 but no joy. Hmmm, firewall?

# netstat -anlp | grep :10000

showed port listening

but iptables -L -n

showed I need to open up access to port 10000.

Added the firewall gui:

yum install system-config-firewall-tui

But wouldn't run, so I needed:

yum install system-config-firewall

which installed some other dependencies. Then

# service messagebus start

And ran 

system-config-firewall-tui

Bingo! Then I opened up access to tcp/10000 and applied settings. 

http://my.server.name:10000 

worked first time. I then used webmin to fine tune my CentOS 6.6 install.

Comments