我正在尝试在 t2.micro 类型的 Ubuntu 22.04 EC2 实例上运行 Nexus
我已经按照这篇文章这样做了
https://www.fosstechnix.com/how-to-install-nexus-repository-on-ubuntu/
但是当我运行命令时
sudo systemctl status nexus
我得到下面
sudo systemctl status nexus
× nexus.service - nexus service
Loaded: loaded (/etc/systemd/system/nexus.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2022-07-14 21:59:23 UTC; 6s ago
Process: 8096 ExecStart=/opt/nexus/bin/nexus start (code=exited, status=0/SUCCESS)
Main PID: 8269 (code=exited, status=1/FAILURE)
CPU: 160ms
我也尝试通过运行来检查日志
tail -f /opt/sonatype-work/nexus3/log/nexus.log
我得到
tail: cannot open '/opt/sonatype-work/nexus3/log/nexus.log' for reading: No such file or directory
tail: no files remaining
这是nexus.service
文件
[Unit]
Description=nexus service
After=network.target
[Service]
Type=forking
LimitNOFILE=65536
ExecStart=/opt/nexus/bin/nexus start
ExecStop=/opt/nexus/bin/nexus stop
User=nexus
Restart=on-abort
[Install]
WantedBy=multi-user.target
知道为什么失败吗?