Source Installation——can be installed according to their own needs, which is the benefit of source installation, and binary installation cannot choose
most of the source code installation steps are roughly the same, the details can be referenced after the decompression of the README and INSTALL
README: Introduces the function and installation of the software package
Install: Describes the installation guide for the package
Understanding Source Installation
Go to install to view the Installation Guide section, the General content:
$. /configure --prefix=prefix Specify the base directory, and all installed files are placed in this directory
--sysconfdir=dir Alternatively, you can specify the base directory where the relevant configuration files are stored
more about the./configure settings can be viewed with the help of the./configure--help
The./configure will generate a Makefile file after the extracted directory and the next make is compiled by this file
$ make compile, compile the source files into binary files
The first two steps of the process can be performed by any user, and the next step is a real copy file that requires root access
Normal users can use the sudo command to temporarily have root privileges
$ make install copy source package file
$ prefix/bin/apachectl Start
Note: all of the above steps must be guaranteed in the directory after decompression
Specific cases
Deploy HTTPD services on CENTOS6 and CENTOS7 respectively, using source packages.
1. Download the httpd source package from ftp://172.18.0.1/pub/Sources/sources/httpd/(this is just my server, other small partners to download on the Apache official website)
After downloading, you can use the rz or lftp command to copy the files in Windows to the Linux system.
RZ and lftp need to be installed in advance
~]# Yum provides *bin/rz*loaded plugins:fastestmirror, Refresh-packagekit, securityloading mirror speeds from cached host Filelrzsz-0.12.20-27.1.el6.x86_64:the LRZ and LSZ Modem communications programsrepo:centos6matched From:filenam E:/usr/bin/rzyum Install lrzsz-0.12.20-27.1.el6.x86_64
~]# Yum provides *bin/lftp*loaded plugins:fastestmirror, Refresh-packagekit, securityloading mirror speeds from cached ho Stfilelftp-4.0.9-14.el6.x86_64:a sophisticated file transfer programrepo:centos6matched From:filename:/usr /bin/lftpgetfilename:/usr/bin/lftpyum Install lftp-4.0.9-14.el6.x86_64
Specific methods of LFTP:
Lftp 172.18.0.1:/pub/sources/sources/httpd> Get httpd-2.4.29.tar.bz2
Lftp 172.18.0.1:/pub/sources/sources/httpd> exit (Exit)
tar-zxvf httpd-2.4.29.tar.bz2 decompression
2. Installing the Development Tools package Group
The source installation must install the package group, basically is to configure the Linux compilation Environment development tools
Yum groupinstall "Development Tools"
3. View the Readme install file
CD httpd-2.2.34
4. ./configure--prefix=/app/apache
5. make
6.makeinstall (requires root access)
7./app/apache/bin/apachectl Start
8. Clear the Firewall
centos7:systemctl Stop Firewalld.service
systemctl Disable Firewalld.service
centos6:service iptables stop
Service Iptables Save
9.netstat-tnl
Viewing the Listening status
10.vim command Edit File/app/apache/htdocs/index.html
Open Browser Input Http://IP address (ifconfig view)
you can see the page display Hello World word
Linux Learning-Source installation