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 @ 2024-09-15 21:36  &UnstopPable  阅读(23)  评论(0编辑  收藏  举报