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