Showing posts with label Package-Mgmt. Show all posts
Showing posts with label Package-Mgmt. Show all posts

How To Upgrade An Installed Source Package?

0 comments

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



  • Like the post? Please Subscribe to free RSS feed to get updates
  • How To Uninstall A Source Package?

    0 comments

    In Linux we can install packages in so many ways such as:
    #rpm –ivh packagename.ver.arch.rpm
    This is to install from rpm package manager

    #yum install packagename
    This is installing through yum which will use rpm package manager internally
    #apt-get install packagename
    This is for installing .deb packages

    #sh file.sh
    This is from a shell script.
    #./configure;make;make check;make install
    This is to install from source package.
    Etc. but when we want to uninstall above packages we will use package removing commands as below
    #rpm –e packagename
    For uninstalling an rpm package, which are installed through rpm/yum

    #yum remove packagename
    Uninstalling through yum... Etc...
    But what about uninstalling source package? How to uninstall a source package?
    This can be done in two ways
    Way1 : If we have still the source code with us in our system, then it’s very much easy to uninstall as shown below
    #cd sourcefolderpath
    #make uninstall
    This will completely install the package/software

    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/packagename
    /var/log/packagename
    /usr/local/packagename
    /bin/
    /sbin/
    /usr/bin/
    /usr/sbin/
    /usr/share/doc/packagename

    Etc.. so we have to go to each folder and have to remove all the files whose name contains packagename.
    Note : If you install any package through source package, rpm –e or yum remove commands will not help us in removing the package installed through source package.
    Please comment your thoughts regarding this post:-)

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Installing YUM server in RHEL4

    0 comments

    If you are looking for YUM server in RHEL5 you can clickhere other wise just read on..
    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..
    so I did some research and collected some documentation on net and implemented YUM server in RHEL4
    configuring YUM server in RHEL4 as follows..
    Stpe1:Download following packages
    sqlite-2.8.16-1.2.el4.rf.i386.rpm
    python-sqlite-0.5.0-1.2.elr4.rf.i386.rpm
    python-urlgrabber-2.9.6-1.2.el4.rf.noaarch.rpm
    pytyhon-elementtree-1.26-1.2.el4.rf.noarch.rpm
    python-celementtree-1.0.2-1.2.el4.rf.i386.rpm
    yum-2.4.2-1.noarch.rpm
    yum-utils-0.3.1-1.fc4.noarch.rpm ( we need for repository)
    createrepo-0.3.1-1.noarch.rpm
    Stpe2: Install the above mention packages in the same sequence once you download them.
    rpm -Uvh sqlite-2.8.16-1.2.el4.rf.i386.rpm
    rpm -Uvh python-sqlite-0.5.0-1.2.elr4.rf.i386.rpm
    rpm -Uvh python-urlgrabber-2.9.6-1.2.el4.rf.noaarch.rpm
    rpm -Uvh pytyhon-elementtree-1.26-1.2.el4.rf.noarch.rpm
    rpm -Uvh python-celementtree-1.0.2-1.2.el4.rf.i386.rpm
    rpm -Uvh yum-2.4.2-1.noarch.rpm
    rpm -Uvh yum-utils-0.3.1-1.fc4.noarch.rpm
    rpm -Uvh createrepo-0.3.1-1.noarch.rpm
    Step3:Now dump your rpms from your RHEL4 cds/dvd
    cp -ar * /var/ftp/pub/Server/
    Step4: Create repository
    #createrepo -v /var/ftp/pub/Server/
    Here yum server will create a repository and metadata once creation of metadata is done we can configure yum client on the same mechine.. as follows
    Step5:Creating a repo file and updating with the repository details
    #vi /etc/yum.repo.d/server.repo
    [server]
    name= Redhat repository
    gpgcheck=0
    save the file and exit and start using yum to install packages in RHEL4.

  • Like the post? Please Subscribe to free RSS feed to get updates
  • RPM package management-III(Advanced Package MGMT)

    0 comments

    Creating RPM packages from Source

    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

  • Like the post? Please Subscribe to free RSS feed to get updates
  • RPM Package Management-II (Checkinstall)

    0 comments

    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.

  • Like the post? Please Subscribe to free RSS feed to get updates
  • RPM Package Management - I

    1 comments

    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.

  • Like the post? Please Subscribe to free RSS feed to get updates
  • How To Install YUM Server In Redhat(RHEL5)

    0 comments

    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

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Archive

    Translate this page

     

    The Linux Juggernaut | Copyright 2006-2009 Surendra Kumar Anne | Surendra's Home Page | Give us feedback how we are doing, Click here