Gitea搭建(搭建私有github倉庫)


Gitea搭建(搭建私有github倉庫)

官方地址:

https://github.com/go-gitea/gitea/

https://docs.gitea.io/zh-cn/install-from-binary/

編譯安裝:

  • 下載文件

    wget -O gitea https://dl.gitea.io/gitea/1.13.3/gitea-1.13.3-linux-amd64
    
  • 執行安裝

    chmod +x gitea
    
  • 測試

    ./gitea web
    
    
    #檢查防火牆確保可以訪問
    systemctl status firwalld
    systemctl stop firewalld
    
    #訪問頁面繼續完成gitea創建。如:192.168.1.100:3000
    #完成后會在系統中看到此文件/etc/gitea/app.ini
    
  • 以service方式啟動

    vi /etc/systemd/system/gitea.service
    -----------------------
    復制該地址內容並粘貼入:
    https://github.com/go-gitea/gitea/blob/master/contrib/systemd/gitea.service
    
    注意此處內容:
    ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
    ------------------------
    cp gitea /usr/local/bin/gitea
    
    systemctl enable gitea
    systemctl start gitea
    

后期維護:

  • 修改訪問地址

    vi /etc/gitea/app.ini
    
        [server]
        SSH_DOMAIN       = 192.168.3.170
        DOMAIN           = 192.168.3.170
        HTTP_PORT        = 3000
        ROOT_URL         = http://192.168.3.170:3000/
    
    
    systemctl restart gitea
    


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM