In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail the methods of installing programs and software in the linux system. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
When installing software under Windows, you only need to run the software installation program (setup, install, etc.) or unzip the software with zip and other decompression software to install it, and run the anti-installation program (uninstall, unware, "uninstall", etc.) to clean the software with a completely graphical operation interface, as long as you keep clicking "next" with the mouse. However, Linux seems to be different. many beginners complain that it is very difficult to install and uninstall software under Linux, which is not as intuitive as when using Windows. In fact, it is also very easy to install and uninstall software under Linux. There are also installation wizards or ways to extract the installation. The only difference is that in addition to binary software distribution, there are many software packages distributed in source code. Let's talk about the installation and uninstallation of these software in detail:
Installation and uninstallation of binary distribution packages
The binary distribution of Linux software refers to the release form of a software package that has been compiled in binary form beforehand. Its advantage is that it is easy to install and use, while the disadvantage is lack of flexibility. If the package is compiled for a specific hardware / operating system platform, it cannot be executed correctly in another platform or environment.
1. Binary software package in the form of * .rpm
Installation: rpm-ivh * .rpm
Uninstall: rpm-e packgename
Description: RPM (RedHat Packge Manager) is a RedHat software package manager, it can be easily used to install, upgrade, uninstall, verify, query and other operations of the rpm form of software packages, while uninstalling the software can also be installed in multiple directories to delete clean files, so it is recommended for beginners to use the rpm form of software packages as much as possible. In the parameters of rpm,-I is the installation,-v is the check,-h is the installation progress with a hash, and * .rpm is the file name of the software package (here * .rpm refers specifically to files other than * .src.rpm with the suffix rpm). The parameter-e is the deleted package, and packgename is the package name, which is different from the file name of the package. It is often the string that precedes the version number in the file name. For example, apache-3.1.12-i386.rpm and apache-devel-3.1.12-i386.rpm are the package file names, and their package names are apache and apache-devel, respectively. For more rpm parameters, please see the man page: man rpm.
If you do not like to install or uninstall these packages under the character interface, you can use graphical package management programs with graphical interfaces such as glint, xrpm, or KDE kpackge under X-Window, so that the installation, upgrade, uninstallation, verification and query of the software package can be easily completed with the click of the mouse.
2. Binary software package in the form of * .tar.gz/*.tgz, * .bz2
Install: tar zxvf * .tar.gz or tar yxvf * .bz2
Uninstalling: manually deletin
Description: the binary package in the form of * .tar.gz / * .bz2 is packaged with tar tools and compressed with gzip/bzip2, and can be unpacked directly during installation. For software with only a single directory after decompression, uninstall with the command "rm-rf software directory name"; if the files are scattered in multiple directories, you must delete them one by one (slightly troublesome). If you want to know which files are installed in the system when unpacking, you can use the command "tar ztvf * .tar.gz" / "tar ytvf * .bz2" to get the list. The parameter z of tar is to call gzip to extract, x is to unpack, v is to check, f is to display the result, y is to call bzip2 to extract, and t is the list of files to list the package. For more parameters, see the man page: man tar.
If you prefer the graphical interface, you can use KDE's ArK compressed file management tool under X-Window.
3. Provide the software package for the installer
This type of software package already provides installation scripts or binary installation wizards (setup, install, install.sh, etc.), which can be installed simply by running it; and the uninstall script or program is provided accordingly. For example, SUN's StarOffice office software suite uses an installation program called setup, and provides anti-installation functions after software installation. At present, there are relatively few software packages of this type, because they are installed and uninstalled in the same way as Windows software, so there is no need to talk about it.
II. Installation and uninstallation of source code distribution packages
The source code distribution of Linux software refers to the release form of all the program source code of the software, which requires users to compile into executable binary code and install it. Its advantage is flexible configuration, can remove or retain some functions / modules at will, adapt to a variety of hardware / operating system platforms and compilation environment, the disadvantage is that it is difficult, generally not suitable for beginners to use.
1. Source code package in the form of * .src.rpm
Installation: rpm-rebuild * .src.rpm
Cd / usr/src/dist/RPMS
Rpm-ivh * .rpm
Uninstall: rpm-e packgename
Description: rpm-- rebuild * .src.rpm command compiles the source code and generates a binary rpm package under / usr/src/dist/RPMS, and then installs the binary package. Packgename is as described earlier.
2. Source code package in the form of * .tar.gz/*.tgz, * .bz2
Install: tar zxvf * .tar.gz or tar yxvf * .bz2 first extract
Then enter the decompressed directory:
. / configure configuration
Make compilation
Make install installation
Uninstall: make uninstall or delete manually
Note: it is recommended to read the documentation after decompression to understand the requirements of the installation and to change the compilation configuration if necessary. The source code of some software packages can be uninstalled with the make install command after compilation and installation, and if this feature is not provided, the uninstall of the software must be removed manually. As the software may be installed in multiple directories of the system, it is often difficult to delete it clean, then you should configure before compilation, specify that the software will be installed to the target path:. / configure-prefix= directory name, so that you can use the "rm-rf software directory name" command to clean and thoroughly uninstall. Compared with other installation methods, the need for users to compile and install is the most difficult, it is suitable for people who have some experience in using Linux, generally do not recommend beginners to use.
Lanche has talked so much about installing and uninstalling software under Linux, but some people may ask how to know whether a tar.gz/bz2 package is a binary package or a source code package. If you have used the compression tool, you will understand that the compression package is not necessarily software, it may also be many pictures backed up, or it may be ordinary data packaged together. The best way to tell what it is is to look at the list of files in the package, using the command tar ztvf *. Tar.gz / tar ytvf *. Bz2 or using the graphical ArK compressed file management tool under X-Window The files in the source code package often contain a variety of source code files, such as header file * .h, c code source file * .c, C++ code source file * .cc / * .cpp, etc. The files in the binary package will have executable files (often the main executable file with the same name as the software), marked by a path that contains a directory named bin (with a few exceptions). It's so simple, why don't you hurry up and try it yourself!
This is the end of this article on "what are the methods of installing programs and software in linux system?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.