参考:https://www.cnblogs.com/dotnet261010/p/9811161.html
前置条件:yum update -y(系统升级)
安装vim编辑器:yum install vim -y
1、安装ssh协议:yum install -y curl policycoreutils-python openssh-server
2、启动ssh服务&设置为开机启动:
systemctl enable sshd
systemctl start sshd
3、安装防火墙&开启防火墙
yum install firewalld systemd -y
service firewalld start
4、添加HTTP服务到firewalld,pemmanent表示永久生效,若不加–permanent系统下次启动后就会失效。
firewall-cmd –permanent –add-service=http
5、重启防火墙
systemctl reload firewalld
6、安装Postfix以发送邮件
yum install -y postfix
7、启动postfix并设置为开机启动
systemctl enable postfix
systemctl start postfix
8、安装wget,用于从外网上下载插件
yum -y install wget
9、添加gitlab镜像
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/+最新版本
https://packages.gitlab.com/gitlab/gitlab-ce+最新版本
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-17.0.1-ce.0.el7.x86_64.rpm
10、安装Gitlab
rpm -i +最新版本
rpm -i gitlab-ce-17.0.0-ce.0.el7.x86_64.rpm
11、修改gitlab配置文件指定服务器ip和自定义端口:如:http://xxx.xx.xxx.xxx:9090
vim /etc/gitlab/gitlab.rb
12、将9090端口添加到防火墙中
firewall-cmd –zone=public –add-port=9090/tcp –permanent
13、重启防火墙
systemctl reload firewalld
14、重置gitlab
gitlab-ctl reconfigure
有必要禁用 gitlab-kas
gitlab_kas[‘enable’] = false
15、启动gitlab
gitlab-ctl restart
安装vim编辑器:yum install vim -y
1、安装ssh协议:yum install -y curl policycoreutils-python openssh-server
2、启动ssh服务&设置为开机启动:
systemctl enable sshd
systemctl start sshd
3、安装防火墙&开启防火墙
yum install firewalld systemd -y
service firewalld start
4、添加HTTP服务到firewalld,pemmanent表示永久生效,若不加–permanent系统下次启动后就会失效。
firewall-cmd –permanent –add-service=http
5、重启防火墙
systemctl reload firewalld
6、安装Postfix以发送邮件
yum install -y postfix
7、启动postfix并设置为开机启动
systemctl enable postfix
systemctl start postfix
8、安装wget,用于从外网上下载插件
yum -y install wget
9、添加gitlab镜像
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/+最新版本
https://packages.gitlab.com/gitlab/gitlab-ce+最新版本
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-17.0.1-ce.0.el7.x86_64.rpm
10、安装Gitlab
rpm -i +最新版本
rpm -i gitlab-ce-17.0.0-ce.0.el7.x86_64.rpm
11、修改gitlab配置文件指定服务器ip和自定义端口:如:http://xxx.xx.xxx.xxx:9090
vim /etc/gitlab/gitlab.rb
12、将9090端口添加到防火墙中
firewall-cmd –zone=public –add-port=9090/tcp –permanent
13、重启防火墙
systemctl reload firewalld
14、重置gitlab
gitlab-ctl reconfigure
有必要禁用 gitlab-kas
gitlab_kas[‘enable’] = false
15、启动gitlab
gitlab-ctl restart
查看初始密码:cat /etc/gitlab/initial_root_password
感谢您的来访,获取更多精彩文章请收藏本站。
![](/imc/zonghe/20.webp)
© 版权声明
1. 资源都是经过站长或作者收集测试修改后发布分享。转载请在文内以超链形式注明出处,谢谢合作!
2. 本站除原创内容,其余所有内容均收集自互联网,仅限用于学习和研究目的,本站不对其内容的合法性承担任何责任。如有版权内容,请通知我们或作者删除,其版权均归原作者所有,本站虽力求保存原有版权信息,但因众多资源经多次转载,已无法确定其真实来源,或已将原有信息丢失,所以敬请原作者谅解!
3. 本站用户所发布的一切资源内容不代表本站立场,并不代表本站赞同其观点和对其真实性负责,若您对本站所载资源作品版权归属存有异议,请留言附说明联系邮箱,我们将在第一时间予以处理 ,同时向您表示歉意!为尊重作者版权,请购买原版作品,支持您喜欢的作者,谢谢!
4. 本站一律禁止以任何方式发布或转载任何违法的相关信息,访客如有发现请立即向站长举报;本站资源文件大多存储在云盘,如发现链接或图片失效,请联系作者或站长及时更新。
THE END
暂无评论内容