Category Archives: Linux

Fixing Postfix error unknown user name value: nobody

System: RHEL 6.9

Just got complain from App support Postfix was error.
Check on /var/log/maillog show this error
postfix[2319]: fatal: file /etc/postfix/main.cf: parameter default_privs: unknown user name value: nobody

The solution I did,check on /etc/passwd and found the user nobody in comment state.
Uncomment nobody and Postfix can start again.

# vi /etc/passwd
Uncomment nobody

# service postfix restart

<hr />

Set up sysctl variables on CentOS/RHEL

A sysctl variable represents file locations under the /proc/sys directory. The dot(“.”) notation is used when setting in a configuration file.

RHEL/CentOS 7
– Set a sysctl parameter value immediately (not persistent/not applied on boot) on any version of RHEL:
Use the sysctl -w command. Parameter which take multiple values should have the values enclosed in quotes. For example, to set net.ipv4.ip_forward to 1 and net.ipv4.ip_local_port_range to 1025-65535:

# sysctl -w net.ipv4.ip_forward=1
# sysctl -w net.ipv4.ip_local_port_range="1025 65535"

Alternatively, it is possible to echo values directly into the procfs file which represents a sysctl parameter:

# echo 1 > /proc/sys/net/ipv4/ip_forward
# echo "1025 65535" > /proc/sys/net/ipv4/ip_local_port_range

Continue reading

Install VMware-tools on CentOS 6

Scenario: Install VMware-tools CentOS 6 on VMware ESXi 6

Steps:
– Right click on guest VM.
– Select Install/Upgrade VMware Tools. Note: VMware tools installer will assign as CD/DVD or iso image in the server.
– Login as root access the server or SSH remote to install VMware tools.
Continue reading

Setup NFS server on CentOS 7

Scenario: How to setup NFS server and NFS client.
System:
– CentOS 7 NFS server IP Address: 192.168.99.11
– CentOS 6 NFS client IP Address: 192.168.99.17

Steps:
1) Configure NFS server
– Install NFS packages on the CentOS server with yum:
yum install nfs-utils

– Create the directory that will be shared by NFS:
mkdir /NFSdisk
Continue reading

Extend Logical Volume size on RHEL/CentOS

Scenario: Extend/Growing Logical Volume size for /opt on RHEL/CentOS.
System: CentOS/RHEL 6/7

Login as root then follow below steps:
1) Check free size in Volume Group (vgs). If still there free size then continue to step-2.
# vgs

[root@VTEST01 ~]# vgs
 VG #PV #LV #SN Attr VSize VFree
 VolGroup 2 7 0 wz--n- 59.50g 12.00g
[root@VIDHOLXDTESTAP01 ~]#

Continue reading

Added New VMware Disk and Mount to new Directory on CentOS 6

Scenario:
Added new 10GB VMware Hard Disk,create new Volume Group(Vgs),Create new LVM,format to ext4 and mount to /data

Steps in VMware vSphere:
– Right click on VM -> Select Edit Settings… -> Click Add... -> on Device Type select Hard Disk -> Click Next
– Select Create a new virtual disk -> Click Next
– Specify disk size (this scenario is 10GB), select default Thick Provision Lazy Zeroed then specify the disk location (default is Store with virtual machine) -> Click Next
– Specify Virtual Device Node (default for 2nd Hard disk will be SCSI (0:1), on Mode box leave blank -> Click Next
– Click Finish.
Continue reading

Force syncronize NTP to the NTP server on CentOS 6 /RHEL 6

Scenario: How to force syncronize NTP to the NTP server.
System: RHEL 6/ CentOS 6

Steps:
1. Stop the ntpd service :
# service ntpd stop

2. Force to sync
# ntpd -gq
-g = requests an update irrespective of the time offset
-q = requests the daemon to quit after updating the date from the ntp server.

3. Start the ntpd service :
# service ntpd start
Continue reading

Mount CD/DVD on RHEL/CentOS 6

First,insert CD/DVD in your CD/DVD ROM,then login as root.

1. Find the CD/DVD devices:
# lsblk

[root@VTEST01 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 60G 0 disk
ââsda1 8:1 0 500M 0 part /boot
ââsda2 8:2 0 39.5G 0 part
â ââVolGroup-lv_swap (dm-0) 253:0 0 4G 0 lvm [SWAP]
â ââVolGroup-lv_rootfs (dm-1) 253:1 0 16.5G 0 lvm /
â ââVolGroup-lv_var (dm-2) 253:2 0 10G 0 lvm /var
â ââVolGroup-lv_patrol (dm-3) 253:3 0 5G 0 lvm /opt/java
â ââVolGroup-lv_home (dm-4) 253:4 0 2G 0 lvm /home
â ââVolGroup-lv_opt (dm-5) 253:5 0 5G 0 lvm /opt
ââsda3 8:3 0 20G 0 part
ââVolGroup-lv_controlm (dm-6) 253:6 0 5G 0 lvm /opt/test
ââVolGroup-lv_opt (dm-5) 253:5 0 5G 0 lvm /opt
sr0 11:0 1 204M 0 rom
[root@VTEST01 ~]#

Found the CD/DVD ROM is sr0
Continue reading

Setup MSofficeKey 2.2.4 plugin in OCS Inventory 2.1.2 CentOS 6


By default OCS inventory didn’t retrieve Ms Office key product key,Install MSofficeKey 2.2.4 plugin to retrieve Ms Office product key.

This instalation didn’t use setup.sh but manual install follow README.txt file in the package PluginOcsOfficekey-2.2.4.tar.gz

Download OCS Inventory Officekey 2.2.4 plugins
# cd /opt
# wget http://download.ocsinventory-ng.org/pub/plugins/PluginOcsOfficekey-2.2.4.tar.gz
# tar -zxvf PluginOcsOfficekey-2.2.4.tar.gz

officeplugin-ocs-1

Continue reading