CentOS 7.5.1804,php7.0,root用户为例

step 1

使用EPEL源或Webtatic源安装:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmrpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

安装Nginx:

yum -y install nginx

安装php以及相关组件。php建议安装7.0

yum -y install php70w php70w-fpm php70w-mbstring php70w-gd php70w-mcrypt php70w-curl php70w-dom php70w-ldap php70w-pecl-mongodb php70w-mysql

step 2

安装mongodb(>=2.6.12):

yum -y install mongodb mongodb-server

启动mongodb:

service mongod start

创建数据库和用户:

mongo actionviewdb —eval "db.createUser({ user: 'actionview', pwd: 'secret', roles: [ { role: 'readWrite', db: 'actionviewdb' } ] });"

step 3

下载程序:

cd /var/www/git clone https://github.com/lxerxa/actionview.git actionview

安装依赖:

cd actionviewcp composer.phar /usr/local/bin/composer (如果composer已安装请忽略此步)composer install —no-dev

执行配置脚本:

sh config.sh

修改数据库连接参数,在拷贝后的.env文件中,示例如下:

cp .env.example .env

DB_HOST=127.0.0.1DB_DATABASE=actionviewdbDB_USERNAME=actionviewDB_PASSWORD=secret

执行db数据初始化脚本:

mongorestore -h 127.0.0.1 -u actionview -p secret -d actionviewdb —drop ./dbdata

配置nginx:

  1. server {
  2. listen 80;
  3. listen [::]:80;
  4. root /var/www/actionview/public;
  5. # Add index.php to the list if you are using PHP
  6. index index.html index.htm index.nginx-debian.html;
  7. server_name localhost;
  8. client_max_body_size 50M;
  9. if (!-d $request_filename) { rewrite ^(.*)/$ /$1 permanent; }
  10. set $flag 0;
  11. if (!-e $request_filename) { set $flag 1; }
  12. if ($request_uri ~ ^/api) { set $flag 2; }
  13. if ($flag = 1) { rewrite ^(.*)$ /index.html break; }
  14. if ($flag = 2) { rewrite ^ /index.php break; }
  15. location ~ /\.ht {
  16. deny all;
  17. }
  18. location ~ \.php {
  19. fastcgi_pass 127.0.0.1:9000;
  20. fastcgi_index index.php;
  21. include fastcgi_params;
  22. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  23. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  24. fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  25. try_files $uri =404;
  26. }
  27. }

重新启动nginx和php-fpm:

service php-fpm stopservice php-fpm startservice nginx stopservice nginx start

step 4

安装完成,祝好运!访问系统: http://xxx.xxx.xxx.xxx, 管理员登录: user: admin@action.view, password: actionview

step 5

先不要着急,再做最后一步配置,以便能发mail通知、为燃尽图展示提供数据、自动同步LDAP用户数据。

crontab里添加:

* php /var/www/actionview/artisan schedule:run >> /dev/null 2>&1

重新启动cron服务:

service crond restart