nginx安装
使用官网稳定版1.18.0编译安装 准备编译环境 zlib-devel openssl-devel gcc gcc-c++ make pcre-devel 添加如下模块 --with-http_stub_status_module \ --with-http_gzip_static_module \ --with-http_realip_module \ --with-http_sub_module \ --with-http_ssl_module 设置软连接 ln -s /usr/local/nginx/sbin/nginx /usr/bin/nginx ln -s /usr/local/nginx/conf/ /etc/nginx nginx -V查看模块是否正常php安装
添加webtatic源 官网地址 rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpmyum -y install php70w-devel php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-pdo.x86_64 php70w-mysqlnd php70w-fpm php70w-opcache php70w-pecl-redis php70w-pecl-mongodb
数据库安装
由于使用mysql数据库的时候php就是连接不上去,验证方式啥的都试了就是不好使,于是使用的mariadb。安装 mariadb-server mariadb 配置 mysql_secure_installation 设置密码 Remove anonymous users 是否删除匿名用户 Disallow root login remotely 是否禁止root远程登录 Remove test database and access to it 是否删除test数据库 Reload orivilege tables now 是否刷新权限表