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

[[email protected] ~]# yum install httpd* -y

Step-2:  Configuring the httpd.conf file.

Now go to the main configuration file for enabling http services

[[email protected] ~]# 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
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     [email protected]

     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,

[[email protected] ~]# 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

[[email protected] ~]# service iptables stop

[[email protected] ~]# chkconfig iptables off

[[email protected] ~]# service network restart

[[email protected] ~]# service httpd restart

[[email protected] ~]# chkconfig httpd on

Post Bottom Ad