Linux file installation

Source: Internet
Author: User
The Linux software installation package contains two types: rpmand .tar.gz. I will introduce the following: (Hey, I just learned) 1. install the rpm Package: rpm-Uvh package name (upgrade a package) uninstall the rpm Package: rpm-e package name (or the package name where the software is installed on the local machine, in fact, is only a few suffixes) not compiled...

There are two types of Linux software installation packages: rpmand .tar.gz. I will introduce them below: (Hey, I just learned)
1. install the rpm Package:
Rpm-Uvh package name (upgrade one package)
Detach an rpm Package:
Rpm-e package name (or the package name where the software is installed on a local machine is actually a few suffixes)
Uncompiled rpm Package installation
Rpm-rebuild src. rpm
Rpm-ivh... rpm

2. installation of the tar.gz package
First, release the .tar.gz package: tar-xzvf package name

There are three options to choose, because you need to go to the installation package to view the details, in the package
If the configure file exists, run:
#./Configure
# Make
# Make install
If a Makefile file exists, run:
# Make
# Make install
If an Imake file exists, run:
# Xmkmf

 

List of commonly used tar and rpm command parameters
  
1. tar
  
1.zip a group of files with the suffix tar.gz.
# Tar cvf backup.tar/etc
# Gzip-q backup.tar
Or
# Tar cvfz backup.tar.gz/etc/
  
2.release a file suffixed with tar.gz.
# Gunzip backup.tar.gz
# Tar xvf backup.tar
Or
# Tar xvfz backup.tar.gz
  
3. compress with one command
# Tar cvf-/etc/| gzip-qc> backup.tar.gz
  
4. run a command to release the instance.
# Gunzip-c backup.tar.gz | tar xvf-
  
5. how to unbind the tar. Z file?
# Tar xvfz backup.tar. Z
Or
# Uncompress backup.tar. Z
# Tar xvf backup.tar
  
6. how to unbind the. tgz file?
# Gunzip backup. tgz
  
7.how to compress and decompress the. bz2 package?
# Bzip2/etc/smb. conf
This will compress the smb.confinto smb.conf.bz2
# Bunzip2/etc/smb.conf.bz2
In this case, smb.conf.bz2 will be restored to smb. conf in the current directory.
Note:. bz2 compression format is not very common, you can use man bzip2
  
II. rpm
  
1. install a package
# Rpm-ivh BBS.bitsCN.com Network Management Forum
  
2. upgrade a package
# Rpm-Uvh
  
3. remove a package
# Rpm-e
  
4. installation parameters
-- Force installation even if it overwrites files belonging to other packages
-- Nodeps if the installation of this RPM package depends on other packages, it is forced even if other packages are not installed.
Install.
  
5. check whether a package is installed.
# Rpm-q <rpm package name>
  
6. obtain the installed package information.
# Rpm-qi <rpm package name>
  
7. list the files in the package
# Rpm-ql <rpm package name>
  
8. list the RPM packages of a file on the server.
# Rpm-qf
  
9. it can be used together with several parameters
# Rpm-qil <rpm package name>
  
10. list all installed rpm packages
# Rpm-qa
  
11. list the files contained in an RPM package that has not been installed into the system?
# Rpm-qilp <rpm package name>



Author: kanexiao

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.