Ubuntu 上安装和配置 PocketBase 指南

安装步骤

下载 PocketBase:

wget https://github.com/pocketbase/pocketbase/releases/download/v0.x.x/pocketbase_0.x.x_linux_amd64.zip

注意:将 0.x.x 替换为最新的版本号。我安装的最新版本为 0.22.20。

解压文件:

unzip pocketbase_0.x.x_linux_amd64.zip

移动…


This content originally appeared on DEV Community and was authored by Simon

安装步骤

  1. 下载 PocketBase:
   wget https://github.com/pocketbase/pocketbase/releases/download/v0.x.x/pocketbase_0.x.x_linux_amd64.zip

注意:将 0.x.x 替换为最新的版本号。我安装的最新版本为 0.22.20

  1. 解压文件:
   unzip pocketbase_0.x.x_linux_amd64.zip
  1. 移动到适当的目录:
   sudo mv pocketbase /usr/local/bin/
  1. 设置执行权限:
   sudo chmod +x /usr/local/bin/pocketbase
  1. 创建数据目录:
   sudo mkdir /var/pocketbase
  1. 创建系统服务文件:
   sudo nano /etc/systemd/system/pocketbase.service

在文件中添加以下内容:

   [Unit]
   Description=PocketBase service
   After=network.target

   [Service]
   Type=simple
   User=root
   ExecStart=/usr/local/bin/pocketbase serve --http="0.0.0.0:8090" --dir="/var/pocketbase"
   Restart=on-failure

   [Install]
   WantedBy=multi-user.target
  1. 重新加载 systemd:
   sudo systemctl daemon-reload
  1. 启动 PocketBase 服务:
   sudo systemctl start pocketbase
  1. 设置开机自启:
   sudo systemctl enable pocketbase
  1. 检查服务状态:

    sudo systemctl status pocketbase
    

现在,PocketBase 应该已经在您的 Ubuntu 系统上运行,并监听在 8090 端口。您可以通过访问 http://your_server_ip:8090/_/ 来访问 PocketBase 的管理界面。


This content originally appeared on DEV Community and was authored by Simon


Print Share Comment Cite Upload Translate Updates
APA

Simon | Sciencx (2024-10-01T16:07:42+00:00) Ubuntu 上安装和配置 PocketBase 指南. Retrieved from https://www.scien.cx/2024/10/01/ubuntu-%e4%b8%8a%e5%ae%89%e8%a3%85%e5%92%8c%e9%85%8d%e7%bd%ae-pocketbase-%e6%8c%87%e5%8d%97-2/

MLA
" » Ubuntu 上安装和配置 PocketBase 指南." Simon | Sciencx - Tuesday October 1, 2024, https://www.scien.cx/2024/10/01/ubuntu-%e4%b8%8a%e5%ae%89%e8%a3%85%e5%92%8c%e9%85%8d%e7%bd%ae-pocketbase-%e6%8c%87%e5%8d%97-2/
HARVARD
Simon | Sciencx Tuesday October 1, 2024 » Ubuntu 上安装和配置 PocketBase 指南., viewed ,<https://www.scien.cx/2024/10/01/ubuntu-%e4%b8%8a%e5%ae%89%e8%a3%85%e5%92%8c%e9%85%8d%e7%bd%ae-pocketbase-%e6%8c%87%e5%8d%97-2/>
VANCOUVER
Simon | Sciencx - » Ubuntu 上安装和配置 PocketBase 指南. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/10/01/ubuntu-%e4%b8%8a%e5%ae%89%e8%a3%85%e5%92%8c%e9%85%8d%e7%bd%ae-pocketbase-%e6%8c%87%e5%8d%97-2/
CHICAGO
" » Ubuntu 上安装和配置 PocketBase 指南." Simon | Sciencx - Accessed . https://www.scien.cx/2024/10/01/ubuntu-%e4%b8%8a%e5%ae%89%e8%a3%85%e5%92%8c%e9%85%8d%e7%bd%ae-pocketbase-%e6%8c%87%e5%8d%97-2/
IEEE
" » Ubuntu 上安装和配置 PocketBase 指南." Simon | Sciencx [Online]. Available: https://www.scien.cx/2024/10/01/ubuntu-%e4%b8%8a%e5%ae%89%e8%a3%85%e5%92%8c%e9%85%8d%e7%bd%ae-pocketbase-%e6%8c%87%e5%8d%97-2/. [Accessed: ]
rf:citation
» Ubuntu 上安装和配置 PocketBase 指南 | Simon | Sciencx | https://www.scien.cx/2024/10/01/ubuntu-%e4%b8%8a%e5%ae%89%e8%a3%85%e5%92%8c%e9%85%8d%e7%bd%ae-pocketbase-%e6%8c%87%e5%8d%97-2/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.