gogs部署安装

gogs服务器搭建

下载gogs :

mysql创建数据库

1708681673015

配置gogs参数

  • 设置gogs进程守护启动

    • 复制gogs.service到/etc/systemd/system

    mv /root/gogs/scripts/systemd/gogs.service /etc/systemd/system

    • 修改启动项文件(gogs.service)
      
      [Unit]
      Description=Gogs
      After=syslog.target
      After=network.target
      After=mariadb.service mysql.service mysqld.service postgresql.service memcached.service redis.service

    [Service]

    1. Modify these two values and uncomment them if you have

    2. repos with lots of files and get an HTTP error 500 because

    3. of that

      #LimitMEMLOCK=infinity #LimitNOFILE=65535 Type=simple User=root Group=root WorkingDirectory=/root/gogs ExecStart=/root/gogs/gogs web -p 3001 Restart=always Environment=USER=root HOME=/root

    4. Some distributions may not support these hardening directives. If you cannot start the service due

    5. to an unknown option, comment out the ones not supported by your version of systemd. ProtectSystem=full PrivateDevices=yes PrivateTmp=yes NoNewPrivileges=true

    [Install] WantedBy=multi-user.target

    
    - 启动
    - 重新加载systemctl
    
      >systemctl daemon-reload
    
    - 启动gogs
    
      >systemctl start gogs
    
    - 配置开机自启动
    
      >systemctl enable gogs
  • 修改ip地址

    • 修改参数

      vi /root/gogs/custom/conf/app.ini

    server参考块如下

    [server]
    DOMAIN           = 106.14.162.203
    HTTP_PORT        = 3001
    EXTERNAL_URL     = http://106.14.162.203:3001/
    DISABLE_SSH      = false
    SSH_PORT         = 22
    START_SSH_SERVER = false
    OFFLINE_MODE     = false
    • 重启gogs

      systemctl restart gogs

暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇