linux-source package management

1. The difference between the installation location of the source package and RPM package

RPM package installation location: installed in the default location:

    

Source package installation location: installed in the specified location, usually / usr / local / software name /

2. The impact of different installation locations:

The service installed by the RPM package can be managed using the system service management command (service). For example, there are two ways to start the apache installed by the RPM package:

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

service httpd start close using service httpd stop

After starting, enter your IP address in the browser and it will appear:

If not, turn off the firewall: the command is: service iptables stop

                

After opening and browsing, there is nothing, because there is no web file:

                 

You can do the following to create a web page file, then enter the content, wq, and then refresh the web page:

              

The source package installation service 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.

3. Source package installation process:

Preparation: Install the C language compiler, download the source package http://mirror.bit.edu.cn/apache/httpd/

Note: Source code storage location / usr / local / src Software installation location: / usr / local / How to determine the installation process error: The installation process stops, and an error, no, warning prompt appears

3.1 Download the source package-"Unzip the downloaded source package tar -axvf file name-" Enter the decompression directory, you can use du -sh file name to view the file size

After ls, there are two files INSTALL (installation instructions) README (instructions)

3.2 ./configure #Software configuration and detection, define the required function options, check whether the system environment meets the installation requirements, and write the defined function options and detection system environment information into the Makefile file for subsequent editing. You can use ./config --help to see what functions are available./configure --profix = / usr / local / to define the installation directory

3.3 make #compile 

3.4 make install #Compile and install

Published 148 original articles · Like 10 · Visitors 20,000+

Guess you like

Origin blog.csdn.net/ab1605014317/article/details/104875032