tengine php环境,CentOS 7搭建tengine+php+mariadb环境并安装discuz论坛

CentOS 7搭建tengine+php+mariadb环境并安装discuz论坛

发布时间:2020-07-21 16:34:04

来源:51CTO

阅读:1240

作者:小G蛋

一、安装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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值