用户工具

站点工具


linux:gogs

差别

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

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
后一修订版
前一修订版
linux:gogs [2016/03/04 18:09] – Add install guide memorylinux:gogs [2023/12/03 10:24] (当前版本) – 外部编辑 127.0.0.1
行 11: 行 11:
 2.  如果数据库使用的是[[postgresql|PostgreSQL]]或者[[mysql|MySQL]],则安装对应的数据库; 2.  如果数据库使用的是[[postgresql|PostgreSQL]]或者[[mysql|MySQL]],则安装对应的数据库;
  
-3. 使用[[supervisor|Supervisord]]管理gogs进程;+3. 使用[[systemd|systemd]]管理gogs进程;
  
-<code> +<code ini /lib/systemd/system/gogs.service
-[program:gogs+[Unit
-directory=/home/git/gogs/ +Description=Gogs 
-command=/home/git/go/gogs/gogs web +After=syslog.target 
-autostart=true +After=network.target 
-autorestart=true +After=postgresql.service redis-server.service 
-startsecs=10 + 
-stdout_logfile=/var/log/gogs/stdout.log +[Service] 
-stdout_logfile_maxbytes=1MB +# Modify these two values and uncomment them if you have 
-stdout_logfile_backups=10 +# repos with lots of files and get an HTTP error 500 because 
-stdout_capture_maxbytes=1MB +# of that 
-stderr_logfile=/var/log/gogs/stderr.log +### 
-stderr_logfile_maxbytes=1MB +#LimitMEMLOCK=infinity 
-stderr_logfile_backups=10 +#LimitNOFILE=65535 
-stderr_capture_maxbytes=1MB +Type=simple 
-environment = HOME="/home/git", USER="git" +User=git 
-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> </code>
  
-4. 重启supervisor进程。+4. 重启 gogs 进程。
  
 <code> <code>
-sudo systemctl supervisord restart+sudo systemctl restart gogs
 </code> </code>
  
linux/gogs.1457086190.txt.gz · 最后更改: 2023/12/03 10:24 (外部编辑)