Install and uninstall software in Linux

Source: Internet
Author: User

When installing and uninstalling software in Linux in Windows, you only need to run the software installation program (setup, install, etc.) or unzip the software by Using zip to complete the installation, 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: i. Installation and uninstallation of binary distribution software packages binary distribution of Linux software refers to the release of Binary-format software packages that have been compiled first. Its advantage is that it is easy to install and use, the disadvantage is the lack of flexibility. If the software package is compiled for a specific hardware/operating system platform, it cannot be correctly executed on another platform or environment. Www.2cto.com 1 ,*. install a Binary Package in rpm format: rpm-ivh *. rpm uninstall: rpm-e packgename Description: RPM (RedHat Packge Manager) is a software package Manager issued by RedHat, it is easy to install, upgrade, uninstall, verify, and query rpm software packages, when you uninstall the software, you can also delete the files installed in multiple directories. Therefore, we recommend that you use software packages in rpm format as much as possible. 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, apache-3.1.12-i386.rpm and the apache-devel-3.1.12-i386.rpm are the package names, which are apache and apache-devel, respectively.
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. 2. Install Binary packages in the format of * .tar.gz/*. tgz and *. bz2: tar zxvf * .tar.gz or tar yxvf *. bz2 uninstall: manually delete www.2cto.com
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. If you prefer graphic operations, you can use KDE's ArK compression file management tool in X-Window.
3. software packages that provide installation programs. These software packages already 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.
Ii. Installation and uninstallation of the source code distribution package the source code distribution of the Linux software provides the release form of the source code of all programs of the software. You need to compile and install the executable binary code by yourself, the advantage is that the configuration is flexible, and 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 generally not suitable for beginners.
1 ,*. src. install the source code package www.2cto.com in rpm format: rpm-rebuild *. src. rpm cd/usr/src/dist/RPMS rpm-ivh *. rpm uninstall: rpm-e packgename Description: rpm -- rebuild *. src. run the rpm command to compile the source code and generate a binary rpm package under/usr/src/dist/RPMS. then install the Binary Package. Packgename is described above.
2. * .tar.gz /*. tgz ,*. installation of source code package in bz2 form: tar zxvf * .tar.gz or tar yxvf *. bz2 first decompress the package and enter the decompressed Directory :. /configure make compile make install uninstall: make uninstall or manually delete
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. Therefore, you should configure the files 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. Www.2cto.com has talked about the installation and uninstallation of the Linux software. However, I am still wondering whether a tar.gz/bz2 package is a binary 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 code source file *. 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! Article 2: Installing Linux software in windows is easy for everyone. Just double-click the setup or install icon and follow the wizard step by step to follow the prompts, 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! 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.
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, if you do not need to install the software, we recommend that you check the readme before double-clicking install, because the software you want to install may not be compiled.
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: Used to list rpm software package information.-qf: used to find 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 a highlighted green color 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, run www.2cto.com. /configure 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. 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. Article 3: Installing and uninstalling Linux software with ease has been a challenge for many new users. In Windows, we can use the installation and uninstallation programs that come with the software or "Add/delete programs" in the control panel. Similarly, in Linux, there is a powerful software installation and uninstallation tool named RPM. It can be used to establish, install, query, update, and uninstall software. This tool is used in the command line. Enter rpm at the Shell prompt to obtain help information for this command. The installation of software in Linux is mainly in two different forms. The first installation file is xxx.tar.gz, and the other is named xxx. i386.rpm. Most of the software released in the first method is sent in the source code form, and the second method is directly sent in binary form. First, copy the installation file to your directory. For example, if you log on as root, copy the software to/root. Www.2cto.com # cp xxx.tar.gz/root 2. Because the file is compressed and packaged, decompress it. Command: # tar xvzf filename.tar.gz 3. Execution author ascii991

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.