zoukankan      html  css  js  c++  java
  • centos 安装gitea

    • 安装Git

      • yum -y install git
        
    • 下载Gitea,下载最新的版本可以参考https://dl.gitea.io/gitea

      • wget -O gitea https://dl.gitea.io/gitea/1.12.3/gitea-1.12.3-linux-amd64
        
    • 在下载到Gitea的目录下,修改权限

      • chmod +x gitea
        
    • 运行Gitea

      • ./gitea web
        
      • 后台运行:nohup ./gitea web &
        
    • 使用服务来启动

      • 新建一个文件

        • vi /usr/lib/systemd/system/gitea.service
          
        • 写入

        • [Unit]
          Description=gitea
          
          [Service]
          User=root
          ExecStart=gitea的安装路径
          Restart=on-abort
          
          [Install]
          WantedBy=multi-user.target
          
      • 重载daemon,让新的服务文件生效

        • systemctl daemon-reload
          
      • 现在可以用systemctl来启动gitea了:

        • systemctl start gitea
          
      • 设置开机重启

        • systemctl enable gitea
          
      • 停止查看状态

        • systemctl stop gitea
          
          systemctl status gitea
          
  • 相关阅读:
    数据结构实验之栈四:括号匹配
    数据结构实验之栈三:后缀式求值
    8月7日学习
    8月6日学习
    8月5日学习
    8月4日学习
    周总结
    8月3日学习
    8月2日学习
    8月1日学习
  • 原文地址:https://www.cnblogs.com/MyUniverse/p/13525324.html
Copyright © 2011-2022 走看看