LINUX software installation method

xiaoxiao2021-03-06  118

For Linux beginners, install a small software is probably a very distressed thing, because installing software under Linux is not as simple as in Windows. Most softwares in Linux provide source code, not ready-made executables, which requires users to configure it according to their own system's actual situation and their own needs, software can be used after the software can be used. Most beginners often do not know how to configure and compile, which blindly runs some files with executable properties or mechanically run "make", and "make install". The results of it? It is the software that is not equipped, and he is anxious to sweat, and the consequences will seriously destroy the stability of the system. The author writes some of the regularities in the installation software to share with you. At present, there are two common forms, one is in the form of an RPM package, and the other is in the form of compression into * .tar.gz. This article will discuss the two forms of software packages different installation methods under the text environment and graphics environment. Software installation in a text environment, installing easy RPM package RPM is an abbreviation for Redhat Package Manager, which can only be used in the system installed in RPM software, and it has been used in Redhat Linux and Turbo Linux. This structural package is still very convenient, as long as you remember a few simple commands and parameters, you can easily use: #> rpm [options] filename.rpm Whoever Common options include: -i: Installing Software-E : Uninstall software -Q: View software installation information and status-U: Upgrade existing software, such as installing software, you can use the following command: "rpm -i filename.rpm", how is the software installed, how to install No need to worry, RPM can help user management. Due to the convenient use of RPM, many software have RPM versions. If you want to use the software in the form of RPM, you should first download an RPM management software. In the ftp://ftp.rpm.org/pub/rpm/dist/rpm-version website, you can download the latest version --rpm-3 .-. 4.I386. The software has two forms of rpm packages and .tar.gz package, if you already have RPM management software in your system, you can download the RPM form package to upgrade existing software, otherwise you must understand .tar.gz package installation method. Second, the installation needs to be compiled .tar.gz package Due to the limitations of the RPM package (must be installed), currently more software uses the source code form. Tar.gz package. This software is installed usually to decompress, software configuration, software compilation, and installation. Unzipped usually has two command methods: one is "gunzip filename-version-os.tar.gz | tar xvf -", it is essentially two command "gunzip filename-version-os.tar.gz" and "tar XVF filename-version-os.tar "; another is" TAR XzVF FileName-Version-Os.Tar.gz ". In general, a directory FileName-Version-OS is generated after software decompression. The software configuration, compile, installation is the most daunting of beginners, but the author thinks that some laws are still difficult. In general, there is a file called ReadMe, Rnstall, or Readme.Install in the directory that is decompressed. These files typically introduce the software's functions, feature, copyright licenses, installations, and related knowledge, and will mention the methods and steps of the installation.

For example: the following is illustrated in the install file of Apache_1.3.6 (there is only the total entry here, omitted): installing the apache 1.3 http server with apaci =========== =================== 1.Overview for the impatient (General Description Configuration "$. / Configure - prefix = prefix $ make $ make install $ prefix / BIN / APACHECTL START 2.REQUIREMENTS 3.configuring the source Tree 4.Building the package (Method of Compile Software) 5.installing The Package 6.Testing The Package Package (software test) understands and can be skilled in using these documentation files, you can use some rules to install most software. These regularities are usually applicable for software that do not explain the files (of course, this situation is relatively rare). In general, there are two files with the installation software with direct relationships: configure, makefile. Where the configure file has executable properties, it is used to configure software, and its parameters are more, and the usage is flexible. Of course, different software parameters are also different. At this time, you need to use its HELP parameters, run the following command will make you feel clear: #> ./configure -help usage: configure [options] Options: [Defaults in Brackets after Descriptions: --quiet, - Silent Do Not Print Messages - Verbose, -V Print Even More Messages - SHA [= DIR] Switch to a Shadow Tree (Under Dir For building stand-alone Options : --Help, -h print this message - SHOW-LAYOUG INSTALLATION LAYOUT (CHECK AND Debug) Installation Layout Options: --with-layout = [f:] ID USE Installation Path Layout ID (from File F) - -target = target install name-associated files useing baseName Target ... Next, you can run "./configure [options]" to configure the software. Note that "./" in the command line is very important, it tells the system to run the command to run in the current directory (otherwise the system will execute the command to the path specified by the $ PATH variable). After executing the command, you can generate a Makefile file or modify the existing file configuration. Makefile files are usually used to compile and install software. When running the make command, the system will automatically compile and install the software according to the settings in the Makefile file.

Make commands can sometimes take some parameters such as ALL, Build, Config, Install, etc. Which parameter to be taken can see the Makefile file. Most of the files in Linux is a text file. Makefile is a shell program (there is a lot of similarities between the shell program and DOS in Linux. Of course, it is much better to read, especially when compiling. The band can be clearly written, for example: ## ======================== ## targets ## ======== ================ # Default Target All: Build ## ------------------------ ## Build Target ## ------------------------ # Build The package build: ... # the Non-Verbose Variant for package maintainers build-quiet: @ $ (MAKE) -F $ (TOP) / $ (MKF) $ (MFLLAGS) $ (MFWD) Quiet = 1 Build # Build The Additional Support Stuff Build-Support: ... ## --------- --------------- ## Installation Targets ## ----------------------- # The install target for installing . the complete Apache # package This is implemented by running subtargets for the # separate parts of the installation process install:. ...... # the non-verbose variant for package maintainers install-quiet: @ $ (MAKE) -f $ (TOP) / $ (Mkf) $ (mkf) $ (mfwd) quiet = 1 install # create the installation tree install-mktree: ...... The above code is part of the Makefile file of Apache_1.3.6, from which you can see all The parameter is fully compiled (default parameters). In addition, you can also bring parameters such as Build, Build-Quiet, Build-Surpport; install parameters such as install, install-quiet, install-surpport. Their functions are described in the comments indicated by "#". It is necessary to additionally, some software (such as Linux kernel upgrade programs) do not have the configure command to configure software, but use Make Config to complete this work, so which methods for use should be specific to specific problems. The software under the graphical interface is installed in a graphical environment. It can also pop up a simulation terminal to install the software in text, but it is too stupid because there are some simple ways in x window to help you complete the software installation. The following writers are introduced as examples in RedHat 6.0.

转载请注明原文地址:https://www.9cbs.com/read-98422.html

New Post(0)