基本要求:WEB服务器 : Nginx ,PHP 5.5.9及以上,MySQL 5.0 及以上。
PHP扩展要求:OpenSSL PHP 扩展 - PDO PHP 扩展 - Mbstring PHP 扩展 - Tokenizer PHP 扩展
名称 | 版本 |
PHP | 7.1.33 |
mysql | 5.6.48 |
nginx | 1.16.1 |
一、安装前准备工作:
1、请检测一下服务器运行环境确保能够支持tipask3.5的正常运行。
2、创建新的数据库:请在mysql数据库中创建一个名称为tipaskx的数据库,编码是utf-8,准确说是utf8_general_ci。
二、部署安装:
以下为linux命令整理。
修改配置:
vi: /etc/selinux/config
修改属性 SELINUX=disabled
mkdir -p /mnt/centos7
mount /dev/cdrom /mnt/centos7
mkdir /etc/yum.repos.d.bak
mv /etc/yum.repos.d/* /etc/yum.repos.d.bak/
vi /etc/yum.repos.d/CentOS7.repo
#修改内容如下
[CentOS7]
name=CentOS7 ISO
baseurl=file:///mnt/centos7
enable=1
gpgcheck=0
yum clean all && yum list
mkdir /date 将soft.tar.gz、mysql.tar.gz、nginx.tar.gz放到date下
tar zxvf soft.tar.gz
mv soft php
cd php
yum localinstall *.rpm -y
#修改php-fpm配置文件(/etc/php-fpm.d/www.conf ),将用户修改为nginx
user=nginx
group=nginx
mkdir /home/root
cd /date/
unzip tipask.zip
# 操作命令(修改用户组权限、修改相关目录读写权限):
[root@localhost tipask]# chown -R nginx:nginx tipask
[root@localhost tipask]# chmod -R 775 tipask/bootstrap/cache tipask/storage
vi /etc/nginx/conf.d/tipask.conf
# 根据情况修改 端口 ip 我的配置如下
server {
listen 80;
server_name 192.168.136.131; #配置的站点域名,根据实际域名自行调整
set $domain public;
set $project_root /home/wwwroot/tipask;
root $project_root/$domain;
charset utf-8;
#access_log /home/wwwroot/tipask/storage/tipask.access.log combined; #需要查看访问日志的可以去掉注释
#error_log /home/wwwroot/tipask/storage/tipask.error.log error;#需要查看错误日志的可以去掉注释
if (!-e $request_filename){
rewrite ^/(.*)$ /index.php?$1 last;
}
location / {
index index.php index.html;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $project_root/$domain$fastcgi_script_name;
include fastcgi_params;
}
}
###配置文件end
systemctl start nginx.service
systemctl start mysqld
grep 'temporary password' /var/log/mysqld.log
mysql_secure_installation
#设置root密码后面的按Y
#登录mysql,创建库
mysql -uroot -p123456
create database tipaskx charset utf8mb4;
[root@localhost wwwroot]# systemctl start php-fpm
[root@localhost wwwroot]# systemctl stop firewalld^C
[root@localhost wwwroot]# systemctl stop firewalld
[root@localhost wwwroot]# systemctl status firewalld
#/etc/nginx/conf.d/路径下
[root@localhost conf.d]# systemctl restart nginx
打开浏览器,访问http://192.168.136.131/install
ip + install 进入安装页面