I have installed a package from source, now I want to upgrade the older version to new version which is available.
How can I upgrade already installed source package on my system?
Ans : This question arises to all the admins who do installation from source package. To upgrade a source package follow the same steps to you have did at the time of first installation through source. Package as shown below..
Step1: unpack the new source code in tmp directory.
#cd /tmp
#tar xvfz packagname.tar.gz
#cd packagename
#./configure –prefix=/path/to/old/installation
#make
#make check
#make install
Step2 : Now check what is the version if its updated to new version for example
If you install squid then execute below command
#squid -v
How To Upgrade An Installed Source Package?
0 comments 12/12/2010 10:18:00 PM Posted by Surendra Kumar AnneLabels: How-To's, Package-Mgmt
How To Uninstall A Source Package?
0 comments 11/19/2009 07:28:00 AM Posted by Surendra Kumar AnneLabels: Administration, Package-Mgmt
#yum install packagename
This is installing through yum which will use rpm package manager internally
This is for installing .deb packages
#sh file.sh
This is from a shell script.
This is to install from source package.
#yum remove packagename
Uninstalling through yum... Etc...
This can be done in two ways
Way2 : If you don’t have source code with you. This is really hard way to do it, we have to go to so many locations/folders where that package created supported files. Some common locations for a package files is as follows
Etc.. so we have to go to each folder and have to remove all the files whose name contains packagename.
Installing YUM server in RHEL4
0 comments 8/05/2009 12:33:00 AM Posted by Surendra Kumar AnneLabels: Administration, Package-Mgmt
Recently I came across a strange issue.. ie implementing YUM(Yellow dog Updater and Modifier) server in RHEL4 :(. By the time of RHEL4 released there is no YUM server implementation..
RPM package management-III(Advanced Package MGMT)
0 comments 3/06/2009 09:33:00 AM Posted by Surendra Kumar AnneLabels: Administration, Package-Mgmt
To start of this topic most of the times RPM packages will come as source file. This have some advantage and disadvantage
first coming to disadvantage there is no direct command to install this source file on linux server so for newbabys it very diffucult to install the packages and coming to advantage we can compile this source packages to what ever platform we want so we are now going to see how to create compiled packages for different platforms from source files
here are the links for my previous RPM management topics. one two.
Step1: To create RPM packages from source we require two packages
gcc compiler
rpm-build
install these two packages
Step2:After installation of above packages install the source package which you want to compile
#rpm -ivh packagename.src.rpm
When we install the above src package we will get .specs file in /usr/src/redhat/SPECS which will contain all the details to create the required.
Step3:Now we got the spec file in order to specify the platform type etc
#cd /usr/src/redhat/SPECS
Step4:Create rpm package
#rpm-build -bb packagename.spec --target i386
this command will build a package which can be installed on i386 platform
RPM Package Management-II (Checkinstall)
0 comments 6/06/2008 12:54:00 AM Posted by Surendra Kumar AnneLabels: Administration, Package-Mgmt
Part2 :
So coming to advanced RPM management here I am going to discuss how to convert .tar.gz/.tar.bz2 files,src.rpm files to rpm packages? So that its very much easy to install the packages by using rpm command.
New releases of Linux programs are generally released in the tar.gz format consisting of source code of the application. Normally you will compile these programs but at times they throw some compiler errors on your screen which just seem gibberish to a novice. A much easier way to install programs is when they are in the RPM package format. Here’s a simple guide that will help you convert those source code files (tar.gz) into RPM packages.
To do this, first of all install the package checkinstall from your Linux dvd. If it doesn’t exist then you can Google for it and download it. Then unpack your source package diand cd to the directory. Where you unpacked the tar.gz file.
Step1 : Run the following two commands:
./configure make But now instead of running make install you run checkinstall. Answer the questions, edit some values if they are not appropriate and let the program run. When finished, you’ll find your RPM package in /usr/src/packages/RPMS/i686 your .rpm file is ready for future use.
RPM Package Management - I
1 comments 6/05/2008 08:20:00 AM Posted by Surendra Kumar AnneLabels: Administration, Package-Mgmt
Package management in Linux is very much tedious job when compared to windows systems. Basically if we consider windows its very much easy even for LKG student will install the packages(in windows we will call it as softwares) very much easy main windows software packages are .exe or .bat or .msi or .cab files we will just double click it will install the package for you with minimal system knowledge this is all about windows but coming to Linux its some what complex procedure to install a package below are some of the example ways you can install the packages.
1. Through shell script
2. .tar.bz2 or .tar.gz files
3. .rpm files
4. .deb files(These are the software packages for Debian flavor of Linux)
5. YUM
In order to install packages in Linux one should have depth and width of full concept then only we can troubleshoot the problems what we faced while installation so coming in to the topic directly I have divided this entire document in two parts
One is dealing with basic installation of packages
Second one is building rpm packages for your requirements like say for your architecture (i386,1686 AMD etc)
PART1 : Basic rpm package management
Example1 : For checking the package is install in your system or not
#rpm -q package name #rpm -q httpd
Example2 : For checking what are all the packages installed in your system
#rpm -qa
Here q stands for query and a stands for all
Example3 : Installing a package
#rpm -ivh packagename.versionno.arch.rpm (i) (ii) (iii) (iv)
Here I have to explain the above 4 thins
(i)Indicates the package name
(ii)Indicates the version number
(iii)Indicates the architecture type (like i386,i686,i586,i486 etc)
(iv)rpm extension
Example4 : Upgreading the package
#rpm -Uvh packagename.versionno.arch.rpm
Example5 : Installing a package with out dependencies
#rpm -ivh packagename.versionno.arch.rpm --nodeps
Example6 : Installing a package when it is not able to install, if you want to install it forcefully
#rpm -ivh packagename.versionno.arch.rpm --force
Example7 : Installing a package with dependencies
#rpm -ivh packagename.versionno.arch.rpm --aid
These are some basic ways to install the packages in coming post I will discuss about some what advanced package management like creating rpm package compilation etc Happy linux.
How To Install YUM Server In Redhat(RHEL5)
0 comments 5/22/2008 05:25:00 AM Posted by Surendra Kumar AnneLabels: Administration, Advanced Servers, How-To's, Package-Mgmt
In linux you can install packages through many ways like.
1. Through RPM,
2. Through shell script
3. Through source tar balls etc.
YUM(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 YUM implementation which will resolve this dependency issue. Here I am going to present some basic way how to use YUM 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 YUM in my google docs here. One Two Three Four Five Six Seven Eight Nine Ten
Basic YUM 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 YUM.
#createrep -v /destinationfolder/
Step4 : Create a file with repo as extention and specify the YUM details in /etc/yum.repos.d folder
#cd /etc/yum.repos.d/ #vi testing.repo
Note : The directory /etc/yum.repos.d/ contaions two .repo files which should be moved or removed to other directory, so that YUM 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 YUM 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 YUM repository is created, now you can install any package you want with yum command. In order to know more about YUM, Please see man pages for YUM.
Basic YUM 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
#yum 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/yum.repo.d/ folder to some other location #mv /etc/yum.repo.d/* /safe-loc/
Step4 : Create server.repo file in /etc/yum.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 yum to install packages, as follows.
#yum install packagename
Example : #yum install httpd
To uninstall a package through YUM
#yum remove httpd
To see the info of a package
#yum info packagename
To see the package is already installed or not
#rpm -qa grep packagename


