Linux installation file method summary

 

Check if the software is installed:

 

Because there are many ways to install software in Linux, there is no general way to check whether certain software is installed. In summary, these categories are:

1. If the rpm package is installed, you can use rpm -qa to see it. If you want to find out whether a package is installed, use rpm -qa | grep "the name of the software or package".
  rpm -qa | grep ruby
2. Installed with deb package, you can see it with dpkg -l. If you are looking for a specific package, use dpkg -l | grep "name of software or package";
 dpkg -l | grep ruby
3. If the yum method is installed, you can use yum list installed to find it. If you are looking for a specified package, add | grep "software name or package name" after the command;
  yum list installed | grep ruby
4. If the source package is compiled and installed by itself, for example, in the form of .tar.gz or tar.bz2, this can only depend on whether the executable file exists.
The above two methods cannot see the package installed in this source form. If installed as root user, executable programs are usually in the /sbin:/usr/bin directory.
 Query binary files with whereis: whereis grep

  

 

1. RPM package installation (RedHat Package Manager), this is the compiled software

 

1. RPM package installation (RedHat Package Manager), this is the compiled software
Double-click directly on the graphical interface to install
 1. Install the rpm package rpm -ivh "installation package"
 2. Upgrade a package rpm -Uvh "installation package"
 
 Uninstall:
    1 Because the software name under LINUX includes the version number, it is best to determine the full name of the software before uninstalling.
	Find RPM package software: rpm -qa ×××*
	Note: ××× refers to the letters at the beginning of the software name. It is not required to write all of them, but don’t make a mistake. * is the wildcard symbol “*”.
	That is, the asterisk, if you want to find the REALPLAYER software installed in the machine, you can enter: rpm -qa realplay*
    2 After the software is found, the full name of the software is displayed, such as firefox-1.0.1-1.3.2
    Execute the uninstall command: rpm -e firefox-1.0.1-1.3.2
    ===Installation directory, execute the command to find: rpm -ql firefox-1.0.1-1.3.2

 

Second, the source code installation tar.gz (bz or bz2, etc.) end of the source code package, this package contains the source program, has not been compiled, need to be compiled before installation

 

   1 Unzip the file according to the compressed package type (* represents the compressed package name)
    tar -zxvf ****.tar.gz
    tar -jxvf ****.tar.bz (or bz2)
   2 Use the CD command to enter the decompressed directory
   3 Enter the compile file command: ./configure (some compressed packages have already been compiled, this step can be omitted) (see other parameters ./configure --help)
   4 Then the command: make
   5 Then install the file command: make install
   If there are no errors, the installation is complete
Uninstall:
   1 Enter the compiled software directory, that is, the directory during installation (the directory executed by ./configure during source installation)
   2 Execute the uninstall command: make uninstall

   Installation directory: Pay attention to the installation directory during the make install command, or read the readme file in the installation directory. Of course, the best way is to specify the installation directory during the installation process, that is, add the parameter --prefix= after the ./configure command /**,
For example: ./configure --prefix=/usr/local/aaaa, that is, install the software in the aaaa directory of the /usr/local/ path. The default installation directory of general software is in /usr/local or /opt, you can find it there
  

 Third, the installation package ending with bin, this kind of package is similar to the RPM package, and the installation is relatively simple

 

 

 

1. Open a shell, the terminal
2. Use the CD command to enter the directory where the source code archive is located
3. Add executable attributes to the file: chmod +x ******.bin (the middle is the letter x, lowercase)
4. Execute the command: ./******.bin (realplayer for linux is such an installation package)
5. Uninstall: delete the installation directory selected during installation and it is OK
   The directory can be specified during the installation process, similar to the installation under Windows.
5 Software execution: Go to the /usr/bin directory to find the installed software startup file and execute the command. The Linux system connects all executable file commands in the /usr/bin directory. You can go to that directory to find the startup command of the file you installed, and double-click to start it.

 

Fourth, yum software installation 

 
.Install all update software command: yum update
Update only the specified software command: yum update <package_name>
Install packages with YUM command: yum install <package_name>
Remove packages with YUM command: yum remove <package_name>
Use YUM to find the package command: yum search <keyword> Query the package name of an installation package, and then install it
 
 http://www.jb51.net/os/RedHat/1104.html

 Five, apt-get 

command action
apt-cache search package Search packages
apt-cache show package Get information about the package, such as description, size, version, etc.
sudo apt-get install package install package
sudo apt-get install package --reinstall to reinstall the package
sudo apt-get -f install Forced installation? #"-f = --fix-missing" as a repair installation...
sudo apt-get remove package remove package
sudo apt-get remove package -- -- purge removes packages, including removing configuration files, etc.
sudo apt-get update update source
sudo apt-get upgrade to update installed packages
sudo apt-get dist-upgrade upgrade system
sudo apt-get dselect-upgrade upgrade using dselect
apt-cache depends package to understand using dependencies
apt-cache rdepends package Know a specific dependency? #When it is to see which packages depend on the package...
sudo apt-get build-dep package install related compilation environment
apt-get source package Download the source code of the package
sudo apt-get clean && sudo apt-get autoclean clean archive of downloaded files && only clean useless packages
sudo apt-get check to check for broken dependencies
refer to:
http://blog.csdn.net/acanoe/article/details/8225780

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326859395&siteId=291194637