Install software in Linux
Let's take a look at the Linux software extension. The software suffix is. rpm was originally a package Encapsulation Format provided by Red Hat Linux. It is currently used in many Linux distributions and is suffixed. deb is a package type of debain linux.pdf suffixed with .tar.gz?tar.z=tar.bz2 or. tgz is packed with tar, a Unix packaging tool, with the suffix. bin is generally a number of commercial software. You can use the extension to understand the software format and then the software installation.
Installation of rpm-format software packages
1. Install RPM package software
# Rpm-IVH MYsoftware-1.2-1. i386.rpm
The following warning or prompt may appear during installation:
... Conflict...
It may be that some files in the package to be installed may overwrite the existing files. In this case, you cannot correctly install the files by executing "rpm -- force-I ".
... Is needed...
... Is not installed...
You can use rpm -- nodeps-I to ignore the software required for this package.
That is to say, rpm-I -- force -- nodeps can ignore all dependencies and file problems.
Can be installed, but this forced installation of software packages cannot guarantee full functionality
2. Main Parameters of the RPM command:
-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 Software
Error: removing these packages wowould break dependencies:
/Usr/x11r6/bin/software is needed by x-amusements-1.0-1
In this case, you can use the -- force option to force the software installation again:
# Rpm-IVH -- force software-1.41-1. i386.rpm
Then, 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/RedHat/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/reghatrpms/i386/filename. rpm
You can also do this:
1. rpm-I filename. SRC. rpm
2. CD/usr/src/RedHat/specs
3. rpmbuild-BP filename. Specs: A specs file with the same name as your package
4. CD/usr/src/RedHat/build/filename/a directory with the same name as your package
5 ../configure this step is the same as compiling common source code software. You can add Parameters
6. Make
7. make install
Use Deb package software for Installation
Deb is a package manager provided by Debian Linux, which is very similar to rpm. However, since RPM appeared early and widely used, it is common in various versions of Linux, and the Debian Package Manager 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.
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,
1. files with the. Z extension:
# Uncompress file. Z
2.files with the extension of .gz:
# Gunzip file.gz
3.files with the extension of .bz2:
# Bunzip2 file.bz2
4.files with the extension of .tar. Z:
# Tar xvzf file.tar. Z
Or # compress-DC file.tar. z | tar xvf-
5.files with the extension .tar.gz/. tgz:
# Tar xvzf file.tar.gz
Or gzip-DC file.tar.gz | tar xvf-
6.files with the extension of .tar.bz2:
# Tar xvif file.tar.bz2
Or Bzip2-DC file.tar.bz2 | xvf-
7.files with the extension .cpio.gz/. cgz:
# Gzip-DC file. cgz | cpio-Div
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 instruction files before installation to facilitate installation and save time.
The software must be a root user before it is installed. 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
The. binfile extension is binary, and it is also the machine language obtained after the source program is compiled. Some software can be released as an installation package suffixed with. Bin, such as the Streaming Media Player RealONE. If you have installed RealONE for Windows, it is very easy to install RealONE for Linux (File Name: r1p1_linux22_libc6_i1__a1.bin:
# Chmod + x r1p1_linux22_libc6_i1__a1.bin
#./R1p1_linux22_libc6_i1__a1.bin
Next, select the installation method, which includes general installation and advanced installation. If you do not want to change the installation directory, you can select normal installation. The installation process is almost the same as that in windwos.
Unmount the. Bind file. Take RealONE for Linux as an example. If you use the normal installation method, there will be two folders, real and realplayer9, in the user's home directory, and you can delete them.
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.
Linux software installation, Rh RPM installation is a good choice, but if you want to really master the Linux system, source code installation is still an important tool for Linux software installation.