160 likes | 242 Views
Installing Linux softwares. Sirak Kaewjamnong. Software packets. When Linux developers create their software they typically bundle all the executable and data files into a single file called a "package" file. Package files have different formats and contain different control files
E N D
Installing Linux softwares Sirak Kaewjamnong
Software packets • When Linux developers create their software they typically bundle all the executable and data files into a single file called a "package" file. • Package files have different formats and contain different control files • Where the rest of the files should be placed • The permissions they should have • A list of prerequisite packages that are required for the package to function correctly
Packet file types • Redhat, and Fedora Linux software is primarily available in RedHat Package Manager (RPM) files • Debian and Ubuntu Linux use the Debian Package format in which the filenames end with ".deb“ called DEB files • Software developers who want to use a universally recognizable file format across all flavors of Linux also will make their products available as TAR packages
Where to get used Packages • Packages on Linux Installation CDs • Manually Downloaded Packages • two most common ways of getting packages are by manually using FTP or a Web browser
Popular Package Download Sites • Redhat • http://www.redhat.com/ • http://www.rpmfind.net/ • Fedora • ftp://download.fedora.redhat.com/pub/fedora/linux/core/ • http://download.fedora.redhat.com/pub/fedora/linux/core/ • http://www.rpmfind.net/
Popular Package Download Sites • Debain • http://packages.debian.org • Ubuntu • http://packages.ubuntu.com
How to Download Software • Getting Software Using Web-Based FTP • Browse the desired Web site until you find the link to the software package. • Click on the link for the desired software package. • Save the file to hard drive • Getting RPMs Using Command-Line Anonymous FTP
FTP Commands Command Description binary Copy files in binary mode cd Change directory on the FTP server dir List the names of the files in the current remote directory exit Bye bye get Get a file from the FTP server lcd Change the directory on the local machine ls Same as dir mget Same as get, but you can use wildcards like "*" mput Same as put, but you can use wildcards like "*" passive Make the file transfer passive mode put Put a file from the local machine onto the FTP server pwd Give the directory name on the local machine
How to Download Software • Getting software using wget • The wget command can be used to download files quickly when you already know the URL at which the RPM is locate # wget http://linux.stanford.edu/pub//i386/RPMS/dhcp-3.0pl2-6.16.i386.rpm
Installing Software From RPM Files • There are generally two ways to install RPM files manually. • using a file previously downloaded to your hard drive • install the RPM from some sort of removable media such as a CD-ROM drive • Use command “rpm” to install .rpm file
The RPM Command • rpm -Uvh is the command to install package • -U qualifier is used for updating an RPM to the latest version • -h qualifier gives a list of hash # characters during the installation • -v qualifier prints verbose status messages while the command is run
RPM command example [root@bigboy tmp]# rpm -Uvh mysql-server-3.23.58-9.i386.rpm Preparing... ####################### [100%] 1:mysql-server ####################### [100%] [root@bigboy tmp]#
RPM Installation Errors • Sometimes RPM installations will fail giving Failed dependencies errors which really mean that a prerequisite RPM needs to be installed • To get around this problem by run the rpm command with the --nodeps option to disable dependency checks [root@bigboy tmp]# rpm -Uvh --nodeps mysql-3.23.58-9.i386.rpm
Uninstalling RPMs • The rpm -e command will erase an installed package [root@bigboy tmp]# rpm -e package-name
Automatic Updates with yum The yum automatic RPM update program comes as a standard feature of Fedora Core. It has a number of valuable features: • You can configure the URLs of download sites you want to use. This provides the added advantage of you choosing the most reliable sites in your part of the globe. • yum makes multiple attempts to download RPMs before failing. • yum automatically figures out not only the RPMs packages that need updating, but also all the supporting RPMs. It then installs them all.
Installing Software From DEB Files • Unlike Redhat or Frdora,the Debian and Ubuntu versions of Linux rely on packages in the DEB format • Use dpkg --install command to install the .deb package root@u-bigboy:~# dpkg --install ndiswrapper-utils_1.8-0ubuntu2_i386.deb Selecting previously deselected package ndiswrapper-utils. (Reading database ... 70221 files and directories currently installed.) Unpacking ndiswrapper-utils (from ndiswrapper-utils_1.8-0ubuntu2_i386.deb) ... Setting up ndiswrapper-utils (1.8-0ubuntu2) ... root@u-bigboy:~#