In linux you can install packages through many ways like.
1. Through RPM,
2. Through shell script
3. Through source tar balls etc.
(Yellow-dog Updater and Modifier) is another and advanced way of installing the packages in Linux distros such as Red-hat, Fedora.
In RHEL4 installing packages is a tedious process, some times its headache to install all the dependencies. So Red-hat people come with a solution to overcome this problem in most situations, i.e. nothing but implementation which will resolve this dependency issue. Here I am going to present some basic way how to use utility to install packages locally(there are so many ways to install packages from different sources such as ftp, http etc). You can get the full details about in my google docs here. One Two Three Four Five Six Seven Eight Nine Ten
Basic implementation locally:Step1 : Copy the entire OS cd's content to Hard-drive as below.
#cp -ar /media/cdrom/* /destinationfolder
Example : #cp -ar /media/cdrom/* /var/ftp/pub
Note :
1. From second cd on words no need to copy entire cd contents to drive just copy Server content in to drive.
2. Here please take destination folder as /var/ftp/pub so that we can implement FTP server to share our reposatory.
3. If you have RHEL5 DVD then just continue with second step.
#cp -ar /media/cdrom/Server/* /var/ftp/pub/Server/
Step2 : Now change the directory to /destinationfolder/Server and install the createrepo package #rpm -ivh createrepo.0.4.4-2 --aid
Step3 : Specify the reposatory location to .
#createrep -v /destinationfolder/
Step4 : Create a file with repo as extention and specify the details in /etc/ .repos.d folder
#cd /etc/ .repos.d/ #vi testing.repo
Note : The directory /etc/ .repos.d/ contaions two .repo files which should be moved or removed to other directory, so that server will check default .repo file it self. The new file which is created contains as follows
[station1.example.com]
comment ="test"
baseurl=file:///destinationfolder
gpgcheck=0
After entring these entries save and exit from the file.
Let me explain what acutally this four entries mean.
[station1.example.com] ==>This informs what is the reposatory name.
Comment ==> Its used to see the inforamtion about the repo.
Baseurl ==> This is the server and path of the repo(here its a local repo so the base url is just a file:///
For example you are creating server through FTP then base url should be like this
baseurl=ftp://station1.example.com/pub/Server gpgcheck ==> This is to check the authentication of the repository, which is disabled in this case.
Local repository is created, now you can install any package you want with command. In order to know more about , Please see man pages for .
Basic Server Reposatory through FTP server :So what about Installing packages remotly by using this reposatory?
Let us see how to configure client to access this repository. Before doing client configuration we have to share this reposatory through FTP or HTTP.
Step1 : Install vsftpd server on server
# install vsftpd
Step2 : Start the ftp service and on it
#service vsftpd restart
#chkconfig vsftpd on
Thats it on the server side every thing configured properly, Now move on to client machine Confugration on client side :
Step3 : Remove/move the local reposatory file from /etc/ .repo.d/ folder to some other location #mv /etc/ .repo.d/* /safe-loc/
Step4 : Create server.repo file in /etc/ .repo.d/ with following contents [station1.example.com]
comment ="test"
baseurl=ftp://station1.example.com/pub/Server
gpgcheck=0
Save and exit the file Now start using to install packages, as follows.
# install packagename
Example : # install httpd
To uninstall a package through
# remove httpd
To see the info of a package
# info packagename
To see the package is already installed or not
#rpm -qa grep packagename
Sharing knowledge on Linux, DevOps, Middleware and Cloud Technologies!!
Subscribe to:
Post Comments (Atom)
Kubernetes 1.31 || Testing the Image Volume mount feature using Minikube
With Kubernetes new version 1.31 ( https://kubernetes.io/blog/2024/08/13/kubernetes-v1-31-release/ ) there are so many features releases for...
-
Currently, we are getting some issues while deleting the namespace in Kubernetes(AKS). When we run " kubectl delete ns " command,...
-
When you were working with some POC or R&D, you may have to do things a number of times until you come to final conclusion. In my r...
-
Jenkins has been one of the most used CI/CD tools. For every tool which we are using in our daily life, it becomes really challenges when ...
No comments:
Post a Comment