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, uninstall, etc.) to clear the software completely... 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.