My Linux Learning Tour: (2) Compile and install httpd2.4

Source: Internet
Author: User

Compiling and installing httpd2.4

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/57/75/wKioL1SatFrwTXhHAAIxEaFgrxQ325.jpg "title=" Picture 1.png "alt=" wkiol1satfrwtxhhaaixeafgrxq325.jpg "/>

Objective: to WWW1 the httpd serviceis compiled and installed on this host ,www2 is not installed for future expansion use

Operating system CentOS6.6 x32_64

Files used in the installation

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/57/78/wKiom1Sas-yB4KQRAAEKft4YrVo656.jpg "title=" Picture 2.png "alt=" wkiom1sas-yb4kqraaekft4yrvo656.jpg "/>

/etc/sysconfig/network-scripts/ifcfg-eth0 Configuration

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/57/75/wKioL1SatKjRQSI9AAGAPzKe-t4164.jpg "title=" Picture 3.png "alt=" wkiol1satkjrqsi9aagapzke-t4164.jpg "/>

Installation start

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/57/78/wKiom1SatA-g4-BzAAA-0B8f_HE524.jpg "title=" Picture 4.png "alt=" Wkiom1sata-g4-bzaaa-0b8f_he524.jpg "/>

Prompt when installation finishes starting service

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/57/75/wKioL1SatMfz0akYAAGyaJ2KuMA258.jpg "title=" Picture 5.png "alt=" wkiol1satmfz0akyaagyaj2kuma258.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/57/78/wKiom1SatDvCObZQAADCfX7dyaY763.jpg "title=" Picture 6.png "alt=" wkiom1satdvcobzqaadcfx7dyay763.jpg "/>

Delete the line comment in the configuration file

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/57/75/wKioL1SatPbAcPwyAAB6BwNEnc0435.jpg "title=" Picture 7.png "alt=" wkiol1satpbacpwyaab6bwnenc0435.jpg "/>

Ok

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/57/78/wKiom1SatFnTxCAXAADVU-rvohA185.jpg "title=" Picture 8.png "alt=" wkiom1satfntxcaxaadvu-rvoha185.jpg "/>

Check the resolution of the domain name

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/57/75/wKioL1SatRDznvZjAAL8OlRdxWw048.jpg "title=" Picture 9.png "alt=" wkiol1satrdznvzjaal8olrdxww048.jpg "/>

Check if httpd is working properly .

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/57/78/wKiom1SatHbQCWJYAACZ9pga-2E317.jpg "title=" Picture 10.png "alt=" wkiom1sathbqcwjyaacz9pga-2e317.jpg "/>

#!/bin/bash# httpd-2.4 installyum groupinstall -y  "Development Tools"   " Server platform development "# apr install tar xf apr-1.5.0.tar.bz2cd  apr-1.5.0./configure --prefix=/usr/local/aprmake && make installcd -#  apr-util installtar xf apr-util-1.5.3.tar.bz2cd apr-util-1.5.3./configure --prefix=/ usr/local/apr-util --with-apr=/usr/local/aprmake && make installcd -#  pcreyum install -y pcre-devel # httpd-2.4.10 path=/usr/local/apache[ -d   $path  ] | |  mkdir  $pathtar  xf httpd-2.4.10.tar.bz2 -C  $pathcd   $path/httpd-2.4.10  ./configure --prefix= $path  --sysconfdir=/etc/httpd24 --enable-so --enable-ssl -- enable-cgi --enable-rewrite --with-zlib --with-pcre --with-apr=/usr/local/apr -- With-apr-util=/usr/local/apr-util --enable-modules=most --enable-mpms-shared=all --with-mpm=preforkmake  && make install#  Generate startup Script chkfile=/etc/rc.d/init.d/httpd24cat > $ chkfile <<eof#!/bin/bash# chkconfig: 2345 85 15# description:  HTTPD-2.4.10.&NBSP;/ETC/RC.D/INIT.D/FUNCTIONSCOMMAND=/USR/LOCAL/APACHE/BIN/HTTPD[&NBSP;-Z&NBSP;\$1&NBSP;]  && echo  "Please input {start|stop|restart|status}"  && exit  1function start () {[ -e \$1 ] && echo -n  "\ ' basename  \$1\ '  is aleady running.  '  && warning[ ! -e \$1  ] && \ $command  -k start  && touch \$1 & & echo -n  "starting \ ' basename \$1\ '  successfully."  && success  echo}function stOP () {[ ! -e \$1 ] && echo -n  "\ ' basename \$1\ '  is  not running. "  && warning[ -e \$1 ] && \ $command  -k stop  && rm -f \$1 && echo -n  "Stopping \ ' basename \$1\ '  successfully.  '  && successecho}function status () {[ ! -e \$1  ] && echo -n  "\ ' basename \$1\ '  is not running."  && failure[ -e \$1 ] && echo -n  "\ ' basename  \$1\ '  is running. "  && successecho}lockfile=/var/lock/subsys/\ ' basename \$0\ ' pidof \ $command   &>/dev/null && touch \ $lockfile  case \$1 instart) start \$ Lockfile;; stop) stop \ $lockfile;; Restart) stop \ $lockfilestart  \ $lockfile;; status) status \ $lockfile;; *) echo  "please input a option {start | stop | restart |  status} : "esaceofchkconfig httpd24 oncp /etc/httpd24/httpd.conf /etc/httpd24/ httpd.conf.bakchmod a+x  $chkfileecho   ' export path=/usr/local/apache/bin: $PATH '  >  /etc/profile.d/httpd24.sh#  elimination Tips # sed -i  ' s/^\ (#ServerName. *\)/\1/'  /etc/httpd24 /httpd.confpidf httpd &>/dev/null | |  service httpd startiptables -i input -p tcp --dport 80 -j  acceptservice iptables save


This article is from the "TTQQ" blog, make sure to keep this source http://473008.blog.51cto.com/463008/1595665

My Linux Learning Tour: (2) Compile and install httpd2.4

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.