Thursday, May 5, 2016

Verbose Boot, Enable on CentOS 7

THE WRONG WAY:
To disable graphical booting in CentOS 7, some suggest that we need to edit file /etc/default/grub as follows:

# vi /etc/default/grub
Remove “rhgb quiet” from the line beginning with “GRUB_CMDLINE_LINUX”, as shown below:
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap"

However, this does not work.

THE RIGHT WAY:
The following will produce the results we are looking for:

Step 1 - Using the “plymouth-set-default-theme” command, see what the current setting is. By default, it is set to “charge”. I edited file /etc/default/grub, so it is currently set to “text”:
# plymouth-set-default-theme
text

However, this setting does not give us verbose boot at startup.

Step 2 - To produce verbose booting, we need to set this value to “details”:
# plymouth-set-default-theme details
# dracut -f
(This will take a minute before your prompt is returned).

Double-check your settings:
# plymouth-set-default-theme
details

Step 3 - Test your changes by rebooting your system:
# shutdown -r now


Install NTP package on CentOS 5.11 and Configure as NTP Client


Install NTP package on CentOS 5.11 and Configure as NTP Client


If needed, search for the ntp package:
# yum search ntp
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: centos.aol.com
 * extras: mirror.cc.columbia.edu
 * updates: mirror.net.cen.ct.gov
====================================== Matched: ntp =======================================
adjtimex.i386 : A utility for adjusting kernel time variables.
chkfontpath.i386 : Simple interface for editing the font path for the X font server.
cyrus-imapd.i386 : A high-performance mail server with IMAP, POP3, NNTP and SIEVE support
inn.i386 : The InterNetNews (INN) system, an Usenet news server.
ntp.i386 : Synchronizes system time using the Network Time Protocol (NTP).
system-config-date.noarch : A graphical interface for modifying system date and time
xfce4-fsguard-plugin.i386 : Filesystem-Guard plugin for the Xfce panel
Install NTP:
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: centos.aol.com
 * extras: mirror.cc.columbia.edu
 * updates: mirror.net.cen.ct.gov
====================================== Matched: ntp =======================================
adjtimex.i386 : A utility for adjusting kernel time variables.
chkfontpath.i386 : Simple interface for editing the font path for the X font server.
cyrus-imapd.i386 : A high-performance mail server with IMAP, POP3, NNTP and SIEVE support
inn.i386 : The InterNetNews (INN) system, an Usenet news server.
ntp.i386 : Synchronizes system time using the Network Time Protocol (NTP).
system-config-date.noarch : A graphical interface for modifying system date and time
xfce4-fsguard-plugin.i386 : Filesystem-Guard plugin for the Xfce panel
Configure /etc/ntp.conf
# cp -pv /etc/ntp.conf /etc/ntp.conf.orig
# vi /etc/ntp.conf
(old)
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 0.centos.pool.ntp.org
server 1.centos.pool.ntp.org
server 2.centos.pool.ntp.org
server 3.centos.pool.ntp.org
(updated)
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 2.us.pool.ntp.org
server 3.us.pool.ntp.org
server 2.ca.pool.ntp.org
server 3.ca.pool.ntp.org
server 2.north-america.pool.ntp.org
server 3.north-america.pool.ntp.org
server 2.europe.pool.ntp.org
server 3.europe.pool.ntp.org
If the driftfile does not exist, create it:
# touch /var/lib/ntp/drift
To synchronize time:
# ntpd -qg
ntpd: time set +18024.320432s
This behavior mimics that of the ntpdate program, which I believe is now deprecated.
Next, verify that the time is now updated:
# date
Thu Apr 14 18:51:13 EDT 2016
Configure ntpd so it starts on system boot:
# chkconfig ntpd on
Finally, start the service:
# service ntpd start
Starting ntpd:                                             [  OK  ]
Run the following command to see the status of this server:
# ntpq -pn
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 2607:fa18::2407 .INIT.          16 u    -   64    0    0.000    0.000   0.000
 204.2.134.163   44.24.199.34     3 u    1   64    1  127.537   16.501   0.001
 2604:a880:cad:d .RMOT.          16 u    -   64    0    0.000    0.000   0.001
 199.19.167.36   .INIT.          16 u    -   64    0    0.000    0.000   0.001
 198.60.22.240   .INIT.          16 u    -   64    0    0.000    0.000   0.001
 2001:a60::123:2 .INIT.          16 u    -   64    0    0.000    0.000   0.001
 192.36.143.130  .INIT.          16 u    -   64    0    0.000    0.000   0.001
 127.127.1.0     .LOCL.          10 l    -   64    0    0.000    0.000   0.001

Sunday, May 1, 2016

CentOS 6 - Minimal Installation, How To

Initial Installation - CentOS 6.7


Instructions:

After creating your Virtual Machine (VM), make sure that you adjust Virtual Machine Settings > CD/DVD (IDE) > Use ISO image file to the ISO you just downloaded. In this case, I am using CentOS-6.7-i386-minimal.iso.


Once you are finished, press "OK", then power on your VM.









Press the ENTER key:






Skip the media check:












At the following screen, select "Next".






On the following screens, select "English (English)" > Next > U.S. English > Next. If a "Warning" pop-up, appears, select "Yes".







Next, select "Basic Storage Devices", then select "Next".






On the Storage Device Warning screen, select "Yes, discard any data", then select "Next".






On the following screen that appears, set your desired hostname. Once done, click on "Configure Network”, then click on “Edit” at the “Editing System eth0” pop-up that appears.








To ensure network connectivity at boot, make sure "Connect automatically" is checked, then select "Apply...", "Close", then "Next".














Next, make sure your time zone settings are fine. If so, click on "Next".






On the screen that follows, set the system's root password, then click on "Next".






On the following section, click on the drop-down menu and select "Create custom layout". It should look like this:
Once you are done, select "Next". On the following screen, click on "Free", then select "Create":
On the popup that appears, select "Standard Partition", then select "Create":
My first partition will be /boot, so I enter this information in the field "Mount Point:", check "Force to be a primary partition", then click on "OK".
Again, select "Free", then click on "Create".
On the popup that appears, select "Standard Partition", then select "Create":

My second partition will be /, so I enter this information in the field "Mount Point:". Additionally, I am setting aside 1024MB for swap, so 34615MB of free space minus 1024MB gives me 33591MB for /. This value is entered in "Size (MB):". Next, I check "Force to be a primary partition", then click on "OK".
Finally, I will create a partition for swap. Click on "Free", then select "Create":
On the popup that appears, select "Standard Partition", then select "Create":
To create a swap partition, in the drop-down "File System Type:" menu, select "swap", then select "Fill to maximum allowable size", then check "Force to be a primary partition". Once you are done, click on "OK".
As displayed below, you should have 3 partitions under "Hard Drives > sda". If your settings appear similar to the following, select "Next".

On the "Format Warnings" popup that appears, go ahead and click on "Format".
On the "Write storage configuration to disk" popup that appears, go ahead and click on "Write changes to disk".
On the following screen, leave the defaults as-is, but spot-check it anyway. GRUB should be installed on /dev/sda and the device should be on that same partition (i.e., /dev/sda and /dev/sda2, not /dev/sda and /dev/sdb2). Once you are done, click on "Next".
The installation process should now start. This will take about 5-10 minutes to complete. Go make some coffee or tea.

The following screen indicates completion of the CentOS minimal installation process. Select "Reboot" to boot into your newly-installed system.