forked from topher23/Puppet_Module_Development
-
Notifications
You must be signed in to change notification settings - Fork 1
CentOS sysadmin manual
Alexandru Zbarcea edited this page Jan 21, 2015
·
6 revisions
- old VM: katelloSrv
- new VM: katello
- Login onto the cloned machine
- run the command ifconfig to see the MAC address given by udev:
ifconfig | grep ether
- edit the interface configuration file and modify the the mac address as well as the IP address
vi /etc/sysconfig/network-scripts/ifcfg-ens3
- replace the MAC address by the one provided by udev
- Replace the IP by the appropriate one.
- Change the hostname: CentOS hostname
- edit /etc/hosts and add the mapping between the IP address with FQDN. e.g:
192.168.2.200 kattelo.farm.net kattelo
- restart the Network
# systemctl restart network (CentOS 7) # service network restart (CentOS 6)
Let's see what disks we have:
brw-rw----. 1 root disk 8, 0 Jan 21 13:03 /dev/sda brw-rw----. 1 root disk 8, 1 Jan 21 13:03 /dev/sda1 brw-rw----. 1 root disk 8, 2 Jan 21 13:03 /dev/sda2 brw-rw----. 1 root disk 8, 16 Jan 21 13:03 /dev/sdb brw-rw----. 1 root disk 8, 17 Jan 21 13:03 /dev/sdb1 brw-rw----. 1 root disk 8, 32 Jan 21 13:08 /dev/sdc
Create partition
# cfdisk /dev/sdc # pvcreate /dev/sdc1 # vgs # vgextend centos /dev/sdc1 # vgs # df -h # lvextend -L +100G /dev/mapper/centos-root # resize2fs /dev/mapper/centos-root # df -h # vgs
CentOS7 is using systemd, and not upstart!
Reference: redhat - Managing Services with systemd