linux下部署安装gitlab

安装依赖

# gitlab安装
echo gitlab > /etc/hostname
hostname gitlab
yum install -y curl policycoreutils openssh-server openssh-clients  policycoreutils-python 
yum install -y postfix

安装gitlab

wget  https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-12.2.4-ce.0.el7.x86_64.rpm
rpm -ivh gitlab-ce-12.2.4-ce.0.el7.x86_64.rpm 

更改配置


sed -i -e  's/^inet_interfaces/#inet_interfaces/g' -e 's/^#inet_interfaces = all/inet_interfaces = all/g' /etc/postfix/main.cf
systemctl enable postfix --now

cp  /etc/gitlab/gitlab.rb  /etc/gitlab/gitlab.rb.default
sed -i '/^external_url/s/gitlab.example.com/gitlab.jiajia.top/g' /etc/gitlab/gitlab.rb

初始化

gitlab-ctl reconfigure  # 重载配置

启动gitlab

# 开启、关闭、重启
gitlab-ctl start
gitlab-ctl stop
gitlab-ctl restart

设置密码

12345678

汉化

设置完成之后界面默认是全英文的,可以在直接访问 [http://192.168.1.92/profile/preferences](http://192.168.1.92/profile/preferences) 中的Localization 部分设置语言,点击保存后刷新页面即可变为中文

posted @   &UnstopPable  阅读(48)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· 写一个简单的SQL生成工具
· AI 智能体引爆开源社区「GitHub 热点速览」
· C#/.NET/.NET Core技术前沿周刊 | 第 29 期(2025年3.1-3.9)
点击右上角即可分享
微信分享提示