Ubuntu operating system 17.04 installation

Step 1 : Boot the machine using OS media and click on “Install Ubuntu”.

Step 2:  Now select the language and click on continue to proceed further.

Step 3:  We could see there are two check box which is mentioning here to enable the “Downloading                 updates while installation and Third party software installation” by checking this two box.

Step 4:  Now in next screen will ask for installation type. On this screen select as per your requirement. I’m going to select “Something else” option and click continue.

Step 5: Select the free space and click on “+”

Step 6:  Provide the required information to create root(/) file system and click ok.

Step 7:  Follow above step to create filesystem whatever you want and here i am create one more directory called “swap”  which doesn’t have filesystem type and it is called as virtual memory as well.

Step 8: Now you could see the created filesystem lists like below.

Step 9:  Click on “Install now” to continue with installation and click continue to confirm the changes.

Step 10: Select the time zone from next screen.

Step 11:  Than select Keyboard layout language.

Step 12:  Provide the username details which we need to create new user and which will help us to manage the system(This is not a default administrator – root) and click continue.

Step 13:  Finally files will be copied from the media to our hard disk and will ask for reboot as a final step.

Now the Ubuntu 17.04 has been installed successfully and ready to use.

Thanks for supporting.

Finding files in linux

“Find” command:

This will allow you to find the files/folders within a directory or recursively, that match the searching pattern whichever you are given to search.

#find .

Above command will indicate search in the current directory.

-name: This option will help you to find a file that matches the specific pattern.

And we can use metacharacters like “*”,” ” with enclosure of double quotes “”


[[email protected] etc]# find . -name mtab./mtab

[[email protected] /]# find /etc -name passwd/etc/passwd/etc/pam.d/passwd  -> this command will find files for starting like passwd under the /etc directory.

Using the “Locate” command:

     Locate command is faster than find command. Because it’s using a database which is previously built the database for search. Locate command will list all the path names which containing your search pattern.

The database is updated using corn or we can also manually update the database using below command.

#sudo updatedb


#locate mydata

Configuring syslogd in linux

Follow the below steps on server:

Required services for syslogd

1. portmap
2 xinetd
3. syslog

Run the below command to keep on running above mentioned service after server reboot

#chkconfig portmap on
#chkconfig xinetd on
#chkconfig syslog on

Start portmap and xinetd services

#service portmap start
#service xinetd start

Check the service status

#service portmap status
#service xinetd status

Now edit “/etc/sysconfig/syslog” file using vi editor

#vi /etc/sysconfig/syslog

find for SYSLOGD_OPTIONS=”-m 0″

and add -r option to accept the logs from system


 save and quit from the file :wq

-x disable DNS lookups on messages with -r option
-m 0 disabled MARK messages
-r enables logging

Once edited the file restart the syslog service

#service syslog retsrat

Follow the steps on client

Edit /etc/syslog.conf file and add a entry at end of file for server as shown below.

:Lets assume server ip as

#vi /etc/syslog.conf
user.* @

Save and quit from the file :wq

now restart the syslog service on client

#service syslog restart

Now restart the client and check log entry in server. it will generate logs in server.

Checking logs on server

#less /var/log/messages

end of this log file you can see the recent logs.

Log analysis in Unix/Linux

We have lots of default and third-party tool/commands for log analysis in Linux/Unix.
Will see some default commands which is used in Linux for log analysis.
Usage of  awk command
   We can find and replace text and will sort the output of this command.  It will search for a given pattern by us and if any text matches for that pattern then it will do the further action which given in the command.
For example, if we need to the second item from an output of the command will use in below format
#ls -l | ask '{print $2}'

Likewise will use ask command Wherever we need a specific value from a log file/output of command or text file.

YUM Configuration in RHEL7/ CentOS 7

YUM Configuration in RHEL7/ CentOS 7

We are going to see YUM Configuration in RHEL7/ CentOS 7 in this post.

In Linux mostly we are using RPM and Yum Package management.

YUM- Yellowdog Updater Modified

Yum is mostly used to install a package without fail by resolving software dependencies.

We can configure yum locally/in network

Required RPM:
1. Yum
2. Createrepo
3. deltarpm
4. python-deltarpm

Configuring YUM in RHEL7

1. Insert RHEL7 media and mount it under /mnt

#mount /dev/cdrom /mnt

2. All the RPM’s available under Packages directory. change to Package Directory and
copy all the RPM’s under any local directory which you have already created.

3. Creating local directory to use as repository

#mkdir /yumpkg

4. Copying RPM’s from media to local directory

#cd /mnt/Packages
#cp *.* /yumpkg

5. Ensure all the required RPM’s installed or not by using below commands

#rpm -qa yum
#rpm -qa createrepo

6. Generate local repository files from yumpkg and create xml file

#cp /mnt/repodata/59eXXXXXX.xml /yumpkg/comps.xml
#cd /yumpkg
#createrepo -g /yumpkg/comps.xml .
7. Create repo file

#vi /etc/yum.repos.d/yum.repo

:wq save and exit from yum.repo file

Note: For using ftp/http as repository, we must enter the concerns path in baseurl field

#yum clean all
#yum makecache

8. Now check yum by listing all available RPM’s

#yum list all

9. Than try to install any package using YUM

# yum install vsftp

Other commands of yum

#yum remove <package_name>
#yum update <package_name>
#yum search <package_name>
#yum info <package_name>
#yum list installed
#yum check-update
#yum update
yum groupinstall <package_name>

Two private IP’s not responding each other in Multicasting – Linux

Will fix Two private IP’s not responding each other in Multicasting – Linux issue in this post

Follow the below steps to fix Two private IP’s not responding each other in Multicasting – Linux:

1) Ping the private IP of node2 from node1
ping <PRV_IP_Node2>
2) Check whether the priv IP is added in /etc/hosts
cat /etc/hosts
3) Check whether the configuration is correct for the NIC device
cat etc/sysconfig/network-scripts/ifcfg-eth?
4) Check whether the routing is correct
route -n; netstat -nr
5) traceroute to the priv IP
traceroute <PRV_IP_Node2>
6) Check whether any Firewall is running
/etc/init.d/iptables status
7) Add routing for the host of PRIV_IP_Node2 & check response
8) Check the kernel parameter value of net.ipv4.conf.default.rp_filter
If it is 1 change it to 2
#net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.all.rp_filter = 2
Do the above steps in Node 2 as well.
So that both the ways we get the reply

Configure network interface with multicast address in linux

In this post going to see how to configure network interface with multicast address in linux.
Multicast will send information to a group of destination simultaneously.
Most probably class D( – IP Address used in multicasting

Enable/ Disable Multicast:
Enabling Multicast:

#ifconfig eth0 multicast

once enabled check using #ifconfig eth0 command and you can find a line like below from the output of this command.


Disbaling muticast:

# ifconfig eth0 -multicast
follow the same command to check the status
# ifconfig eth0
UP BROADCAST MTU:1500  Metric:1

We could see there is no word mentioned in this output like “MULTICAST”
Check whether multicast enabled in Kernel or not.

#grep -i multi /boot/config-<Kernel version>
* CONFIG_IP_MULTICAST=y  #if “CONFIG_IP_MULTICAST” value mentioned as “n” then multicast disabled. We should make it as “y” (yes)

Configure Network interface to send muticast traffic over the network:
We should add a default gateway to multicast traffic, to the specific Network Interface. Use the below command to add default route

# route add -net netmask dev eth0

Then check the default route
#  route -n

You will get output like below
#  route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface       U     0      0        0 eth0

Command to check the multicast group in our host
# netstat -g
# cat proc/net/igmp

From the above commans will get output with multicast address for eth0 interface.
Now we configured a network interface with multicast address.

Chef server installation on linux

We are going to see Chef server installation on linux

Configuration options in Chef:


1. Standalone
2. High Availability
3. Tiered


1. Machine with RedHat server operating system with FQDN.
2. Mail agent which will help chef server to send notification.
3. Should know to work with cron jobs to schedule jobs

We are going to see Standalone chef server in this post.

In this method will use single machine for chef server installation.
1. Download “chef-server-core-<ver>” and kept under /tmp directory on a server which will run the server.
2. Install the package as root user using below commands.

#rpm -ivh chef-server-core-xxx.rpm

It will take some minutes to install it.

Execute the following server to start all services.

#chef-server-ctl reconfigure

Now we should create a user to manage the chef server

#chef-server-ctl user-create <username> <firstname> <lastname> <email> ‘Password’ –filename /path/uname.pem

Now we should create organization


#chef-server-ctl org-create short_name ‘full_organization_name’ –association_user user_name –filename ORGANIZATION-validator.pem

Download and install additional packages:
We can use Chef management console to manage the data bags, attributes, run-lists, roles, environments, and cookbooks from a web user interface.

Run below commands on chef server.

#chef-server-ctl install chef-manage
#chef-server-ctl reconfigure
#chef-manage-ctl reconfigure

We can use Chef push jobs to execute the jobs

Run the below commands on chef server.

#chef-server-ctl install opscode-push-jobs-server
#chef-server-ctl reconfigure
#opscode-push-jobs-server-ctl reconfigure

Use reporting will keep track while every client run on full infra.

Run the below commands on chef server:

#chef-server-ctl install opscode-reporting
#chef-server-ctl reconfigure
#opscode-reporting-ctl reconfigure

Update purchase for nodes:

While using more than 25 nodes, configuration should be updated by us for license.
for that, need to edit chef-server.rb file. follow the below steps to edit

#mkdir /etc/opscode && sudo touch /etc/opscode/chef-server.rb

open new chef-server.rb file
#vi /etc/opscode/chef-server.rb

append the below line on that file

#license[‘nodes’] = N (number of licensed nodes you have purchased)

save and exit from the file using :wq

run below command to update the modified changes on chef server

#chef-server-ctl reconfigure

Send mail Configuration on linux

Send mail Configuration on linux
We are going to Send mail Configuration on linux

•A linux server with ip address and hostname Server
•A linux client with ip address and hostname Client1
•A Configured DNS server on Linux server
•Updated /etc/hosts file on both linux system
•Running portmap and xinetd services
•Firewall should be off on server

Configure the DNS server before start configuration of sendmail server.

Required RPM:


#yum install sendmail
#yum install m4

Mail server program reads the /etc/mail/sendmail.cf. When Sendmail is started or restarted with the service sendmail restart command a new sendmail.cf file is automatically generated if sendmail.mc has been modified.

open /etc/mail/sendmail.mc for editing
#vi /etc/mail/sendmail.mc
show hidden line with : set nu option on vi command mode
By default, the following line limits sendmail access to connect local host only [line no 116]
You can allow other computers to use your sendmail server by commenting out this line.

DAEMON_OPTION(‘Port=smtp, Addr=, Name=MTA’)dnl 

comment this line with dnl keyword followed by # sign

dnl # DAEMON_OPTION(‘Port=smtp, Addr=, Name=MTA’)dnl
save this file with :wq and exit.
Now generate new sendmail.cf file by using m4 command as shown here
#m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
Now restart sendmail service and also set it on with chkconfig
#chkconfig sendmail on
#service sendmail restart
if sendmail service restart without any error means you have configured sendmail successfully.

Configure sendmail client side

Required RPM:

Now generate new sendmail.cf file by using m4 command as shown here
#m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
Now restart sendmail service and also set it on with chkconfig
#chkconfig sendmail on
#service sendmail restart

Testing of sendmail server

We will test sendmail server by sending and receiving mail in lab environment. for this we use two user one on each system.
Now create one user on each system abu on server
#useradd abu
#passwd abu
and Thagir on client system
#useradd thagir
#passwd thagir
Now send mail from user abu to thagir and from thagir to user abu and also check each other’s mail by mail command
Use full user name to send mail. For example to send mail to nikita use [email protected]
#mail [email protected]
Subjest: test mail
This is test mail
Press Ctrl+C
Now check on user abu mail box.

Apache configuration/Web server configuration in RHEL 6

We are going to see Apache configuration/Web server configuration in RHEL 6 Linux.
Remember before configuring  web server, we must configure DNS/DHCP server to receive the correct traffic.

Required RPM’s:
1. Httpd
2. Httpd-devel

Install the required RPM’s using below commands.

#yum install http*  -> command will install the required rpm package including dependency.

Now configure the IP Address with and check whether its configured properly or not. Without proper network configuration httpd service will wont start.

#ifconfig eth0
#ifconfig eth0

Now start httpd daemons and check the status

#chkconfig httpd on
#service httpd start
#service httpd status

Now configure Hosting:

We will host www.exampleweb.com to apache server and create index page under the root directory.

#mkdir –p /var/www/virtual/www.exampleweb.com/html
#vi /var/www/virtual/www.exampleweb.com/html/index.html

Just enter some text for testing purpose in index.html
<b> this is test page</b>

Bind system ip with www.exampleweb.com on /etc/hosts file. Usinf vi editor open the file and append like below.

#vi /etc/hosts 

Save and exit from the file using :wq

Now locate virtual host tag and remove # on apache configuration file (/etc/httpd/conf/httpd.conf)

#vi /etc/httpd/conf/httpd.conf

Copy and paste the last seven line from the file and change as shown below.

[email protected]
DocumentRoot /var/www/cirtual/www.exampleweb.com/html
ErrorLog logs/dummy-www.exampleweb.com-error_log
CustomerLog logs/ dummy-www.exampleweb.com-access_log common

Now restart the httpd service to effect the new configuration

#service httpd restart

Using links command will check the page

#links www.exampleweb.com
This is a test page
If you got out as whatever you have entered in index.html page than you have configured very well.