Configure yum server for Client machine (Part 3)HARDWARE NETWORKING LINUX SOFTWAREIt Tech Technology

It Tech Technology

COMPUTER HARDWARE NETWORKING

Breaking

Home Top Ad

Post Top Ad

Saturday, January 9, 2016

Configure yum server for Client machine (Part 3)


Configure yum server for Client machine:

If you want to provide client machine to download & install the packages via yum server, then you will have to enable following services below on your yum server. In this case I am describing both of them, but in real world you can configure both of them or one of them.




      * By Enabling HTTP Services 
       * By Enabling FTP Services

  
Enabling HTTP Services in Yum Server

Step-1: Installing http RPM package

[root@yumsrv ~]# yum install httpd* -y

Step-2:  Configuring the httpd.conf file.

Now go to the main configuration file for enabling http services

[root@yumsrv ~]# vi /etc/httpd/conf/httpd.conf



Directives
Discription
Line Number
Orginal File Text
Modified File Text
Listen
Specify the Port Number where apache will listen on
134
80
210.207.201.254:80
ServerAdmin
e-mail address of the server administrator
251
root@localhost
ServerName
Put the host name(FQDN)of web server
265
DocumentRoot
Specify the html file location of the web server
281
“/var/www/html”
“/var/www/html”
NameVirtualHost
Set web Server IP which will contain the virtual host
972
*:80
210.207.201.254:80



** Also go to the end of the configuration file for configuring Virtual host


     ServerAdmin     root@210.207.210.254

     DocumentRoot    /var/www/html

     ServerName 210.207.201.254


Tips: To edit httpd.conf file set Line number & enter Follow the method.

Esc → set number → Enter → Esc → Shift+: → type line number which you want to edit → Enter → press I for insert mode → then edit → Save & Exit.

Step-3:  Editing hosts file

If DNS is not use for http services then you put the host name and IP address of yum server in to the /etc/hosts file in every client machine otherwise packages will be failed to download & install. The configuration file will look like below,

[root@yumsrv ~]# vi /etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain localhost
210.207.201.254 yumsrv     yumsrv

Step-4:  After configuring http service you have to restart httpd service

[root@yumsrv ~]# service iptables stop

[root@yumsrv ~]# chkconfig iptables off

[root@yumsrv ~]# service network restart

[root@yumsrv ~]# service httpd restart

[root@yumsrv ~]# chkconfig httpd on

Post Bottom Ad