A few days ago, a netizen asked a Linux software installation RPM question. He did not think that he was very good at forgetting his knowledge ..... put some common ones here, and you can copy them as well. Do not lose the basic things, alas .... three days without hands-on training
1. How to install the rpm Software Package
You can use the program rpm to install the rmp package. Run the following command:
Rpm-I your-package.rpm
The your-package.rpm is the file name of the rpm package you want to install, usually under the current directory.
The following warning or prompt may appear during installation:
... Conflict with... may be that some files in the package to be installed may overwrite the existing
In this case, you cannot correctly install the file.
Rpm -- force-I force Installation
... Is needed...
... Is not installed... some software required for this package can be used without Installation
Rpm -- nodeps-I to ignore this information
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. How to install the. src. rpm Software Package
Some software packages end with. src. rpm. These software packages are rpm packages that contain source code.
Compilation is required. There are two installation methods for such software packages,
Method 1:
1. Execute rpm-I your-package.src.rpm
2. cd/usr/src/redhat/SPECS
3. rpmbuild-bp your-package.specs A specs file with the same name as your package
4. cd/usr/src/redhat/BUILD/your-package/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
Method 2:
1. Execute rpm-I you-package.src.rpm
2. cd/usr/src/redhat/SPECS
The first two steps are the same as method 1.
3. rpmbuild-bb your-package.specs A specs file with the same name as your package
At this time, in/usr/src/redhat/RPM/i386/depending on the specific package, it may be i686, noarch, etc)
There is a new rpm package under this Directory, which is a compiled binary file.
Run the rpm-I new-package.rpm to complete the installation.
3. How to uninstall the rpm Software Package
Run the command rpm-e package name. The package name can contain the version number and other information, but cannot have a suffix. rpm.
For example, to uninstall a software package proftpd-1.2.8-1, you can use the following format:
Rpm e proftpd-1.2.8-1
Rpm e proftpd-1.2.8
Rpm-e proftpd-
Rpm-e proftpd
It cannot be in the following format:
Rpm e proftpd-1.2.8-1.i386.rpm
Rpm e proftpd-1.2.8-1.i386
Rpm e proftpd-1.2
Rpm e proftpd-1
Sometimes there are some errors or warnings:
... Is needed by... This indicates that this software is required by other software and cannot be detached.
You can use rpm-e -- nodeps to force uninstall
4. How to get files in the rpm package without installing
Use tools rpm2cpio and cpio
Rpm2cpio xxx. rpm | cpio-vi
Rpm2cpio xxx. rpm | cpio-idmv
Rpm2cpio xxx. rpm | cpio -- extract -- make-directories
The parameter I is the same as the extract parameter, indicating that the file is extracted. V indicates the execution process.
D is the same as make-directory, which indicates creating a directory based on the original path of the file in the package.
M indicates the file update time.
Click Install RPM for Linux software below).