First, install the TENGINE+PHP+MARIADB environment
1 , configure the network
nmcli C del ' System eth0 ' # Delete Network
nmcli C Add con-name myeth0 ifname eth0 typeethernet ip4 172.16.10.133/24 gw4 172.16.10.254 # configuring IP addresses and gateways
nmcli C mod myeth0 ipv4.dns "223.5.5.5,223.6.6.6" # setting up a DNS server
systemctl Disable Nfs.target # Turn off services that you do not need
systemctl Disable Iscsid.socket # Turn off services that you do not need
systemctl Disable iscsiuio.socket# Turn off services that you do not need
systemctl Disable FIREWALLD # Turn off services that you do not need
Sed-i ' s/^selinux=.*/selinux=disabled/'/etc/selinux/config
Query if SELinux is closed: sestatus
Check network connectivity Ping www.sohu.com
Rebooting the system reboot
2. Install PHP Environment
Yum install-y php.x86_64 php-bcmath.x86_64php-cli.x86_64 php-common.x86_64 php-dba.x86_64 php-embedded.x86_64 php-fpm.x86_64php-gd.x86_64 php-intl.x86_64 php-mbstring.x86_64 php-mysql.x86_64php-pdo.x86_64 php-pear.noarch php-pspell.x86_64 php-recode.x86_64php-soap.x86_64 php-xml.x86_64 php-pecl-memcache.x86_64
Sed-i ' s/apache/nginx/g '/etc/php-fpm.d/www.conf
systemctl Enable PHP-FPM # turn on System self-boot
systemctl start PHP-FPM # Open Service
3 , installing the MARIADB database (MySQL branch)
Yum install-y mariadb-server mariadb-libsmariadb
Systemctl Enable MARIADB
Systemctl Start mariadb
systemctl Status Mariadb # View service startup status
4 , installation Tengine environment
Cd
wget ( installation wget yum-y installwget) http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/7/x86_64/e/ epel-release-7-2.noarch.rpm
RPM-IVH epel-release-7-2.noarch.rpm
Yum-y Install GeoIP GD gperftools-libs
rpm-ivhtengine-1.5.2-1.el7.centos.x86_64.rpm
Chgrp nginx/var/lib/php/session/
Systemctl Enable Nginx
Systemctl start Nginx
5 , check Port Yum-yinstall Net-tools # installation Netstat,ifconfig
Netstat-lnp|egrep ' (80|9000|3306) '
Should see the following 3 ports in the Listening network
[[email protected] ~]# netstat-lnp|egrep ' (80|9000|3306) '
TCP 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 1425/php-fpm:maste
TCP 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 1098/mysqld
TCP 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1392/nginx:master
nginx-t detect if the program is normal
Set site Permissions Chown-r nginx:nginx/srv/www/
If you have any questions, please add qq:116116130. Remarks: CentOS 7-51cto
This article is from the "Mastering The Core Technology" blog, please be sure to keep this source http://smallxjd.blog.51cto.com/3203597/1587248
CentOS 7 Build TENGINE+PHP+MARIADB environment and install Discuz Forum