Linux Install the software command detailed __linux

Source: Internet
Author: User
Tags prepare unpack

----------------------------------------------------------------

You may not know enough about Linux, but once you step into the company, you'll find Linux is ubiquitous, and a lot of things are based on other servers (LINUX,HP ...). Connected to the operation of a series of work, and can not be separated from the command to operate everything, below I will say how to install software on Linux.

---------------------------------------------------------------

LINUX Install software Method command method
0, how to install the application software. Where my software is installed.
How to remove the No application software.
......
Now, let's take a look at these issues together.
first, the analysis of Linux application Software installation package:There are usually three packages of Linux application software:
1 tar packs, such as software-1.2.3-1.tar.gz. It is packaged using the packaging tools of the UNIX system, tar.
2 RPM package, such as software-1.2.3-1.i386.rpm. It is a package encapsulation format provided by Redhat Linux.
3) dpkg package, such as Software-1.2.3-1.deb. It is a package encapsulation format provided by Debain Linux.
Moreover, the naming of most Linux application packages also has a certain regularity, which follows:
Name-version-revised version-type
For example:
1) software-1.2.3-1.tar.gz means:
Software name: Software
Version number: 1.2.3
Revised version: 1
Type: tar.gz, description is a tar package.
2) sfotware-1.2.3-1.i386.rpm
Software name: Software
Version number: 1.2.3
Revised version: 1
Available platforms: i386, for the Intel 80x86 platform.
Type: RPM, description is an RPM package.
Note: Because the RPM format is usually a compiled program, you need to indicate the platform. will be explained in detail later.
And Software-1.2.3-1.deb don't have to talk about it. Let's practice it by ourselves.
Second, understand the contents of the package:A software package for a Linux application can contain two different kinds of content:
1 One is the executable file, that is, after the unpack can be directly run. All packages in Windows are of this type. After installing this program, you will be able to use it, but you cannot see the source program. And the download should pay attention to whether this software is the platform you use, otherwise it will not be installed normally.
2 The other is the source program, you will also need to use the compiler to compile it into an executable file after the package is unpacked. This is virtually impossible in Windows systems because the idea of Windows is not open to source programs.
Usually, the package with tar is the source program, and RPM, dpkg packaging is often an executable program. In general, it is more flexible to compile the source program yourself, but it is also easy to encounter various problems and difficulties. By contrast, downloading those executable packages makes it easier to install the software, and of course it's much less flexible. Therefore, a general software will always provide a variety of packaging format installation program. You can choose according to your own situation.
third, the use of tar packaged application software 1. Installation:The entire installation process can be divided into the following steps:
1 Obtain the application software: by downloading, purchase the CD-ROM method to obtain;
2 Decompression file: General tar package, will do a compression, such as gzip, bz2, etc., so you need to extract first. If the most common GZ format, you can perform: "TAR–XVZF package Name", you can complete the decompression and unpacking work. If not, then use the decompression software, and then perform the "TAR–XVF extracted after the tar package" for unpacking;
3 Read the accompanying install file, readme file;
4 Execute "./configure" command to prepare for compilation;
5 Execute the "make" command to compile the software;
6 perform "Make install" to complete the installation;
7 Execute "make clean" to delete the temporary files generated by the installation.
Well, that's it. We can then run the application. But then, some readers will ask, how do I do it. This is also a problem with Linux features. In fact, in general, the Linux application software executable file will be stored in the/usr/local/bin directory. But this is not "put the universal" truth, the most reliable or look at the software install and Readme files, general will have instructions.
2. Uninstall:Usually software developers rarely consider how to uninstall their own software, while Tar is just the completion of packaging work, so does not provide a good uninstall method.
Then it is not possible to uninstall it. Not really, there are two software that can solve this problem, that is kinstall and kife, they are the gold partner of the TAR package installation, uninstall. The use of their methods, the author will be introduced separately. I will not repeat them here.
Four, the use of RPM packaged application softwareRPM is a big contributor to Redhat, which makes Linux software installation much simpler and easier.
1. Installation:I just need a simple word, I can finish. Execution: RPM–IVH RPM Package Name
More advanced, please see the following table:
RPM Parameter Parameter description
-I installation software
-t test installation, not a true installation
-P Display Installation progress
-F Ignores any errors
-U Upgrade Installation
-V Detection Suite is properly installed
These parameters can be used at the same time. More content can be referenced by the RPM command Help.
2. Uninstall:I also need a simple word, you can finish. Perform:
Rpm–e Software Name
Note, however, that the software name, not the package name, is used later. For example, to install software-1.2.3-1.i386.rpm This package, you should perform:
RPM–IVH software-1.2.3-1.i386.rpm
And when unloading, you should perform: Rpm–e software.

Note: The query system has installed software Rpm-q software name
To view all installed packages in the system, add-a parameters

In addition, graphical RPM tools such as gnorpm and KPackage are also available in Linux, making the process simpler. The specific application of these software, the author will be introduced separately.

Take care of the application that was packaged with Deb this is a package manager provided by Debian Linux, which is very similar to RPM. But because RPM appears earlier, it is common in all versions of Linux. The Debian Package Manager dpkg only appears in Debina Linux, and other Linux versions are not generally available. Here's a brief explanation:
1. Install dpkg–i Deb package name
such as: Dpkg–i Software-1.2.3-1.deb
2. Uninstall dpkg–e software name
such as: Dpkg–e software
    

===================================================================================Vi. installation of software
----Linux Software Installation is mainly in two different forms. The first installation file name is filename.tar.gz. Another installation file name is filename.i386.rpm. Software distributed in the first way is sent in the form of source code. The second method is directly distributed in binary form. i386 means that the software is compiled according to the Inter 386 instruction set.
----for the first type, the installation method is as follows:
----First, copy the installation files to your directory. For example, if you are logged on as root, copy the software to/root.
----#cp Filename.tar.gz/root
----Because the file is compressed and packaged, it should be decompressed. The command is:
----#tar Xvzf filename.tar.gz
----The command is executed, the installation file is decompressed in the current directory by path. Use the LS command to see the uncompressed file. A file known as "INSTALL" in a file that is typically produced after decompression. This file is a plain text file, detailing how the package is installed.
----for most software that needs to be compiled, they are installed in roughly the same way. An executable script named Configure that is produced after the decompression is performed. It is the system information required for installation to check whether the system has the necessary libraries to compile, and whether the version of the library meets the needs of the compilation. Prepare for the subsequent compilation work. The command is:
----#./configure
----If an error is found during the inspection, configure will give a prompt and stop checking. You may be prompted to configure the system. Re-execute the program again. After the check is passed, the makefile file for compilation is generated. At this point, you are ready to start compiling. The process of compiling depends on the size of the software and the performance of the computer, and the time spent is different. The command is:
----#make
After the----compiles successfully, type the following command to start the installation:
----#make Install
----installation is complete, the files generated during the compilation process should be purged from the temporary files and configuration. Type the following command:
#make Clean
#make Distclean
At this point, the software installation is complete.
----for the second, the installation method is much simpler.
----the same as the first way, copy the installation files to your directory. Then use RPM to install the file. The order is as follows:
----#rpm-I filename.i386.rpm
----RPM will automatically unpack the installation files and install the software to the default directory. and register the software installation information into the RPM database. The function of the parameter i is to get the RPM into installation mode.
----In addition, there are some commercial software under the Linux platform. In its installation files, there is a setup installer that is installed the same way as under the Windows platform. such as: Corel WordPerfect.
Uninstall of software
The uninstall of----software is mainly done using RPM. The uninstall software first needs to know the name that the package registers in the system. Type the command:
----#rpm-Q-A
----can query all the packages installed in the current system. The function of the parameter q is to make the RPM Enter Query command mode. Parameter A is a child of the query mode, meaning all. Query to more information, you can use the less screen display.
----Determine the name of the software you want to uninstall, you can start to actually uninstall the software. Type the command:
----#rpm-E [package name]
----can uninstall the software. The function of the parameter e is to get the RPM into uninstall mode. Uninstall the package named [Package name]. There is a dependency between each package in the system. If you cannot uninstall because of dependencies, RPM prompts and stops uninstalling. You can use the following commands to ignore dependencies and start uninstalling directly:
----#rpm-E [package name]-nodeps
----Ignoring the uninstall of dependencies can cause other software in the system to be unusable. You can use
----#rpm-E [package name]-test
----make RPM perform an uninstall preview instead of actually uninstalling it. This allows you to check whether the software has dependencies. There is an error during the uninstall process.

Related Article

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.