Source package installation under linux

source package

   The difference between the source package and the rpm package after installation is that the installation location is different.

   The installation location of rpm is determined by the person who wrote the rpm package, not by the installer. Although the prefix command can be used to specify the installation location, the disadvantage is that the rpm package cannot be found by the conventional command system, such as: Commands like /etc/rc.d/init.d/httpd cannot be found. Therefore, it is not recommended to specify the installation location. You can view it by rpm -ql package name.

   Source package: There is no uninstall command, the source package specifies the installation location, just delete the directory of the source package. The general installation directory is /usr/local/software name

   The installation location is different, and the startup method is different.

   The services installed by the RPM package can be managed using the system service management command service. For example, the startup method of installing apache by the rpm package is:

   /etc/rc.d/init.d/httpd start  

   service httpd start

   The service command actually searches the /etc/rc.d/init.d/ directory.

   The service installed by the source package cannot be managed by the service management command because it is not installed in the default path. Therefore, only absolute paths can be used for service management.

  

Using the source package to install is more suitable for your own machine. If the software is used by hundreds of users, it is recommended to install it from the source package.

gcc compiler must be installed before installation

 Source package save location: /usr/local/src

 Software installation location: /usr/local

 Installation process:

   1. Unzip the downloaded source package

   2. Enter the unzip directory

   3. ./configure software configuration and inspection

       Define the required functional options

       Check whether the system environment meets the installation requirements

       Write the defined function options and information about the detection system environment into the Makefile for subsequent editing

    4.make #compile

        make clean #Used to clear temporary files when compiling errors, etc.

    5.make install #Compile and install

 

   

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326763869&siteId=291194637