Home‎ > ‎unix/linux‎ > ‎Centos Systems‎ > ‎

Centos-basicServer


Network Install: 

Download Network Install iso from CentOS mirror:
  • Boot from iso
  • Specify http for network install
    • server: mirrors.rit.edu
    • path: centos/5.5/os/i386
  • Blow away old partitions and let centos define partition for you.
  • Define your network, and hostname
  • wait.
Get all the basic things up and working: 


Minimal CD Install: 

boot from minimal iso (6.3 in these notes)
once complete, do the following 
if the network does not work: 
ifup eth0

update the OS: 
yum -y update

make sure the following files are uptodate: 
vim /etc/hosts
vim /etc/resolv.conf
    nameserver 8.8.8.8
    nameserver 8.8.4.4
    search cmed.us
vim /etc/sysconfig/network

if the eth0 interface is not starting: 
yum NetworkManager
chkconfig NetworkManager on

vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes


and update the network setting as such: 
vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 
BOOTPROTO=none 
ONBOOT=yes 
NETWORK=10.0.1.0 
NETMASK=255.255.255.0 
IPADDR=10.0.1.27 
GATEWAY=10.0.1.1
USERCTL=no

if the def route gets stuck: 
route add default gw 198.18.2.1 

reboot the network
service network {stop || start || restart} 

confirm your routes are good: 
route -n

have the system boot and display messages: 
edit /etc/grub.conf or /boot/grub/grub.conf and remove rhgb quiet

Add basic must haves: 


yum install ntp vim dig perl net-snmp-utils w3m curl wget screen bind-utils 
yum install tcpdump rsync 


Other Notes: 

Installing Apps with Yum:

see yum page for more details
  • yum -y check-update
  • yum -y list installed lists all apps installed on host
  • yum -y list downloads header info of all apps available for install and stores it locally
  • yum -y update upgrades all out of date apps.
  • yum search apache search what is available for install with the name "apache"
  • yum install net-snmp-utils.x86_64 installs the app net-snmp-utils.x86_64

Installing Apps with RPMs:

  •  rpm -i -UVh <filename.rpm> Install a rpm  

Starting and stopping services:

  • service iptables start|stop|status|restart will do whatever to the iptables service.


Add NTP: 
yum install ntp
ntpdate 0.pool.ntp.org
chkconfig ntpd --add
then confirm that it's working: 
/usr/sbin/ntpq
ntpq> peers
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+216.45.57.38    216.218.192.202  2 u   13   64  377   99.620    4.221   1.846
*ccadmin.cycores 130.207.244.240  2 u   11   64  377   36.277    1.260   1.190
+dns01.iar.clt.n 64.250.177.145   2 u   11   64  377   43.431    0.053   0.634
 LOCAL(0)        .LOCL.          10 l    7   64  377    0.000    0.000   0.001
ntpq>
ntpq> rv
assID=0 status=c624 sync_alarm, sync_ntp, 2 events, event_peer/strat_chg,
version="ntpd 4.2.2p1@1.1570-o Fri Nov 18 13:21:21 UTC 2011 (1)",
processor="x86_64", system="Linux/2.6.18-348.el5", leap=11, stratum=16,
precision=-20, rootdelay=0.000, rootdispersion=7.125, peer=48701,
refid=ØB, reftime=00000000.00000000  Thu, Feb  7 2036  1:28:16.000,
poll=6, clock=d56cdee7.54208f96  Wed, Jun 19 2013 21:52:39.328, state=3,
offset=3.385, frequency=0.000, jitter=2.053, noise=1.440,
stability=0.000, tai=0
ntpq>
the peers statement will show you who you are polling and what their status is, and the rv statement will tell you what you are.  Right off the bat, it will say stratum 16 (not working), but after a few min, it will settle into something good.  


Links:


Comments