1 / 43

Install and managing software

Install and managing software. Install and managing software. Installing software on Linux Managing installed software. 1. I nstalling software on Linux. Obtaining Linux software Installing software from source packages Installing software packages. Obtaining Linux Software.

trista
Download Presentation

Install and managing software

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Install and managing software

  2. Install and managing software Installing software on Linux Managing installed software

  3. 1. Installing software on Linux Obtaining Linux software Installing software from source packages Installing software packages

  4. Obtaining Linux Software Sources for Linux Software Verifying Your Downloads

  5. Sources for Linux Software CDs or DVD ( For example, the SUSE Linux 10.1 DVD includes hundreds of application and service RPMs in the subdirectories of the suse directory )‏ Web sites Ex: http://www.pureftpd.org http://www.rpmfind.net/linux/RPM SourceForge (http://sourceforge.net)‏

  6. In addition, you can also use the following Web sites to download software for your Linux system: Tucows http://linux.tucows.com Freshmeat http://www.freshmeat.net Linux Online http://www.linux.org/apps

  7. Verifying Your Downloads The good news is that you can check your files after they are downloaded to verify that the copy on your local system is the same as the copy on the server you downloaded from. This can be done by creating and comparing the file’s checksum value against the source file. A checksum is a value generated by calculating the contents of a file using a Message Digest 5 (MD5) algorithm

  8. After downloading the file, you could then use the sum command from the shell prompt to calculate a checksum for the local copy of the file. To do this, you simply enter sumpath/filename The sum utility reads the file and generates a checksum value for the file and displays it onscreen. You can then compare the checksum for the original file on the Web site against the checksum for the local file. If the checksums are the same, you’re in good shape. That means the files are identical. No corruption occurred during transit.

  9. Installing Software from Source Code Preparing the installation files Compiling the executable Installing the executable

  10. Preparing the Installation File Because these applications are distributed as tarballs, you must first unzip and untar them after downloading them from the Internet before you can do anything else. (tar–zxvf ./filename)‏ Ex: tar–zxvf ./pure-ftpd-1.0.21.tar.gz

  11. With the files extracted, we next need to prepare the installation files to be compiled.To run this command, verify that you’re in the directory created when the tarball was extracted. Then enter ./configure at the shell prompt

  12. Compiling the Executable At this point in the process, the program you want to install still only exists as source code in your file system. Before you can run it, you must convert the text-based source code into a binary executable file. This is done using the make command. The make command calls your system’s C compiler (such as gcc) and directs it to read the source code files, using the specifications and options listed in the Makefile file, and generate a compiled executable file.

  13. This is done by entering make at the shellprompt without any options while you are still in the directory created when you untarred the tarball file.

  14. Installing the Executable To actually install the program on your system, you use the make command a second time. However, this time you specify a target with make named INSTALL. To do this, make sure you’re still in the directory created when you untarred the tarball file. Then enter make install at the shell prompt

  15. Installing Software Packages The role and function of a package manager Installing RPM packages

  16. The Role and Function of a Package Manager Install new packages Update existing packages Verify package files Query installed packages Uninstall packages

  17. To make this happen, the RPM Package Manager has its own database, stored in /var/lib/rpm, that it uses to keep track of what packages are installed in the system. Whenever you install, uninstall, or update a package, the appropriate changes are made to this database.

  18. Installing RPM Packages

  19. Package NameThis part of the file name simply identifies the name of the package. In this example, the name of the package is acroread. Version NumberThis part of the file name specifies the version of the software in the package. In this case, the software version is 7.0.5 Release NumberThis part of the file name indicates the current release of the software version. On occasion, errors are encountered in the process of creating an RPM package. (15)‏

  20. Release Number fcx Specifies that the package is intended for Fedora Core version x. For example, fc4 indicates the package is for Fedora Core 4. rhlx Specifies that the package is intended for Red Hat Linux version x. susexxx Specifies that the package is intended for SUSE Linux version xxx. For example, suse101 indicates that the package is intended for SUSE Linux 10.1.

  21. Architecture Type This part of the file name specifies the CPU architecture that the software inside the package will run on. In the preceding example, the architecture is specified as i586. That means the software will run on any Intel Pentium or later CPU i386 Specifies that the software will run on an Intel 80386 or later CPU. i686 Specifies that the software will run on an Intel Pentium II or later CPU. athlon Specifies that the software is intended to run on an AMD Athlon CPU.

  22. Architecture Type ppc Specifies that the software is intended to run on the PowerPC CPU. noarch Specifies that the package is not architecture-dependent.

  23. you can also use the rpm command to check the authenticity of the package. This is done by entering rpm- -checksig package_ filename Install package using the rpm command: rpm–i package_filename ex: rpm–i armagetron-0.2.7.1-38.i586.rpm

  24. Some Linux administrators prefer it this way; others prefer to see some visual queues that indicate the progress of the installation. This can be done using rpm-ihv package_filename The –h option tells rpm to printhash marks on the screen as a progress indicator. The –v option tells rpm to operate verbosely, printing output to the screen.

  25. One of the fantastic features of the rpm utility is that it automatically calculates dependencies for you. You need to understand that a given Linux software package may be dependent upon another package being installed on the system before it can work properly. If this is the case, the dependent package is called a dependency. When you run the rpm utility, it queries the package you want to install and automatically checks to see if you have the dependent packages installed. If not, it will generate an error and prompt you to install the necessary packages required for the software to work.

  26. If you want to check for dependencies without actually installing the software, you can use the –test option with the rpm utility. If there are any failed dependency tests, they will be printed on the screen, allowing you to install the necessary software. You can skip the dependency tests completely and install the package even if dependent software isn’t present (not a good idea, by the way) by using the –nodeps option with rpm.

  27. 2. Manage Installed Software Uninstalling software Updating software Querying packages Verifying packages

  28. Uninstalling software Uninstalling software compiled from source code Uninstalling RPM packages

  29. Uninstalling Software Compiled from Source Code The uninstall process can vary slightly from product to product. Some applications or services may include an uninstall script in the files you extract from the tarball. If this is the case, you can execute this script to uninstall the application from your system.

  30. Uninstalling Software Compiled from Source Code Other products may include an UNINSTALL target in their Makefile file. If this is the case, you must first run configure from the directory created when you originally extracted the downloaded tarball file, just as you did when you first installed the software. Then, instead of running make install, you run makeuninstall. This will cause the make utility to follow the instructions in the uninstall portion of the Makefile file to remove the software from your system

  31. How do you know what method to use? The tarball you downloaded should include a README file of some sort that documents both the install and the uninstall process for the particular software you are working with. Check this file first. If the information isn’t available, then check the FAQ or knowledgebase on the Web site of the organization that produced the software. One of these resources should provide you with the steps you need to follow to uninstall the software.

  32. Uninstalling RPM Packages Syntax: rpm–e package_name For example, we installed the armegetron-0.2.7.1-38.i586.rpm package using rpm. We could uninstall this same package by entering rpm–e armagetron at the shell prompt.

  33. Updating Software Syntax: rpm–U package_name ex: rpm–U gftp-2.0.18-23.i586.rpm

  34. Querying Packages Syntax: rpm –q Using the –q option, you can list all the packages installed on the system, view the version and release number of a specific package installed on the system, or view details about a package.

  35. For example, if you want to generate a list of all packages installed on the system, you would enterrpm –qa. A list of installed packages will then be displayed on the screen. Be warned that the list will probably be very long! If you need information about a specific package, you can use the following options with –q: –i This option displays summary information about a specific package.

  36. --whatrequires This option displays a list of packages that require the specified packages. For example, entering rpm –q --whatrequires postfix will display a list of packages that require the postfix package. –l This option displays a list of files that are included in an RPM package. --provides This option displays the functionality the specified package supplies. --requires This useful option displays the functionality required by the specified package.

  37. Verifying Packages (Xác minh) In addition to querying packages, the rpm utility can also be used to verify packages on your system. As you are probably (painfully) aware, software can get corrupted, deleted, or otherwise messed up on any given computer system, regardless of the operating system. You can use the rpm utility to verify your installed packages and make sure everything is working the way it is supposed to. This is done using the –V option. Syntax: rpm-V package_name

  38. Ex: rpm –V gftp You can also verify all packages on the system by entering rpm–Va

  39. If an error does occur, rpm prints out the error message and the associated file name, as shown in Figure

  40. The error messages generated during the verification process follow the syntax of: SM5DLUGT cfile_name The parameters in the error message stand for the following: S Indicates a problem in the size of a file. M Indicates a problem with a file’s mode. 5 Indicates a problem with the MD5 checksum of a file. D Indicates a problem with a file’s revision numbers. L Indicates a problem with a file’s symbolic link.

  41. U Indicates a problem with a file’s ownership. G Indicates a problem with a file’s group. T Indicates a problem with the modification time of a file. c Indicates the specified file is a configuration file. file_name Specifies the name of the file that failed verification.

More Related