1018 字
5 分钟
Ubuntu 部署 EVE SeAT
2025-12-28

SeAT#

eveseat
/
seat
Waiting for api.github.com...
00K
0K
0K
Waiting...

官方提供了两种部署方式:Docker 和 Manual,这里主要介绍 Manual 部署方法

手动安装 5.x 版本 | Manual Installation (5.x)#

官方教程

推荐系统版本是 Ubuntu 22.04,其他版本安装 PHP 会比较麻烦。

推荐 LTS 通过 su 进入切换到 root 用户。

准备工作#

Operating System#

Terminal window
apt-get update
apt-get full-upgrade
reboot
apt-get autoremove

Database#

安装 mariabd:

Terminal window
apt-get install curl
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | bash
apt-get install mariadb-server
systemctl enable mariadb.service

确保数据库安全运行(需要一路 yes 下去):

Terminal window
mariadb-secure-installation

进入数据库:

Terminal window
mariadb -uroot -p

创建数据库和账户:

create database seat;
GRANT ALL ON seat.* to seat@localhost IDENTIFIED BY 's_p3rs3c3r3tp455w0rd';
FLUSH PRIVILEGES;

PHP#

IMPORTANT

必须是 Ubuntu 22.04 !!! Jammy!!!

Terminal window
echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu jammy main" >> /etc/apt/sources.list.d/php.list
echo "deb-src http://ppa.launchpad.net/ondrej/php/ubuntu jammy main" >> /etc/apt/sources.list.d/php.list
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 4F4EA0AAE5267A6C
apt-get update
apt-get install libpng-dev libfreetype6-dev libjpeg-dev
apt-get install openssl zip php8.2-bz2 php8.2-cli php8.2-curl php8.2-dom php8.2-gd php8.2-gmp php8.2-intl php8.2-mbstring php8.2-mysql php8.2-opcache php8.2-redis php8.2-zip
IMPORTANT

如果有其他版本的 PHP 记得清理干净

Redis#

Terminal window
apt-get install redis-server
systemctl enable redis-server.service

安装 SeAT#

下载 SeAT#

Terminal window
apt-get install git
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && hash -r
mkdir -p /var/www
cd /var/www
IMPORTANT

如果是国内的服务器由于墙的问题,很难直接完成安装,建议通过镜像源进行安装

Terminal window
# 配置中国镜像
composer config -g repo.packagist composer https://packagist.phpcomposer.com
# 阿里云
composer config -g repo.packagist composer https://mirrors.cloud.tencent.com/composer/
# 腾讯
composer config -g repo.packagist composer https://mirrors.cloud.tencent.com/composer/
# 华为
composer config -g repo.packagist composer https://repo.huaweicloud.com/repository/php/
# 解除镜像
composer config -g --unset repos.packagist
# 搜索镜像源中是否有 SeAT
composer search eveseat/seat
NOTE

这里建议在使用镜像安装完后,删除镜像,然后使用 composer require package_name 把几个关键包更新一下

正常进入安装:

Terminal window
composer create-project eveseat/seat:5.0 --no-dev --no-interaction
chown -R www-data:www-data /var/www/seat
chmod -R guo+w /var/www/seat/storage/

配置 SeAT#

vim /var/www/seat/.env 编辑数据库相关配置:

Terminal window
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=seat
DB_USERNAME=seat
DB_PASSWORD=s_p3rs3c3r3tp455w0rd # <-- this is the value you probably need to edit.
DB_DEBUG=false

数据库迁移:

Terminal window
sudo -H -u www-data bash -c 'php /var/www/seat/artisan vendor:publish --force --all'
sudo -H -u www-data bash -c 'php /var/www/seat/artisan migrate'
sudo -H -u www-data bash -c 'php /var/www/seat/artisan db:seed --class=Seat\\Services\\Database\\Seeders\\PluginDatabaseSeeder'

EVE Sde 更新:

Terminal window
sudo -H -u www-data bash -c 'php /var/www/seat/artisan eve:update:sde'

Supervisor#

Terminal window
apt-get install supervisor
Terminal window
cat > /etc/supervisor/conf.d/seat.conf << EOL
[program:seat]
command=/usr/bin/php /var/www/seat/artisan horizon
process_name = %(program_name)s-80%(process_num)02d
stdout_logfile = /var/log/seat-80%(process_num)02d.log
stdout_logfile_maxbytes=100MB
stdout_logfile_backups=10
numprocs=1
directory=/var/www/seat
stopwaitsecs=600
user=www-data
EOL
Terminal window
systemctl enable supervisor.service

Crontab#

Terminal window
echo '* * * * * php /var/www/seat/artisan schedule:run >> /dev/null 2>&1' > /tmp/seat-crontab.tmp
crontab -u www-data /tmp/seat-crontab.tmp

Web Server#

Terminal window
apt-get install nginx php8.2-fpm
Terminal window
cat > /etc/nginx/sites-available/seat << EOL
server {
listen 80;
listen [::]:80;
# If you are hosting this instance on a domain, set that
# name here.
#server_name seat.yourdomain.com;
# SeAT public directory. This is the only directory that
# should be exposed by the webserver. If one has to expose
# the parent directory then things like the .env file will
# be available for anyone to download.
root /var/www/seat/public;
index index.php;
location / {
try_files \$uri \$uri/ /index.php?\$query_string;
}
# PHP-FPM configuration.
location ~ \.php\$ {
try_files \$uri /index.php =404;
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
include fastcgi_params;
}
# Even though .htaccess rules mean nothing in the nginx
# world, prevent those from being downloaded anyways.
location ~ /\.ht {
deny all;
}
# In case someone messes up, prevent .env files from
# being downloaded as well.
location ~ /\.env {
deny all;
}
}
EOL
Terminal window
ln -s /etc/nginx/sites-available/seat /etc/nginx/sites-enabled/seat
rm /etc/nginx/sites-enabled/default
systemctl restart nginx.service
systemctl restart php8.2-fpm.service

到这一步就能通过浏览器直接访问 127.0.0.1 了。

ESI 配置#

官方教程

vim /var/www/seat/.env 修改 seat 配置文件:

Terminal window
EVE_CLIENT_ID=null
EVE_CLIENT_SECRET=null
EVE_CALLBACK_URL=https://seat.yourdomain.com/auth/eve/callback

SSl 配置#

vim /var/www/seat/.env 修改 seat 配置文件:

Terminal window
APP_URL=https://seat.yourdomain.com
EVE_CALLBACK_URL=https://seat.yourdomain.com/auth/eve/callback

nginx 服务器配置参考:

server {
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /path/xxx.crt;
ssl_certificate_key /path/xxx.key;
# If you are hosting this instance on a domain, set that
# name here.
server_name seat.yourdomain.com;
# SeAT public directory. This is the only directory that
# should be exposed by the webserver. If one has to expose
# the parent directory then things like the .env file will
# be available for anyone to download.
root /var/www/seat/public;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# PHP-FPM configuration.
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# Even though .htaccess rules mean nothing in the nginx
# world, prevent those from being downloaded anyways.
location ~ /\.ht {
deny all;
}
# In case someone messes up, prevent .env files from
# being downloaded as well.
location ~ /\.env {
deny all;
}
}

常见问题#

能正常登录和授权,但仪表盘或角色界面空白#

该问题的特征包括:

  • 仪表盘空白,不显示服务器人数、ESI响应时间等
  • 角色界面空白,不显示技能队列、资产等

类似的问题:

解决方法:

  • php artisan seat:cache:clear 清理缓存
  • reboot 重启

再清理缓冲或者重启后可能也无法第一时间看到内容,建议通过添加一个新角色来尝试强制刷新。

Ubuntu 部署 EVE SeAT
https://fuwari.vercel.app/posts/建站/ubuntu-部署-eve-seat/
作者
Asuwee
发布于
2025-12-28
许可协议
CC BY-NC-SA 4.0