Cheat Sheet Part 3
EX200 Cheat sheet part 3:
Service Management
The service resides under /etc/init.d
start a service at boot
chkconfig service on
or
chkconfig --level135 service on
list a service
chkconfig --list
GUI tool for services
yum install system-config-service
Encrypted Filesystems
setup an encrypted volume
cryptsetup --verbose --verify-passphrase luksFormat /dev/sdb1 cryptsetup lukOpen /dev/sdb1 safe
ls -l /dev/mapper | grep safe mkfs.ext4 /dev/mapper/safe mount /dev/mapper/safe /safe
restorecon -r /safe
/etc/crypttab safe /dev/sdb1 none (none means require to enter a password at boot)
/etc/fstab /dev/mapper/safe /safe ext4 defaults 0 0
To show encrypted filesystem status
cryptsetup status safe
Network Service
Autofs
Config is under /etc/auto.master
auto.misc nfs -fstype=nfs,intr (server wont hang when nfs is not available) yvr-na04:/vol/xxxxx then --> service autofs restart
When go to /misc/nfs … nfs will auto mount. By default it will be unmounted in 10 mins
NTP server
config is located under /etc/ntp.conf
NFS
config file /etc/exports
/nfs 10.5.0.0/255.255.0.0(sync,rw)
to show export
showmount -e showmount -e IP
To mount NFS share
mount -t nfs x.x.x.x:/share /mountpoint
fstab
x.x.x.x:/share /mountpoint nfs _netdev 0 0
httpd
yum install httpd /etc/httpd/conf/httpd.conf
elink is text browser (elink http://localhost)

