Installation and uninstallation of software in Linux (2)

Source: Internet
Author: User
Tags unpack
  1. Install and uninstall software in Linux
  2. When installing software in Windows, you only need to run the software installation program (setup, install, and so on) or unzip the software by Using ZIP to solve the problem, run the anti-installation program (uninstall, unware, and "Uninstall") to clean up the software and provide a completely graphical operation interface, it's as simple as clicking "Next" with the mouse. Linux seems to be different. Many Beginners complain that it is very difficult to install and uninstall software in Linux. It is not as intuitive as when using Windows. In fact, installing and uninstalling software in Linux is also very simple. There are also installation wizard or unzipping installation methods, except for binary software distribution, there are many software packages distributed in the form of source code. The following describes the installation and uninstallation of these software in detail:
  3. I. Installation and uninstallation of binary distribution software packages
  4. The binary distribution of Linux software refers to the release form of a compiled binary software package. Its advantage is that it is easy to install and use, and its disadvantage is that it lacks flexibility, if the software package is compiled for a specific hardware/operating system platform, it cannot be correctly executed on another platform or environment.
  5. 1. * binary software package in RPM format
  6. Installation: rpm-IVH *. rpm
  7. Uninstall: rpm-e packgename
  8. Note: rpm (RedHat packge manager) is a software package manager provided by RedHat. It can be used to install, upgrade, uninstall, verify, and query software packages in RPM format, it is easy to install, and files installed in multiple directories can be deleted during uninstallation. Therefore, it is recommended that you use RPM software packages as much as possible for beginners. In RPM parameters,-I is the installation,-V is the verification, and-H is the use of hashes to display the installation progress ,*. rpm is the file name of the software package (here *. RPM refers *. SRC. files other than rpm with the suffix "rpm"); parameter-E is the software package to be deleted, and packgename is the software package name, which is different from the file name of the software package, it is often a string in the file name that is located before the version number, for example, the apache-3.1.12-i386.rpm and the apache-devel-3.1.12-i386.rpm are the package file names, whose packages are Apache and APACHE-devel, respectively. For more RPM parameters, see man rpm.
  9. If you do not like to install or uninstall these software packages on the Character interface, you can use graphical software package management programs such as glint and xrpm in X-window, or the kpackge of KDE. You can easily install, upgrade, uninstall, verify, and query the software package by clicking the mouse.
  10. 2. Binary packages in the form of * .tar.gz/*. tgz and *. bz2
  11. Installation: Tar zxvf * .tar.gz or tar yxvf *. bz2
  12. Uninstall: manually delete
  13. Note: The binary software package in the form of * .tar.gz/*. bz2 is packaged with the tar tool and compressed with gzip/Bzip2. You can unpack the package directly during installation. For software that only has a single directory after decompression, run the "RM-RF Software Directory Name" command during uninstallation. If the files are scattered in multiple directories, you must manually delete them one by one (a little effort). To know which files are installed in the system during decompression, run the "Tar ztvf * .tar.gz"/"Tar ytvf *. bz2 "to get the list. The tar Parameter Z is to call gzip for decompression, X is to unpack, V is to verify, F is to show the result, Y is to call Bzip2 for decompression, and T is to list the file list of the package. For more parameters, see man tar.
  14. If you prefer graphic operations, you can use KDE's Ark compression file management tool in X-window.
  15. 3. provide software packages for the installation program
  16. These software packages provide installation scripts or binary Installation Wizard programs (setup, install, install. sh, etc.), you only need to run it to complete the software installation; while the uninstallation also provides a script or program for reverse installation. For example, sun's StarOffice software suite uses the Setup installer and provides the reverse installation function after the software is installed. Currently, there are few such software packages, because the installation and uninstallation methods are the same as those for Windows software, you do not need to talk about them more.
  17. Ii. Installation and uninstallation of source code distribution software packages
  18. The source code distribution of Linux software refers to the release form of the source code of all programs of the software. You need to compile and install the executable binary code on your own. The advantage is that the configuration is flexible, some functions/modules can be removed or retained at will to adapt to a variety of hardware/operating system platforms and compiling environments. The disadvantage is that it is difficult and is generally not suitable for beginners.
  19. 1. * Source code package in the form of SRC. rpm
  20. Install: rpm-rebuild *. SRC. rpm
  21. CD/usr/src/Dist/RPMS
  22. Rpm-IVH *. rpm
  23. Uninstall: rpm-e packgename
  24. Note: The rpm -- rebuild *. SRC. RPM command compiles the source code and generates a binary RPM package under/usr/src/Dist/RPMs. then install the Binary Package. Packgename is described above.
  25. 2. Source Code packages in the form of * .tar.gz/*. tgz and *. bz2
  26. Install: Tar zxvf * .tar.gz or tar yxvf *. bz2 first
  27. Then go to the decompressed directory:
  28. ./Configure Configuration
  29. Make Compilation
  30. Make install Installation
  31. Uninstall: Make uninstall or manually delete
  32. Note: It is recommended that you decompress the package and read the instruction file to learn about the installation requirements and modify the compilation configuration when necessary. The source code of some software packages can be uninstalled by using the make install command after compilation and installation. If this function is not provided, the software must be manually deleted. Because the software may install files in multiple directories of the system, it is often difficult to delete the files, you should configure them before compilation, specify the path to which the software will be installed :. /configure -- prefix = directory name. In this way, you can run the "RM-RF Software Directory Name" command to thoroughly uninstall the directory. Compared with other installation methods, it is the most difficult to compile and install by yourself. It is suitable for users who already have some experience in Linux. It is generally not recommended for beginners.
  33. The installation and uninstallation of Linux software have already been discussed in many cases, but may I still ask whether a tar.gz/bz2 package is a binary file package or a source code package? If you have used a compression tool, you will understand that a package may not be software, it may also be a lot of pictures backed up, or it may be a common package together, the best way to identify what it is to view the file list in the package and use the command tar ztvf * .tar.gz/tar ytvf *. bz2 or use graphical Ark compression file management tools in X-window. Files in the source code package often contain various source code files, header files *. h. c source code *. c, C ++ code source file *. CC /*. CPP and so on; while files in the binary package will have executable files (the same name as the software is usually the main execution file ), the flag is that its path contains a directory named bin (only a few exceptions ). It's so easy. You can't try it now!
  34. Article 2:
  35. How to install linux software
  36. It is easy to install software in windows. You only need to double-click the setup or install icon and follow the instructions in the Wizard step by step, however, installing software in Linux is not as easy as in windows. Sometimes you find the source code of the software that has not been compiled, which is even more troublesome, here we will introduce how to install the Linux software!
  37. In Linux, software is generally compressed. The main formats include rpm1_tarw.tar.gz and tgz. So the first thing after obtaining the software is decompression.
  38. 1. It is easier to install software in RPM format in XWindow. You just need to right-click the file by moving the mouse, in the pop-up menu, there will be three special items (only when you right-click the RPM file) Show INFO, upgrade, and install. The meanings of these three items are clear, I won't say much about it. In rpmformat format, you can access tar.gz, tar.gz, and tgz. Double-click files in these formats under XWindow and the files will be automatically decompressed. They are decompressed instead of using the install option like rpm. The Install file will only appear after you decompress the file, but here I want to talk about it first. It is recommended that you have a good look at readme before double-clicking install, because the software you want to install may not be compiled, so it will be better to take a look.
  39. Ii. After completing the installation and decompression in XWindow, I will talk about how to decompress and install it in text mode and compile the source code. First, let's talk about rpm. After logging in as root (you can also log in as another identity, but some software cannot be installed) it is not difficult to type rpm-I file + extension (of course, rpm) to be decompressed. Here I want to say "-I" means install, if you want to uninstall or execute other commands, run rpm -- Help. Check the prompt from your computer, to take care of those who are not very good at E, I will write a few common parameters here:-E: uninstall the relevant application,-U (note that it is in uppercase): Upgrade the software package,-pql: lists the RPM software package information.-QF: queries the software package of the specified file. For software in other formats, you can use commands such as gunzip, Gzip, tar, and unzip to decompress the software and then run install. After unpacking, you will get some files, and then go to the decompressed file directory and run the "ls-F-color" command to check the obtained files. There are two situations: the first is that the file is a compiled program (no need to compile it again). The above command to view the file will be displayed in bright green with the "*" mark; the second is the source code that needs to be compiled by yourself. If we get the source code, we need to compile it ourselves to get the executable program. When you hear the compilation of the source code, will it scare you? In fact, just a few words are added. It is difficult for beginners to learn how to use a good operating system, think about it when you learn to show your hand in front of Mm ......, Read the README document carefully before compiling. The old birds do not need it. After reading it, execute it.
  40. ./Configure
  41. Make
  42. Make install (this command can be executed only as root). After compilation, the executable program of the software is obtained in the current directory or SRC subdirectory.
  43. After the introduction, do you think it is easier to install RPM software, by compiling the software source code, you can lay a foundation for later kernel compilation.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.