Linux Learning-Source installation

Source: Internet
Author: User
Tags bz2 root access

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

Related Article

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.