CentOS install Ngnix mysql PHP

Source: Internet
Author: User
Tags fpm install php soap ldap odbc openssl pear

Centos7 nginx MySQL php# view version number cat/etc/redhat-release#1. Installation tool Yum Install-y make apr* autoconf cmake automake curl-devel gcc gcc-c++ OpenSSL openssl-devel pcre-devel GD kernel key Utils perl kernel-headers MPFR cpp glibc libgomp libstdc++-devel ppl cloog-ppl keyutils-libs-devel libcom_err-devel libsep Ol-devel libselinux-devel krb5-devel zlib-devel libxpm* freetype libjpeg* libpng* ncurses* libtool* libxml2 libxml2-devel Patch bzip2-devel telnet jasper-devel libtiff-devel gtk+-devel wget  #2. Install Phpyum install-y php php-common php-devel php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xml php-xmlrpc php-m bstring php-bcmath php-mhash php-fpm php-json* php-soap php-processphp-vphp--inicurl-ss http://www.workerman.net/ check.php | Phpyum Install libevent-devel-ypecl install Eventecho extension=event.so >/etc/php.d/30-event.inisystemctl Enable Php-fpm.servicesystemctl start php-fpm.service  #3. Installing Nginxwget HTTP://TENGINE.TAOBAO.ORG/DOWNLOAD/TENGINE-2.2.1.TAR.GZTAR-ZXF TENGINE-2.2.1.TAR.GZCD Tengine-2.2.1./configuremakemake Install /usr/local/nginx/sbin/nginx/usr/local/nginx /sbin/nginx-s reload  #4. Installing Mysqlwget HTTP://DEV.MYSQL.COM/GET/MYSQL-COMMUNITY-RELEASE-EL7-5.NOARCH.RPMRPM-IVH Mysql-community-release-el7-5.noarch.rpmyum Install Mysql-community-serversystemctl start Mysqld.servicesystemctl Enable Mysqld.service#mysqladmin password  installation mariadb instead of Mysqlyum install MARIADB-SERVER.X86_64SYSTEMCTL enable Mariadb.servicesystemctl start mariadb.servicegrant all privileges on * * to ' root ' @ '% ' identified by ' password '; flush pri vileges;  #5. Allow SSH password login vi/etc/ssh/sshd_configsystemctl restart sshd.service  #6. Close Selinuxvim/etc/selinux/config modified to:selinux=disabled  #7. Firewall modification # Boot firewall systemctl enable firewalld.service# add Firewall-cmd--zone=public--add-port=10000/tcp-- Permanentfirewall-cmd--zone=public--add-port=8282/tcp--permanentfirewall-cmd--zone=public--add-port=3306/tcp-- Permanentfirewall-cmd--zone=public--add-port=9990/tcp --permanentsystemctl Restart firewalld.service# view firewall-cmd--list-ports ubuntu 16.04 apach2 php7 Mysqlsudo Apt Install PHP php-dev php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-bcmath PHP-MC Rypt libmcrypt4 libmcrypt-dev php-fpm php-json php-json-patch php-json-schema php-soap php-curlsudo apt Install apache2&n BSP;CD/ETC/APACHE2/MODS-ENABLEDLN-SF. /mods-available/rewrite.load rewrite.loadvi/etc/apche2/apache2.conf modified to the following section: <directory/>Options Followsymlinksallowoverride Allrequire All granted</directory> <directory/usr/share> allowoverride Nonerequire all Granted</directory> <directory/var/www/>options Indexes Followsymlinksallowoverride Allrequire All granted</directory>

CentOS installation Ngnix mysql PHP

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.