1.地址:
https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
安装 postfix 并启动
yum install postfix
systemctl start postfix
systemctl enable postfix
ssh服务启动
systemctl enable sshd
systemctl start sshd
开放 ssh 以及 http 服务,然后重新加载防火墙列表
firewall-cmd --add-service=ssh --permanent
firewall-cmd --add-service=http --permanent
firewall-cmd --reload
2.安装Gitlab
rpm -ivh gitlab-ce-16.2.9-ce.0.el7.x86_64.rpm
在安装rpm包的时候报错以上内容,说明gitlab的一依赖包没装,下面执行下:

yum install -y policycoreutils-python
安装成功显示:

3修改gitlab配置文件指定服务器ip和自定义端口
进入gitlab配置文件进行编辑操作
vim /etc/gitlab/gitlab.rb

修改external_url 'http:/gitlab.example.com',将 'http:/gitlab.example.com' 替换为 ‘gitlab的ip地址和端口号’。
将8092端口添加到防火墙中,并重启防火墙。
firewall-cmd --zone=public --add-port=8092/tcp --permanent
sudo systemctl reload firewalld

重置gitlab
gitlab-ctl reconfigure
启动gitlab
gitlab-ctl restart

访问gitlab

查看初始密码
cat /etc/gitlab/initial_root_password

gitlab切换中文模式

修改密码:


**
开始使用gitlab创建项目
**


1,创建一个测试项目

2,复制仓库地址

生成公钥私钥对出来,命令:ssh-keygen
进入密钥目录:cd .ssh/

———————————————————————————————————————————————————————————————————————————————————————
7146

被折叠的 条评论
为什么被折叠?



