Installation of rpm-format software packages
1. Introduction
Almost all Linux distributions use some form of software package to manage installation, update, and uninstall software. Compared with installing software packages directly from source code, software package management is easy to install and uninstall; installed software packages are easy to update; configuration files are easy to protect; installed files are easy to track.
Rpm stands for Red Hat Package Manager (Red Hat Package Manager ). Rpm is essentially a package that contains Linux software that can be installed and run on a specific machine architecture immediately. See figure 1.
Most Linux RPM packages follow the naming rules-version-revision-type-MYsoftware-1.2-1. i386.rpm.
2. Install RPM package software
# Rpm-IVH MYsoftware-1.2-1. i386.rpm
Rpm command parameters:
-I install software.
-T test the installation.
-P shows the installation progress.
-F ignores any errors.
-U upgrade and installation.
-V check whether the kit is correctly installed.
These parameters can be used at the same time. For more information, see the RPM Command help.
3. uninstall software
# Rpm-E Software name
It should be noted that the software name is used in the code above, rather than the software package name. For example, to uninstall the software-1.2.-1. i386.rpm package, run:
# Rpm-E Software
4. Forcibly uninstall the RPM package
It is not possible to remove an RPM, especially when other programs on the system depend on it. If the command is executed, the following error message is displayed:
# Rpm-e xsnow
Error: removing these packages wowould break dependencies:
/Usr/x11r6/bin/xsnow is needed by x-amusements-1.0-1
In this case, you can use the -- force option to reinstall xsnow:
# Rpm-IVH -- force xsnow-1.41-1.i386.rpm
Xsnow
We recommend that you use the tool software kleandisk to safely and thoroughly clear RPM packages that are no longer in use.
5. Install. SRC. RPM files
At present, there are two RPM modes, one is already encoded (i386.rpm), and the other is unencoded (SRC. rpm ).
Rpm -- rebuild filename. SRC. rpm
At this time, the system will create a file filenamr. rpm, under the/usr/src/redflag/RPMS/subdirectory, it is generally i386, the specific situation is related to the Linux release version. Then execute the following code:
Rpm-IVH/usr/src/regflag/RPMS/i386/filename. rpm
Use Deb package software for Installation
Deb is a package manager provided by Debian Linux, which is very similar to rpm. But because RPM appears early and is widely used, it is common in various versions of Linux, and Debian's ensure processor dpkg only appears in debina Linux. Its advantage is that it does not need to be troubled by strict dependency check. The disadvantage is that this package management tool can be seen only in the Debian Linux release.
1. Install
# Dpkg-I MYsoftware-1.2.-1.deb
2. Uninstall
# Dpkg-e mysoftware
Install software using source code
Compared with the RPM installation method, installing software using source code is more complex. However, installing software using source code is an important tool for installing software in Linux and one of the main advantages of running Linux. You can use the source code to install the software by selecting a customized Installation Method Based on your needs, instead of installing the software by selecting pre-configured parameters in the installation package. In addition, some software programs can only be installed from the source code.
Currently, source code packages are provided in many places. The exact location of the source code depends on the special needs of the software. For software that is commonly used, such as Sendmail, you can download source code packages (such as http://www.sendmail.org) from a commercial website ). General software packages can be downloaded from the developer's Web site. The following describes the installation steps:
1. decompress the data packet
The source code software usually uses .tar.gzas as the extension name, and also has tar.zw.tar.bz2 or. tgz as the extension name. Different extension decompression commands are also different, as shown in table 1.
2. Compile the software
After the source code file is decompressed, enter the directory for unpacking. Read the README and install files before installation. Although many source code packages use the same command, there are some important differences when reading these files. For example, some software contains an installation script (. Sh) that can be installed ). Read these instructions before installation to facilitate installation and save time.
You must be the root user before installing the software. There are two methods to achieve this: log on to another terminal as a root user, or enter "Su". The system will prompt you to enter the password of the root user. After you enter the password, you will always have the permissions of the root user. If you are already a root user, you can proceed to the next step.
The common installation method is to execute the following command from the installation package directory:
Gunzip soft1.tar.gz
CD soft1
#./Configure # configuration #
Make # Call make #
Make install # Install source code #
Delete the temporary files generated during installation:
# Make clean
Uninstall software:
# Make uninstall
You can run the make uninstall command to uninstall the source code of some software packages. If you do not provide this function, you must manually delete the software. Because the software may install files in multiple directories of the system, it is often difficult to delete the files, and should be configured before compilation.
. Binfile installation. This site has a special document detailing how to install binfiles
Http://blog.csdn.net/jaxberwu/article/details/6940471
Linux green software
Linux also has some green software, but not many. The Linux system provides a mechanism to automatically respond to the requirements of software running processes and set the environment for immediate running. This mechanism can be an interface or middleware. Programs compiled by programmers can be directly copied and distributed without installation. You only need to click the program icon to access the interface provided by the operating system and set it to work. To delete the software, you can directly delete it without having to link the file. This is the simplest way to install and uninstall software.