Source installation CentOs7 under the PHP7

Source: Internet
Author: User

Install the Apache environment first and install it directly with Yum

Yum install httpd httpd-devel/etc/httpd/# launch Apache# stop Apache # Restart Apache

Then install MySQL (mariadb)

Yum install mariadb mariadb-/usr/share/mysql/my-huge.cnf/etc//etc/my.cnf#  log-slow-queries=/var/log/mariadb/slow.loglong_query_time=1log-queries-not- using-#(change password, if there is a password may be root1234)

After the installation of these two environments, the source is now installed PHP7.2.8

# download image files wget http://hk1.php.net/get/php-7.2.8.tar.gz/from/this/Mirror tar zxvf mirrorcd php-7.2.8 # If this is a new environment, you need to install some dependent yum install autoconf gcc  httpd-devel libxml2 libxml2-*  openssl.x86_64 openssl-devel.x86_64  libcurl.x86_64 libcurl-devel.x86_64  libjpeg.x86_64 libpng.x86_64 freetype.x86_64 libjpeg-devel.x86_64 libpng-devel.x86_64 freetype-devel.x86_64  libjpeg-turbo-devel-y. /configure--with-mysqli--with-curl--with-apxs2=/usr/bin/apxs--with-openssl--enable-mbstring--WITH-GD-- Enable-gd-native-ttf--enable-gd-jis-conv--with-jpeg-dir--with-config-file-path=/etc/  && make Install

After you configure the Apache configuration file

 vi/etc/httpd/conf/httpd.conf  #  Span style= "COLOR: #008000" > find loadmodule about 54 rows, under Comments, add the following configuration  #  php.ini directory  phpinidir/etcloadmodule php7_module / Usr/lib64/httpd/modules/libphp7.so  #  Span style= "COLOR: #008000" > parse. php file  <filesmatch  " \.php$  "  > SetHandler Application /x-httpd-PHP< /filesmatch> <ifmodule dir_module  > DirectoryIndex index.php index.html< /ifmodule>addtype application /x-httpd-php. PHP 

Then restart Apache to use it.

Systemctl Restart Httpd.service

Source installation CentOs7 under the PHP7

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.