CentOS 7搭建tengine+php+mariadb环境并安装discuz论坛
admin
2023-06-30 17:43:55
0

 

一、安装tengine+php+mariadb环境

 

1、配置网络

nmcli c del 'System eth0'  # 删除网络

nmcli c add con-name myeth0 ifname eth0 typeethernet ip4 172.16.10.133/24 gw4 172.16.10.254     #配置IP地址以及网关

nmcli c mod myeth0 ipv4.dns"223.5.5.5,223.6.6.6" #设置DNS服务器

 

systemctl disable nfs.target   #关闭不需要的服务

 

systemctl disable iscsid.socket #关闭不需要的服务

 

systemctl disable iscsiuio.socket#关闭不需要的服务

 

systemctl disable firewalld   #关闭不需要的服务

 

 

sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config

查询selinux是否关闭:sestatus

检查网络连通性ping www.sohu.com

重启系统reboot

 

2、安装PHP环境

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   #开启系统自启动

systemctl start php-fpm    #开启服务

 

3、安装Mariadb数据库(Mysql的分支)

yum install -y mariadb-server mariadb-libsmariadb

systemctl enable mariadb

systemctl start mariadb

systemctl status mariadb  #查看服务启动状态

 

 

4、安装Tengine环境 

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)'

应该看到下面3端口在监听网络

[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 检测程序是否正常

设置网站权限 chown -R nginx:nginx /srv/www/

如果有问题请加QQ:116116130 备注:centos 7 -51cto

相关内容

热门资讯

原创 华... 华为公布了一个名叫“韬定律”的东西。说出来你可能不信,这套新玩法,要把西方称霸了60年的芯片底层逻辑...
原创 华... 在华为畅享90 Plus和90 Pro Max取得出众的市场成绩之后,有消息指出,华为畅享90系列接...
一颗流星在美国马萨诸塞州上空爆... 当地时间5月30日,一颗流星在美国东北部马萨诸塞州近海上空爆炸,并引发巨响。该州多地居民均听到爆炸声...
鸿蒙智家框架合作协议签约仪式在... 5月29日,鲁班兄弟装饰工程有限公司与华为终端有限公司在华为云南区域总部举行鸿蒙智家框架合作协议签约...
中国科学院工程热物理所在超临界... 以超临界二氧化碳(S-CO₂)为代表的新型超临界流体正以其独特优势,在制冷、发电、储能等领域拓展应用...
5月31日,“蓝月亮”上线 5月31日,农历四月十五,一轮满月将现身夜空。这轮满月有些特别,它是本月第二次满月,同时它又是本年度...
原创 华... 华为在6月份的新品越来越丰富,比如智能手机、智能手表、耳夹式耳机、新一代全屋智能等,覆盖到多场景。其...
伊朗称对霍尔木兹海峡航运实施全... 据伊朗方面当地时间5月30日消息,伊朗武装部队哈塔姆安比亚中央总部说,伊朗对霍尔木兹海峡航运实施全面...
13人遇难“致命黑车”调查:座... 5月28日凌晨,一辆载满河南邓州周边等地乘客的大通客车,从浙江杭州出发赶回邓州,经过G40沪陕高速河...
多地职校招生报名火爆 作者 | 第一财经 林靖职业教育正在成为越来越多人的“主动选择”,中职赛道不再是备选项。近日,北京中...