Linux Basics: Installing FTP, WEB SERVER APACHE, YUM Server, MySQL

//only standalone packages are installed by rpm

// yum to install inter dependent rpm

$ rpm -ivh vsftpd*.rpm


//To enable yum server it has to be atleast ftp/web server

installing FTP

 go to cd drive/server
$cd /media/RED*
$cd server
$rpm -ivh vsftpd*.rpm

To check installed are not query all
$rpm -qa | grep vsftpd

To check all folders query list
$ rpm -ql vsftpd

make service entry for boot time
$chkconfig vsftpd on
start service
$ service vsftpd start

Making yum Server/Client:
Test ftp in browser ftp://localhost/pub
copy all cd rpm to ftp folder. In short create two folder RHEL5 and VT inside pub and copy data from CD. VT is already having repository directory created.
$mkdir /var/ftp/pub/rhel5
$ cd /media
$cp -rvf /media/RHEL*/server /var/ftp/pub/rhel5
$cp -rvf VT /var/ftp/pub/VT

Create repository for yum server
install createrepo command
$rpm -ivh /var/ftp/pub/rhel5/server/createrepo*.rpm

To create repository file. It will create a repodata subfolder
$createrepo -v /var/ftp/pub/rhel5/
$vim /etc/yum.repos.d/server.repo
[RHEL5]
name=my server
baseurl=ftp://localhost/pub/rhel5
enabled=1
gpgcheck=0
[VT]
name=my server vt
baseurl=ftp://localhost/pub/VT
enabled=1
gpgcheck=0

$yum update all

[[If it gives SSL error like this "ERROR: can not find RHNS CA file:/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT"
then run rhn_register to open registration window disable proxy detail and close it.]]

Now install apache WEB Server

$yum install httpd*

This will install all dependancy of apache automatically.
To check installed are not query all
$rpm -qa | grep httpd

make service entry for boot time
$chkconfig httpd on
start service
$ service httpd start

To upgrade apache download latest repository from net in to /etc/yum.repos.d/ and run
$yum update httpd*

To remove packagee

$yum remove httpd

Similarly install mysql

$yum install mysql*

- By
Vinod Kotiya
######################################

Configuring Yum Server:-

1) Insert the RHEL5 DVD into the Optical Drive.

2) Mount it in { /media }

3) Install FTP from the RHEL5 DVD which is mounted on { /media }

# rpm -ivh vsftpd+tab
# service vsftpd start
# service vsftpd restart
# chkconfig --list
# chkconfig vsftpd on

4) Copy the Server directory from the RHEL5 DVD which is mounted on /media to /var/ftp/pub
# cp -rf /media/dvd/Server /var/ftp/pub

5) Copy the VT directory from the RHEL5 DVD which is mounted on /media to /var/ftp/pub
# cp -rf /media/dvd/Server /var/ftp/pub

6) Install the RPM of creatrepo from the location where we copied the /media/dvd/Server - /var/ftp/pub/
#rpm -ivh /var/ftp/pub/Server/creatrepo-0.4.4-2fc6.noarch.rpm

7) Run the Command.
# creatrepo -v /var/ftp/pub ---- ( -v for Verbose Mode)

8) Creat a file in /etc/yum.repos.d/file.repo (where I will give the file name as yum.repo)
# vi/etc/yum.repos.d/yum.repo ---- (Edit the file by pressing the insert or i button of the keyboard)

 # [Server]
 # name=Rea Hat Enterprise Linux5
 # baseurl=file:///var/ftp/pub/
 # enabled=1
 # gpgcheck=0

 # [VT]
 # name=Virtualization
 # baseurl=file:///var/ftp/pub/
 # enabled=1
 # gpgcheck=0

9) run the Commands.
# service yum-updatesd start
# service yum-updatesd restart
# yum cleam all
# yum update
----------------------------------------------------------------------------------------------------------------


Configuring Yum Client:-

1) Creat a file in /etc/yum.repos.d/file.repo (where ill give the file name as client.repo)
# vi/etc/yum.repos.d/client.repo ---- (Edit the file by pressing the insert or i button of the keyboard)

 # [Client]
 # name=Yum Client
 # baseurl=ftp:///192.168.0.xxx/pub/ ---- (I.P. Address of the Yum Server)
 # enabled=1
 # gpgcheck=0

2) now we can run following commands.
A) The following command is used for installing the package.
  # yum install (package name)

B) The following command is used for removing the package specified.
  # yum erase (package name)
  # yum remove (package name)



Anas Rahman

Comments