Installing php7.1+apache2.4.23

Source: Internet
Author: User

Installation Preparation: http://ftp.cuhk.edu.hk/pub/packages/apache.org//httpd/httpd-2.4.23.tar.gz Download apachehttp://cn2.php.net/ distributions/php-7.1.0.tar.gz Download php7.1http://archive.apache.org/dist/apr/apr-1.5.0.tar.gz Download Apr

http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz Download Apr-util

http://jaist.dl.sourceforge.net/project/pcre/pcre/8.39/pcre-8.39.tar.gz download Pcre caveats: wget vim gcc gcc-c++ cmake These are also the small environments required to install Apache.  Yum-y Install libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel MySQL pcre-devel cu Rl-devel Libxslt-devel
Yum Install gcc-c++ gcc First install Aprunzip first (slightly)./configure--prefix=/usr/local/apr/
Make && make install Apr-util (PS: note sequencing) first unzip (slightly)./configure--prefix=/usr/local/apr-util/--with-apr=/usr/ Local/apr/make && make install Pcre first unzip (slightly)./configure--prefix=/usr/local/pcre/
Make && make installthen install Apache

Unzip first (slightly)

./configure--prefix=/usr/local/apache/--with-apr=/usr/local/apr/--with-apr-util=/usr/local/apr-util/-- With-pcre=/usr/local/pcre/
Make && make installinstall complete test Apachecd/usr/local/apache/bin/./apachectl start Apache successfully displays It works! On behalf of the server has succeeded! Add Apache to Linux service

cp/usr/local/apache/bin/apachectl/etc/rc.d/init.d/

Mv/etc/rc.d/init.d/apachectl/etc/rc.d/init.d/httpd

Chkconfig--add httpd #所有开机模式下自启动

Chkconfig httpd on #345开机模式下自启动

Installing PHP7
Unzip first (slightly)./configure--prefix=/usr/local/php--with-apxs2=/usr/local/apache/bin/apxs--with-curl--with-freetype-dir-- WITH-GD--with-gettext--with-iconv-dir--with-kerberos--with-libdir=lib64--with-libxml-dir--with-mysqli--with- OpenSSL--with-pcre-regex--with-pdo-mysql--with-pdo-sqlite--with-pear--with-png-dir--with-xmlrpc--with-xsl- -with-zlib--enable-fpm--enable-bcmath--enable-libxml--enable-inline-optimization--enable-gd-native-ttf--enable -mbregex--enable-mbstring--enable-opcache--enable-pcntl--enable-shmop--enable-soap--enable-sockets--enable-s Ysvsem--enable-xml--enable-zipThe/replace/with/path/to/perl/interpreter:bad interpreter:no such file or

#vi/usr/local/apache/bin/apxs

The first line of #!/replace/with/path/to/perl/interpreter-w, find your Perl installation location, if not clear, can be found with which Perl, generally in/usr/bin/perl, so the first line to: #!/ Usr/bin/perl-w. Run PHP Configure again, everything is OK!

Make && make install after installation is complete open httpd.conf find PHP7

See if Search: LoadModule php7_module modules/libphp7.so

If there is no search (which is generally searchable), add this instruction to the httpd.conf configuration file so that Apache can load the libphp7.so module and parse the PHP file.

: Wq

Save to exit.

Cd/usr/local/apache/htdocs

Press the I key to enter edit mode and add:

<?php

Phpinfo ();

?>

Press ESC to return to command mode and save exit:

: Wq

Installing php7.1+apache2.4.23

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.