Installation of CentOS 7
Goal: Install centos 7 on tx1 (replacement for t1hilo).
Date: 2018/02
1. HARDWARE
purchased by denault from newegg, amazon, mwave on 2018/01:
GA-B250M-D3H LGA-1151, I5-7400 CPU,
16GB RAM (DDR4 2133), 500GB HD(WD Black WD50003AZEX). DVD
Seasonic FOCUS Pluse 550FX P/S
case: Chenbro RM41300-F1 (mwave)
2. DVD Install and update
Note: 'black graphic' on installation screen appeared, abled to
work around it by changing the graphics from VGA to HDMI. (1804
desired partitions are:
sda1 210M /boot/efi
sda2 52G / # centos7 root
sda3 52G /r3 # unused
sda4 395G /aux #
Software selection: GNOME Desktop
Installation destination: sda, I will configure partitioning
manual parititon:
/boot/efi 200M sda1
/ 50G sda2
(will do other later, as installer want to assign sdaX ).
manual config ethernet.
start installation.
needed to make local user 'irtf', during setup
1st reboot
Stop & Turn off filewall:
systemctl stop firewalld
systemctl disable firewalld
Turn off selinux:
vi /etc/selinux/config
SELINUX=disabled.
yum update
reboot
yum groupinstall developer-workstation-environment development scientific php office-suite kde-desktop
yum install nano net-tools gnuplot gsl gsl-devel vnc vnc-server ImageMagick \
tk qt-devel rdist dump telnet expect expect-devel expectk hg mutt \
gtk2-devel MySQL-python python-matplotlib python-devel.x86_64 \
hplip ypbind rpcbind nfs-utils nfs-utils-lib smartmontools kernel-devel
make droot, mroot
move /home/irtf (local user) to /home2, as /home will be a automount
Setup Manual IP and disable network manager
vi /etc/sysconfig/network-scripts/ifcfg-enp0s31f6
change:
BOOTPROTO="dhcp"
to:
BOOTPROTO="none"
Add for static IPs:
IPADDR="128.171.110.152"
PREFIX=25
GATEWAY=128.171.110.129
ONBOOT="yes"
NM_CONTROLLED=no
remove DNS*
systemctl stop NetworkManager
systemctl disable NetworkManager
systemctl restart network
chkconfig network on
vi /etc/resolv.conf # Manaully set this up
Setup 192.168 address:
vi /etc/sysconfig/network-scripts/ifcfg-enp0s31f6:0
DEVICE=enp0s31f6:0
ONBOOT=yes
BOOTPROTO=none
IPADDR=192.168.110.152
PREFIX=16
Setup Chrony - the NTP client
vi /etc/chrony.conf
commnet our centos.pool servers, and add:
server duke.ifa.hawaii.edu iburst
server goblin.ifa.hawaii.edu iburst
pool ntproundtop.hawaii.edu iburst maxsources 3
server irtfgps2.ifa.hawaii.edu iburst
to insure chronyc was enabled:
systemctl status chronyd
to start and enable :
systemctl start chronyd
systemctl enable chronyd
chronyc can be used to show status:
chronyc sources # displayinfo about current sources
chronyc sourcestats # Display estimation info about current sources
chronyc tracking # display system time information
chronyc activity # show the NTP sources
IRTF Setup
Setup as NIS Client
vi /etc/yp.conf
vi /etc/nsswitch.conf (note automount is files only)
systemctl enable rpcbind ypbind
systemctl start rpcbind ypbind
Install NFS (client and server)
Install:
vi /etc/idmapd.conf
Add "Domain=ifa.hawaii.edu"
Enable service:
systemctl enable rpcbind
systemctl enable nfs-server
systemctl enable nfs-idmap
systemctl enable autofs
Start service:
systemctl start rpcbind
systemctl start nfs-server
systemctl start nfs-idmap
systemctl start autofs
Set up and check NIS logins, automount, etc:
/etc/hosts # add key TCS IP numbers
/etc/group # add staff:500, project:501, add to,tcs to audio group
/etc/yp.conf
/etc/resolv.conf
/etc/auto.master # setup TCS only automounting
/etc/automap, auto.home # local TCS map
# local TCS map
create the /home2/nologin/.login files to logout non tcs accounts.
# ln -s /netdisks/htdocs /htdocs # create needed netdisks links
# ln -s /netdisks/irtf.backup /irtf.backup
# systemctl restart autofs # restart autofs
You should now have login to tcs3, automount, etc.
date or ls -l /etc/localtime to show timezone. Was ok, but can be fixed by:
# timedatectl set-timezone Pacific/Honolulu
smartd:
Add devices to scan in conf:
vi /etc/smartmontools/smartd.conf
To enable service:
systemctl enable smartd.service
To start service:
systemctl start smartd.service
/etc/rc.local - Enable & add commands
line to add: vi /etc/rc.local
#
# if you screen blanck after 10 min or so, this stops it
#
/usr/bin/setterm -blank 0
...
To enable
chmod u+x /etc/rc.d/rc.local
systemctl start rc-local
copy duke authorized keys:
scp -p duke:/root/root/.ssh/authorized_keys ~root/.ssh/authorized_keys
vi /etc/ssh/ssh_config
add: ForwardX11 yes (?this might be wrong, ForwardX11Trusted is used now).
Finish setting up /r3, /aux:
gdisk /dev/sda
n to create
sda3, 50G, 8300
sda4, 365.6G, 8300
reboot so linux sees the partition
mkfs.ext4 -v -m 2 /dev/sda3
mkfs.ext4 -v -m 2 /dev/sda4
blkid /dev/sda3 # used to print UUID
blkid /dev/sda4
Add mount to /etc/fstab # note: used /dev/sdaX, ont UUID
TCS Setup
Copy /aux/catalogs4 to new computer
Create the /home2/to account.
set group to 10 (wheel)
login via gnome and apply this:
yum -y install dconf-editor
run dconf-editor (as user)
org->gnome->desktop -> wm ->preferences
action-double-click-titlebar: toggle-shade
focus-mode: sloppy
org -> gnome -> nautilus -> icon-view
zoom-level: small # make icons smaller
disable screen saver:
applications -> system Tools -> setting -> privacy: run screen lock off
Turn off screen blacking:
applications -> system Tools -> setting -> power: set blank screen to never.
How to set run levels:
# systemctl set-default multi-user.target # run level 3 (text mode)
# systemctl set-default graphical.target # run level 5 (GUI mode)