用户工具

站点工具


linux:gogs

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

后一修订版
前一修订版
linux:gogs [2016/02/20 20:43] – 创建 memorylinux:gogs [2023/12/03 10:24] (当前版本) – 外部编辑 127.0.0.1
行 4: 行 4:
  
 官方提供了二进制、Docker、Vagrant,以及包管理器等安装方式。得益于Golang的跨平台性,Gogs能跑在[[raspberrypi|RaspberryPi]]上 官方提供了二进制、Docker、Vagrant,以及包管理器等安装方式。得益于Golang的跨平台性,Gogs能跑在[[raspberrypi|RaspberryPi]]上
 +
 +===== Install =====
 +
 +1. 下载[[https://gogs.io/docs/installation/install_from_binary.html|编译好的二进制包]];
 +
 +2.  如果数据库使用的是[[postgresql|PostgreSQL]]或者[[mysql|MySQL]],则安装对应的数据库;
 +
 +3. 使用[[systemd|systemd]]管理gogs进程;
 +
 +<code ini /lib/systemd/system/gogs.service>
 +[Unit]
 +Description=Gogs
 +After=syslog.target
 +After=network.target
 +After=postgresql.service redis-server.service
 +
 +[Service]
 +# Modify these two values and uncomment them if you have
 +# repos with lots of files and get an HTTP error 500 because
 +# of that
 +###
 +#LimitMEMLOCK=infinity
 +#LimitNOFILE=65535
 +Type=simple
 +User=git
 +Group=git
 +WorkingDirectory=/home/git/gogs
 +ExecStart=/home/git/gogs/gogs web
 +Restart=always
 +Environment=USER=git HOME=/home/git
 +
 +[Install]
 +WantedBy=multi-user.target
 +</code>
 +
 +4. 重启 gogs 进程。
 +
 +<code>
 +sudo systemctl restart gogs
 +</code>
 +
 +===== Upgrade =====
 +
 +  - 下载最新版的压缩包;
 +  - 删除当前的 templates 目录;
 +  - 解压压缩包并将所有内容复制粘贴到相应(当前)的位置。
  
 ===== Reference ===== ===== Reference =====
  
   * [[https://try.gogs.io/|Gogs]]   * [[https://try.gogs.io/|Gogs]]
 +  * [[https://www.digitalocean.com/community/tutorials/how-to-set-up-gogs-on-ubuntu-14-04|How To Set Up Gogs on Ubuntu 14.04 | DigitalOcean]]
linux/gogs.1455972224.txt.gz · 最后更改: 2023/12/03 10:24 (外部编辑)