Linux 安装步骤

  1. mkdir /data/www/
  2. cd /data/www/
  3. wget -c http://www.masterlab.vip/download.php?file=masterlab-full-last.zip -O masterlab.zip
  4. unzip masterlab.zip -d ./masterlab
  5. cd masterlab
  • nginx 配置虚拟主机映射至 /data/www/masterlab/app/public
  1. server {
  2. listen 80;
  3. # 你的域名
  4. server_name www.yoursite.com;
  5. # 程序的安装路径
  6. root /data/www/masterlab/app/public;
  7. index index.html index.htm index.php;
  8. gzip on;
  9. gzip_min_length 1k;
  10. gzip_buffers 4 16k;
  11. #gzip_http_version 1.0;
  12. gzip_comp_level 2;
  13. gzip_types application/javascript text/plain application/x-javascript application/json text/css application/xml text/javascript application/x-httpd-php;
  14. gzip_vary off;
  15. gzip_disable "MSIE [1-6]\.";
  16. # 配置设置图片格式文件
  17. location ~* \.(jpg|jpeg|gif|png|ico|swf)$ {
  18. expires 3y;
  19. access_log off;
  20. # gzip off;
  21. }
  22. # 配置css/js文件
  23. location ~* \.(css|js)$ {
  24. access_log off;
  25. expires 3y;
  26. }
  27. # 禁止用户上传目录下所有.php文件的访问,提高安全性
  28. location ~ ^/files/.*\.(php|php5)$ {
  29. deny all;
  30. }
  31. location ~ ^/attachment/.*\.(php|php5)$ {
  32. deny all;
  33. }
  34. location /{
  35. if (!-e $request_filename) {
  36. rewrite ^/((?!upload).*)$ /index.php/$1 last;
  37. break;
  38. }
  39. }
  40. location ^~ /attachment/ {
  41. root /data/www/masterlab/app/storage/;
  42. }
  43. location ~ \.php {
  44. fastcgi_pass 127.0.0.1:9000;
  45. fastcgi_index index.php;
  46. fastcgi_split_path_info ^(.+\.php)(.*)$;
  47. fastcgi_param PATH_INFO $fastcgi_path_info;
  48. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  49. include fastcgi_params;
  50. }
  51. }
  • 重启web服务器,访问你刚才设置的域名 http://www.yoursite.com/install ,安装图文提示进行安装

  • 配置MasterlabSocketCentos操作系统的MasterlabSocket已经编译好成直接运行的文件,直接赋予权限运行即可

  1. chmod +x /data/www/masterlab/bin/masterlab_socket
  2. ./masterlab_socket

其他Linux操作请访问 https://github.com/gopeak/masterlab_socket 查看安装文档