以二进制形式创建gitea仓库

1、官方文档:

数据库准备 | Gitea Documentation

使用二进制文件安装 | Gitea Documentation

2、具体操作

1)创建gitea数据库

2)检查是否安装 Git。要求 Git 版本 >= 2.0。

php 复制代码
git --version

2)创建git用户

php 复制代码
# On Ubuntu/Debian:
adduser \
   --system \
   --shell /bin/bash \
   --gecos 'Git Version Control' \
   --group \
   --disabled-password \
   --home /home/git \
   git

# On Fedora/RHEL/CentOS:
groupadd --system git
adduser \
   --system \
   --shell /bin/bash \
   --comment 'Git Version Control' \
   --gid git \
   --home-dir /home/git \
   --create-home \
   git

3)创建gitea目录,在此目录( /var/lib/gitea )下下载gitea 可执行文件

php 复制代码
mkdir -p /var/lib/gitea/custom
mkdir -p /var/lib/gitea/data
mkdir -p /var/lib/gitea/log
chown -R git:git /var/lib/gitea/
chmod -R 770 /var/lib/gitea/


cd /var/lib/gitea/
wget -O gitea https://dl.gitea.com/gitea/1.21.1/gitea-1.21.1-linux-amd64
chmod +x gitea
  1. 运行gitea文件,生成gitea数据库的数据表,在浏览器执行 http://127.0.0.1:3000 配置数据库等信息
php 复制代码
[root@localhost myweb]# su git

[git@localhost myweb]# cd /var/lib/gitea

[git@localhost gitea]# ./gitea

5)配置service 自动启动gitea

在 Linux 中以 service 方式运行 | Gitea Documentation

相关推荐
路由侠内网穿透.2 天前
本地部署代码托管解决方案 Gitea 并实现外部访问( Windows 版本)
运维·服务器·网络协议·gitea
吹牛不交税2 天前
gitea安装windows并实现CICD持续集成部署
ci/cd·gitea
不像程序员的程序媛17 天前
gitea基本操作
gitea
阿里巴巴P8资深技术专家21 天前
Docker一站式部署:RustFS、GoFastDFS、Gitea与PostgreSQL实战指南
docker·postgresql·gitea
木二_1 个月前
附058.Kubernetes Gitea部署
ci/cd·kubernetes·gitea
慧一居士1 个月前
Gitea和GitLab对比
运维·gitlab·gitea
ZeroNews内网穿透1 个月前
轻量级自托管Git服务:Gitea私有化部署与公网访问
服务器·网络·数据库·git·gitea
空气中的告白1 个月前
gitea安装及使用方法(常用命令)
gitea
bigHead-2 个月前
Gitea的安装与简单使用
gitea
weixin_464307632 个月前
windows使用gitea迁移仓库
gitea