Software installation and uninstallation under Linux

  

Type of software installation package

There are usually five installations of Linux application software: 1) tar+ gz package, such as software-1.2.3-1.tar.gz. He is packaged using the packaging tool tar for UNIX systems. 2) rpm package, such as software-1.2.3-1.i386.rpm. He is a package encapsulation format provided by Redhat Linux (www.rpmfind.net). 3) dpkg (deb) package, such as software-1.2.3-1.deb. He is a package encapsulation format provided by Debain (ubuntu) Linux. 4) The bin package, such as RealPlayer11GOLD.bin, is the binary installation format of the realplayer linux file, which is a machine language compiled by the source program. 5) Script installation files, this type of format is more, for example, the files with the suffixes sh, pl, and run are script files. However, it is not very common for ordinary users. The problem to be aware of when installing such files is that most of them need to add executable permissions to the file first, otherwise you may be prompted to find the file. Specific method: execute chmod +x ***.* under the terminal or console, and then install.


Second naming rules for software packages

The naming of most Linux application packages is also regular. He follows: Name-Version-Revision-Type. For example: 1) software-1.2.3-1.tar.gz means: software name: software | version number: 1.2.3 | revision version: 1 | type: tar.gz, description is a tar package. 2) sfotware-1.2.3-1.i386.rpm means: software name: software | version number: 1.2.3 | revision version: 1 | available platform: i386, for Intel 80x86 platform | type: rpm, description is a Rpm package.


Installation of three software

Novice: After installing the system, you can use apt-get update (debian system) or yum update (redhat system). Most of the software needed!


1. Source code packages in the form of *.tar.gz/*.tgz/*.bz2 Packages ending in tar.gz or tgz or tar.bz2 are generally source-coded software that installs such software. First you need to extract the software: # tar zxvf filename.tar.gz # tar xvfz filename.tgz # tar xvf j filename.tar.bz2 After decompression, you can enter the decompressed directory: # cd filename/For such documents, The common installation steps are: configuration, compile and install 3 steps, the most troublesome is the configuration, because all the configuration related to the software installation is specified in this step: such as the software installation location. Configuration: ./configure Compile: make Install: make install Uninstall: make uninstall or manually delete Description: It is recommended to read the documentation (ReadMe and Install) after unpacking to understand the installation requirements, and also need to change the compilation configuration if necessary. The source code of some packages can be uninstalled with the make uninstall command after compiling and installing. If this feature is not provided, the software uninstallation must be done manually. Since the software may install the files in multiple directories in the system, it is often difficult to remove them. You should configure them before compilation, and specify the software to be installed to the target path: ./configure --prefix=directory name This way, you can use the “rm -rf software directory name” command to cleanly and completely uninstall. Compared with other installation methods, it is the most difficult to compile and install the user. It is suitable for people who have some experience in using Linux. Generally, it is not recommended for beginners.


2. Source code package in the form .src.rpm Installation: rpm -rebuild *.src.rpm cd /usr/src/dist/RPMS rpm -ivh *.rpm Uninstall: rpm -e packgename Description: rpm --rebuild *. The src.rpm command compiles the source code and generates a binary RPM package under /usr/src/dist/RPMS, and then installs the binary package.


3 . Installation of RPM format package 1). Installation Command format: rpm-i(or--install) options file1.rpm ... fileN.rpm Parameters: file1.rpm...fileN.rpm refers to the file name of the RPM package to be installed. Detailed options: -h(or—hash) Output hash mark when installing; test only tests the installation, it is not actually installed; --percent outputs the progress of the installation as a percentage; --- excludedocs does not install the documentation in the package ;--includedocs installation documentation; --replacepkgs force reinstallation of installed packages; -- replacefiles replace files belonging to other packages; --force ignores package and document conflicts; --noscripts does not run pre-install and post Install script; -- prefix NEWPATH to install the package to the path specified by NEWPATH; --ignorearch does not verify the structure of the package; --ignoreos does not check the operating system running the package; --nodeps does not check the dependency relationship ;--ftpproxy HOST uses HOST as the FTP proxy; --ftpport PORT specifies the FTP port number as PORT. General options: -v displays additional information; -vv displays debugging information; --root DIRECTORY allows RPM to use the path specified by DIRECTORY as the root directory, so pre-installer and post-installer will be installed to this directory; --rcfile FILELIST setting The rpmrc file is FILELIST; --dbpath DIRECTORY sets the path where the RPM repository is DIRECTORY. 2). Delete Command format: rpm -e(or--erase) options pkg1 ... pkgN Parameters: pkg1...pkgN: The package to be deleted. Detailed options: --test only performs the deleted test; --noscripts does not run pre-install and post-install scripts; --nodeps does not check dependencies. General options: -vv displays debugging information; --root DIRECTORY allows RPM to use the path specified by DIRECTORY as the root directory, so the pre-installer and post-installer will be installed to this directory; --rcfile FILELIST sets the rpmrc file to FILELIST;- -dbpath DIRECTORY sets the path where the RPM repository is located to DIRECTORY. 3). Upgrade Command format: rpm -U(or--upgrade) options file1.rpm ... fileN.rpm Parameters: file1.rpm...fileN.rpm refers to the name of the package. Detailed options: -h(or—hash) output hash mark when installing; —oldpackage allows an old version; --test only performs upgrade test; --excludedocs does not install files in package; --includedocs installation file;- -replacepkgs forces reinstallation of already installed packages; --replacefiles replaces files belonging to other packages; --force ignores package and file conflicts; --percent outputs installation progress as a percentage; --noscripts does not run Pre-installation and post-installation scripts; --prefix NEWPATH installs the package to the path specified by NEWPATH; --ignorearch does not verify the structure of the package; --ignoreos does not check the operating system running on the package; --nodeps does not Check the dependency relationship; --ftpproxy HOST uses HOST as the FTP proxy; --ftpport HOST specifies the FTP nickname as HOST.

Copyright © Windows knowledge All Rights Reserved