一、安裝tengine+php+mariadb環(huán)境
網(wǎng)站建設(shè)哪家好,找成都創(chuàng)新互聯(lián)!專注于網(wǎng)頁設(shè)計、網(wǎng)站建設(shè)、微信開發(fā)、小程序開發(fā)、集團企業(yè)網(wǎng)站建設(shè)等服務(wù)項目。為回饋新老客戶創(chuàng)新互聯(lián)還提供了長島免費建站歡迎大家使用!
1、配置網(wǎng)絡(luò)
nmcli c del 'System eth0' #刪除網(wǎng)絡(luò)
nmcli c add con-name myeth0 ifname eth0 typeethernet ip4 172.16.10.133/24 gw4 172.16.10.254 #配置IP地址以及網(wǎng)關(guān)
nmcli c mod myeth0 ipv4.DNS"223.5.5.5,223.6.6.6" #設(shè)置DNS服務(wù)器
systemctl disable nfs.target #關(guān)閉不需要的服務(wù)
systemctl disable iscsid.socket #關(guān)閉不需要的服務(wù)
systemctl disable iscsiuio.socket#關(guān)閉不需要的服務(wù)
systemctl disable firewalld #關(guān)閉不需要的服務(wù)
sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config
查詢selinux是否關(guān)閉:sestatus
檢查網(wǎng)絡(luò)連通性ping www.sohu.com
重啟系統(tǒng)reboot
2、安裝PHP環(huán)境
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 #開啟系統(tǒng)自啟動
systemctl start php-fpm #開啟服務(wù)
3、安裝Mariadb數(shù)據(jù)庫(Mysql的分支)
yum install -y mariadb-server mariadb-libsmariadb
systemctl enable mariadb
systemctl start mariadb
systemctl status mariadb #查看服務(wù)啟動狀態(tài)
4、安裝Tengine環(huán)境
cd
wget (安裝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、檢查端口yum -yinstall net-tools #安裝netstat,ifconfig
netstat -lnp|egrep '(80|9000|3306)'
應(yīng)該看到下面3端口在監(jiān)聽網(wǎng)絡(luò)
[root@vm-centos7 ~]# 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檢測程序是否正常
設(shè)置網(wǎng)站權(quán)限 chown -R nginx:nginx /srv/www/
如果有問題請加QQ:116116130 備注:centos 7 -51cto