部署自己的gitlab服务器
一、安装依赖环境,下载gitlab的rpm包,并且安装
yum install curl policycoreutils-python openssh-server postfix wget -y
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.2.3-ce.0.el7.x86_64.rpm rpm -ivh gitlab-ce-10.2.3-ce.0.el7.x86_64.rpm
二、配置gitlab服务
需要修改配置文件,换成你自己的服务器地址就好
vim /etc/gitlab/gitlab.rb
external_url 'http://10.0.0.191'
四、初始化gitlab,重新加载配置文件
# 注意,当修改了gitlab配置文件,就得reconfigure
[root@web1134 ~]
# gitlab-ctl reconfigure
[root@web1134 ~]
# gitlab-ctl restart
五,gitlab文件夹相关
/etc/gitlab/gitlab.rb #gitlab配置文件 /opt/gitlab #gitlab的程序安装目录 /var/opt/gitlab #gitlab目录数据目录 /var/opt/gitlab/git-data #存放仓库数据 gitlab-ctl reconfigure #重新加载配置 gitlab-ctl status #查看当前gitlab所有服务运行状态 gitlab-ctl stop #停止gitlab服务 gitlab-ctl stop nginx #单独停止某个服务 gitlab-ctl tail #查看所有服务的日志 Gitlab的服务构成: nginx: 静态web服务器 gitlab-workhorse 轻量级反向代理服务器 logrotate 日志文件管理工具 postgresql 数据库 redis 缓存数据库 sidekiq 用于在后台执行队列任务(异步执行)
六,汉化
1、下载汉化补丁 [root@gitlab ~]# git clone https://gitlab.com/xhang/gitlab.git [root@gitlab ~]# cd gitlab 2、查看全部分支版本 [root@gitlab ~]# git branch -a 3、对比版本、生成补丁包 [root@gitlab ~]# git diff remotes/origin/10-0-stable remotes/origin/10-0-stable-zh > /tmp/10.0.0-zh.diff 4、停止服务器 [root@gitlab ~]# gitlab-ctl stop 5、打补丁 [root@gitlab ~]# patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < /tmp/10.0.0-zh.diff 6、启动和重新配置 [root@gitlab ~]# gitlab-ctl start [root@gitlab ~]# gitlab-ctl reconfigure
https://www.cnblogs.com/zhujingzhi/p/9703457.html
https://www.cnblogs.com/yanjieli/p/10605381.html
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通