How to install software in Linux

Source: Internet
Author: User
Article Title: Software Installation Method for Linux operating systems. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source. 1. Install the source code package
 
Gzip-d apache_1.3.20.tar.gz (extract)
 
Tar xvf apache_1.3.20.tar (unpack)
 
Cd apache_1.3.20
 
. /Configure (configuration )--. /Configure -- help (view configure options)
 
Make (Compilation)
 
Make install (installation)
 
Make clean (uninstall)
 
Note: typical source code packages can be installed in this way, but not all of them, such as webmin.
 
To run the command in the directory. /Setup. sh enter interactive configuration Installation
 
Uninstall the uninstall program
 
For details, see the README file under the package to be installed.
 
   2. Install the RPM package
 
An example of an RPM package:
 
Foo-1.0-1.i386.rpm
 
This includes the software package name (foo), version number (1.0), Release number (1), and hardware platform (i386 ).
 
(1) Installation
 
# Rpm-ivh foo-1.0-1.i386.rpm
 
Foo
 
#######################
 
A. The software package has been installed.
 
# Rpm-ivh foo-1.0-1.i386.rpm
 
Foo package foo-1.0-1 is already installed
 
Error: foo-1.0-1.i386.rpm cannot be installed
 
If you still want to install the package, you can use the -- replacepkgs option on the command line, which will ignore this error message.
 
B. file conflict
 
If a file in the software package to be installed has been installed when other software packages are installed, the following error message is displayed:
 
# Rpm-ivh foo-1.0-1.i386.rpm
 
Foo/usr/bin/foo conflicts with file from bar-1.0-1
 
Error: foo-1.0-1.i386.rpm cannot be installed
 
To make RPM ignore this error message, use the -- replacefiles command line option.
 
C. Unresolved Dependencies
 
The RPM package may depend on other software packages. It can be installed only after a specific software package is installed.
 
# Rpm-ivh bar-1.0-1.i386.rpm
 
Failed dependencies:
 
Foo is needed by bar-1.0-1
 
You must install the dependent software package to solve this problem. If you want to force the installation (however, the installed software package may not run properly), use the-nodeps command line option.
 
(2) uninstall
 
# Rpm-e foo
 
Note: The package name foo is used here, instead of the package file name "foo-1.0-1.i386.rpm ".
 
If other software packages depend on the software packages you want to uninstall, an error message is generated during the uninstallation. For example:
 
# Rpm-e foo
 
Removing these packages wowould break dependencies:
 
Foo is needed by bar-1.0-1
 
Use the-nodeps command line option to ignore this error message and continue uninstallation (however, programs dependent on this software package may not run.
 
(3) Upgrade
 
# Rpm-Uvh foo-2.0-1.i386.rpm
 
Foo
 
###############################
 
When you use an earlier version of the software package to upgrade the new version of the software, the following error message is generated:
 
# Rpm-Uvh foo-1.0-1.i386.rpm
 
Foo package: foo-2.0-1 (which is newer) is already installed
 
Error: foo-1.0-1.i386.rpm cannot be installed
 
To make RPM stick to this "Upgrade", you can use the -- oldpackage command line parameter.
 
(4) Query
 
# Rpm-q foo
 
Foo-2.0-1
 
Software Package options:
 
-A: Query all installed software packages.
 
-F: queries software packages that contain files.
 
-Q
 
Query a software package with a file name
 
Information Selection options:
 
-I displays the software package information, such as description, Release number, size, build date, installation date, platform, and other information.
 
-L displays the file list in the software package.
 
-S: displays the status of all files in the package.
 
-D: displays the list of files marked as documents (man manual, info manual, README's, etc ).
 
-C: displays the list of files marked as configuration files. These are the files (sendmail. cf, passwd, inittab, etc) to be customized after installation ).
 
For the files to display the file list, you can add the-v command line option to get the output in the ls-l format.
 
(5) Verification
 
The verification software package is performed by comparing the files installed in the software package and the original file information in the software package. Besides some other items, the verification mainly involves comparing the file size, MD5 verification code, File Permission, type, owner and user group.
 
The rpm-V command is used to verify a software package, such
 
Rpm-V foo
 
Verify the software packages that contain specific files:
 
Rpm-Vf/bin/vi
 
Verify all installed software packages:
 
Rpm-Va
 
Verify a software package based on an RPM:
 
Rpm-Vp foo-1.0-1.i386.rpm
 
If you are worried that the RPM database has been damaged, you can use this method. If all verifications are normal, no output will be generated. If there is any inconsistency, it will be displayed.
 
The output format is an 8-bit long string. c is used to indicate the configuration file, followed by the file name. Each of the 8-bit characters is used to compare a file with an attribute in the RPM database. "." (Point) indicates that the test is successful.
 
The following characters indicate a test failure:
 
5. MD5 Verification Code
 
S file size
 
L symbolic connection
 
T file modification date
 
D Device
 
U user
 
G User Group
 
M mode e (including permissions and file types)
 
If there is information output, you should carefully consider whether to delete, reinstall, or correct the problems.
 
(6) Several RPM application examples
 
A. If you accidentally delete some files, you cannot be sure which files have been deleted. If you want to verify which files are lost in the entire system, type:
 
Rpm? Va
 
B. If some files are lost or damaged, you can reinstall or uninstall the software package before installing it. If you encounter a file you don't know, you can run the following command to find out which software package it belongs:
 
Rpm-qf/usr/X11R6/bin/xjewel
 
The output result is:
 
Xjewel-1.6-1
 
C. If the above two examples are combined, for example, a problem occurs in text/usr/bin/paste. If you want to verify that the software package that owns the file does not know the name of the software package, you can simply enter:
 
Rpm-Vf/usr/bin/paste
 
In this way, the corresponding software package will be verified.
 
D. If you want to know the details of a program in use, you can enter the following command to obtain the document information in the software package that owns the program:
 
Rpm-qdf/usr/bin/ispell
 
Output result:
 
/Usr/man/man4/ispell.4
 
/Usr/man/man4/english.4
 
..................................................................
 
E. If you find a new koules RPM but do not know what it is, you can enter the following command:
 
Rpm-qip koules-1.2-2.i386.rpm
 
F. Now you want to know the files installed by koules RPM. You can enter:
 
Rpm-qlp koules-1.2-2.i386.rpm
 
Graphic management tool: kpackage
 
3. Install shell or java scripts
 
Gui-based installation is generally written in SHELL or Java language. It is mainly used for office software and drawing software and installation programs, such as staroffice and oracle Installation. It is easy, just like windows.
 
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.