代码拉取完成,页面将自动刷新
同步操作将从 dungang/gee-task 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
只说明linux Centos的安装
window环境直接安装一个集成环境,比如xampp即可
文档中的域名请替换成自己的域名,域名解析配置不多说明
mysql 安装
yum install mariadb mariadb-server
php5.6 环境准备
#清除已安装的php,可选操作
yum remove php*
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
yum install rpmforge
nginx 环境
yum install nginx
或apache 环境
yum install httpd
php安装
#安装php5.6
yum install php56w php56-fpm php56w-mbstring php56w-opcache php56w-pdo php56w-pdo-mysql php56w-intl php56w-icu php56w-expose php56w-gd php56w-dom php56w-memcache
#如果是nginx作为web服务器
yum install php56w-fpm
#上传路径
/var/www/gee-task
#添加可写目录
mkdir runtime
chmod -D 777 runtime
mkdir web/assests
chmod -D 777 web/assets
这里太简单了就不多说明了,如果是生产使用db.sql,如果是演示使用geetask.sql
修改geetask的数据库配置
cd /var/www/gee-task/config
vim db.php
#修改配置
return [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=geetask',
'username' => 'root',
'password' => 'root',
'charset' => 'utf8mb4',
// Schema cache options (for production environment)
'enableSchemaCache' => true,
'schemaCacheDuration' => 60,
'schemaCache' => 'cache',
];
为方便部署,vendor文件我打包了,就不用composer install,直接解压即可
#到项目的仓库,只能从gitee.com的仓库下载附件
#linux环境下载 vendor.tar.gz
#window环境下载 vendor.rar
#只说明linux的使用方法,window用rar软件解压即可
#上传到/var/www/gee-task/
cd /var/www/gee-task/
tar -xzvf vendor.tar.gz
nginx
cd /etc/nginx
vim nginx
#添加如下配置
http {
...
#从这里开始
server {
listen 80;
server_name geetask.weifutek.com;
root /var/www/gee-task/web/;
index index.php;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
#error_page 404 /404.html;
# location = /40x.html {
#}
#error_page 500 502 503 504 /50x.html;
# location = /50x.html {
#}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fastcgi_pass unix:/var/run/php/php-fpm.sock;
fastcgi_pass 127.0.0.1:9000;
try_files $uri =404;
}
location ~ /\.(ht|svn|git) {
deny all;
}
}
#结束
....
}
apache
cd /etc/httpd/conf.d/
touch geetask.conf
vim geetask.conf
##添加如下配置
<VirtualHost *:80>
ServerAdmin webmaster@geetask.weifutek.com
DocumentRoot "/var/www/gee-task/web"
ServerName geetask.weifutek.com
ErrorLog "logs/geetask.weifutek.com-error.log"
CustomLog "logs/geetask.weifutek.com-access.log" common
</VirtualHost>
nginx
systemctl start php-fpm
systemctl start nginx
apache
systemctl start httpd
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。