轻量应用服务器_Lighthouse - 腾讯云 (tencent.com)
轻量应用服务器无忧计划_轻量应用服务器续费同价-腾讯云 (tencent.com)
https://curl.qcloud.com/LElmMMzx
WookTeam是一款轻量级的开源在线团队协作工具,提供各类文档协作工具、在线思维导图、在线流程图、项目管理、任务分发、即时IM,知识库管理等工具。

项目地址:轻量级的团队在线协作 (wookteam.com)
gitee地址:wookteam(gitee.com)

  1. 安装环境和依赖
    本次搭建选择了腾讯云轻量应用服务器+宝塔面板

在宝塔面板内安装如下环境
Nginx-1.7+、MySQL-5.7+、PHP-8.0+

安装完以后打开PHP,设置安装fileinfo、Swoole4扩展及删除禁用函数pcntl、putenv、proc_open、popen

2.创建配置网站
创建网站并创建相应的数据库,格式选择utf8mb4

将wookteam项目文件上传至此站点目录下,并重命名文件.env.example为.env并修改以下参数

网站配置:

map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}
upstream swoole {
    # Connect IP:Port
    server 127.0.0.1:5200 weight=5 max_fails=3 fail_timeout=30s;
    keepalive 16;
}

添加伪静态

location / {
    try_files $uri @laravels;
}

location =/ws {
    proxy_http_version 1.1;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Real-PORT $remote_port;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_set_header Scheme $scheme;
    proxy_set_header Server-Protocol $server_protocol;
    proxy_set_header Server-Name $server_name;
    proxy_set_header Server-Addr $server_addr;
    proxy_set_header Server-Port $server_port;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    # "swoole" is the upstream
    proxy_pass http://swoole;
}

location @laravels {
    proxy_http_version 1.1;
    proxy_set_header Connection "";
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Real-PORT $remote_port;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_set_header Scheme $scheme;
    proxy_set_header Server-Protocol $server_protocol;
    proxy_set_header Server-Name $server_name;
    proxy_set_header Server-Addr $server_addr;
    proxy_set_header Server-Port $server_port;
    # "swoole" is the upstream
    proxy_pass http://swoole;
}

3.编译项目
进入服务器,依次运行一下命令:

cd /www/wwwroot/wookteam.com
composer install
php artisan key:generate
php artisan migrate --seed

4.安装配置Supervisor
进入服务器,依次运行一下命令:

yum install -y supervisor
systemctl enable supervisord
systemctl start supervisord

新建文件/etc/supervisord.d/wookteam.ini

[program:wookteam]
directory=/www/wwwroot/wookteam.com
command=php bin/laravels start -inumprocs=1
autostart=true
autorestart=true
startretries=3
user=root
redirect_stderr=true
stdout_logfile=/www/wwwroot/wookteam.com/%(program_name)s.log

运行以下命令:

systemctl restart supervisord

到此安装完毕

默认用户名:admin/123456或system/123456
轻量应用服务器适合基础运维知识的学习和实践,轻量应用服务器的相关操作也较为简单。
近期也是即将是腾讯云轻量服务器一周年的日子,有相关需求的朋友可以关注轻量应用服务器的一周年活动。

©著作权归作者所有

发表评论