Brief Introduction to Software Installation in Linux

Source: Internet
Author: User
A brief introduction to Linux software installation: For Windows users, software installation is really not knowledgeable. the software will be installed after "Next" or "change path. But it's not that easy in Linux. There are three main methods for installing software in Linux: rpm (RedHat series... A brief introduction to Linux software installation: For Windows users, software installation is really not knowledgeable. the software will be installed after "Next" or "change path. But it's not that easy in Linux. There are three main methods for installing software in Linux: rpm (RedHat series), DPKG (Debian series), yum (RedHat series), APT (Debian series), and Tarball. Rpm, yum, and other installation methods are very simple, so we will not detail them here. let's take an example to illustrate it, in Windows, Kingsoft, and other system management software, I believe everyone has used it. The yum software installation method is similar to selecting a software in and then following the installation method, it will automatically help you install the software, but the software selected by yum must be available on the server of the system provider. The rpm installation is similar to the installation of an installation package downloaded from the Internet, and then you can directly install the package, but the installation is carried out using commands. Next we will focus on installing Tarball. I. What is the name of the Tarball? I don't know if you think of a command named tar. The so-called Tarball file is to package all the source code of the software in tar first, then we use the compression technology to compress the files. The most common is gzip and zip2. Therefore, the general extension of the tarball file will be written as * .tar.gz?tgz=tar.bz2. So what is in this Tarball file? Files usually include: 1. source code file 2. program File (may be configure or config files) 3. easy description and installation of the software (README and INSTALL) the README and INSTALL files are very important, but for those who are used to Windows, installing a software is so simple that we have always ignored these instructions, however, Linux is different, so read carefully before installing the software. 2. check whether the installation environment obtains the Tarball installation package and decompress it to the/usr/local/src Directory (preferably ), first, find the README and INSTALL files to see the instructions. if there is no problem, find configure or config files in the current directory. if not, you can INSTALL the tool according to the instructions in README and INSTALL files. Here we assume that the configure file exists. What is the configure file? Through the file command, we can see that this file is actually a script file. its purpose is to detect your Linux environment and determine whether your current environment meets the installation requirements of this software, if not, output error information and exit. If yes, generate MakeFile. MakeFile specifies how the software is compiled and installed. Since MakeFile is always used for subsequent installation, if this step fails, the installation cannot continue because the MakeFile file is not generated. In addition, when running configure, you can add parameters to change some default parameters in the generated MakeFile. The most important parameter is -- frefix, which is followed by a path, indicates the directory to which the software will be installed. if you do not specify this parameter, the default value is/usr/local. the usage example is as follows: # configure -- prefix =/usr/local/app default method: # configure 3. after software installation is completed, the installation is very simple. enter the following command. # Make clean # make install note: make and gcc tools must be used in your system. Is it easy? yes! So what have you done in each of the above three steps? What are their respective functions? Let's talk about it now! 1. make clean: make will read the clean work in MakeFile. its main task is to remove the target file. This step may not be required, but it is best to execute it. why? It can remove the target file. Because the source code may contain the target File (*. o) compiled last time, clear the file properly. At least wait until the compiled execution file is compiled by your machine. 2. make: make will compile based on the default work in MakeFile. The main task of compiling is to compile the source code into executable files by gcc. However, these target files usually need links such as libraries to generate a complete executable file. To put it simply, you can use make to compile the source code as an executable file (that is, * in Windows *.. It may be a bit confusing to everyone here. since all my executable programs have come out, I can run the program. isn't the installation complete? why? For example, this is like generating only the installer you are familiar with in Windows. it is not the application you want. You need to run this installer to complete the installation of the desired application software. 3. make install: this is usually the last step of installation. make will follow the install option in the MakeFile file, install the data compiled in the previous step to the default directory (if you used configure to detect the environment and generate MakeFile, you can use the -- frefix parameter, is the directory you specified) to complete the installation. The installation process usually involves moving the files generated by compilation and software running to the specified installation directory for some configuration. Note: The preceding steps are associated. if one of the steps fails, the following operations cannot be performed. In addition, if the installation is successful but is installed in an independent directory, such as/usr/local/app, then you must manually write the man page of the software into/etc/man. in config, add a line: MANPATH/usr/local/app/man.

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.