Learn linux: the software was installed in this way

Source: Internet
Author: User
Learn linux: the software was installed in this way-general Linux technology-Linux technology and application information. The following is a detailed description. LINUX software packages can usually be found from the release disc or on the Internet. The general format is divided into source code and executable code. To save disk space or download time, most software packages are compressed files.

Such as file.tar.gz?file.src.tar.gz and file. rpm.

Before introducing general installation methods, we should remind you to develop a good habit of operation and usage. Because of the advanced nature of LINUX design and multi-user usage, you should follow the following principles as much as possible throughout the installation process:

1. If you don't want to mess up directories, you have to build a readable directory before downloading the software. Instead of simply understanding what it means. At the same time, it is easy to remember what is in it the next time you see it.

2. Unless you install software purely to install the software, you must have a backup directory before installing the software, preferably remote backup. It is used to store commonly used or important software packages.

3. Before you try a new software, do not test run on a machine that is currently running official business or has important data but has not been properly backed up. That is, you cannot take risks.

4. execute various commands as ROOT during installation. After the installation is complete, check the permissions carefully.

5. Put the temporary directory generated during installation into the/tmp directory as much as possible. A good start is: You put the software to be installed in the/tmp directory at the beginning. After you are sure that the installation is successful, do not forget to delete it.

6. Understand your CPU and LINUX version types and download appropriate software packages. If multiple formats exist, we recommend that you use a software package in RPM format. Because it is easy to use and error-prone.

Now you can start.

For software packages ending with. RPM, simply execute rpm-ivh file. rpm. If it prompts you that something is missing, you must complete it first. If it prompts that the software package has been installed, but it may be incomplete or you want to force the installation for other reasons, type the following command: rpm-ivh -- replacepkgs file. rpm.

There may be various conflicts when installing the RPM software package. In particular, when you want to install the latest software package in the old version, you will often have the following similar tips:

Failed dependencies:
Kernel> = 2.2.10 is needed by file. X
File. X = 0.80.1 is needed by otherfile. y

This information indicates that to use new software, you must upgrade the LINUX kernel to 2.2.10 and install file. x. x. x, you must install another software package otherfile. y. y. y. The -- nodeps option can be used to ignore the software package relevance check, but this is generally not recommended.

For software packaged in rpm format, if you have an old version of the software before, you generally have to prioritize the upgrade mode rather than the installation mode, because you can keep the configuration file. Even if the old version does not exist, the upgrade mode will not cause errors.

Therefore, you can use the following command: rpm-Uvh file. rpm.

Because LINUX advocates DIY and promotes individuality, in order to make the software more suitable for your machine, and to advocate open source and sharing spirit, it generally provides download in the form of source code. If you get such a software package, you have to re-compile the software package after decompression.

First, put the software package in the/tmp directory, and then execute

Tar zxvf file.src.tar.gz.

At this point, you usually have to check which directories are available after decompression and whether there is README or INSTALL software. If yes, read it carefully. If you can understand it, you do not need to read this document. The general steps include make and makeinstall. Obviously, you will use gcc-this should be provided in all releases. In the meantime, it usually asks which directory the software is installed in. You can simply put it in the/usr directory. If your/usr directory is set to a read-only partition (this is usually based on security considerations), you can put it in the/home/bin/local/bin/file directory. The premise is that this is also one of your good habits. You will not be able to find it next time.

If you are using a well-known release version like redhat, there will be an intuitive and easy-to-use pkgtool, a software package-specific tool. The specific name varies depending on the release version. In this case, you only need to click to install the software package.
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.