centos 8.3安装 一键安装部署gitlab
2024-10-19 09:44:45
安装和配置gitlab必须的依赖包
[root@gitlabdev ~]#dnf install -y curl policycoreutils openssh-server perl
设置开机自启sshd
[root@gitlabdev ~]#systemctl enable sshd
启动sshd
[root@gitlabdev ~]#systemctl start sshd
查看防火墙的状态
[root@gitlabdev ~]#systemctl status firewalld
执行结果
如果是开启状态执行以下操作
永久生效,开启http服务
[root@gitlabdev ~]#firewall-cmd --permanent --add-service=http
永久生效,开启https服务
[root@gitlabdev ~]#firewall-cmd --permanent --add-service=https
重新加载一下设置
[root@gitlabdev ~]#systemctl reload firewalld
安装用于发送邮件通知的Postfix
安装Postfix
[root@gitlabdev ~]#dnf install postfix
设置postfix开机自启
[root@gitlabdev ~]#systemctl enable postfix
启动postfix
[root@gitlabdev ~]#systemctl start postfix
下载安装Gitlab安装包
[root@gitlabdev ~]# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gitlab-ce-14.0.4-ce.0.el8.x86_64.rpm
可以根据自己的系统选择不同的安装版本
清华园下载链接:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum
安装gitlab
[root@gitlabdev ~]#rpm -Uvh gitlab-ce-14.0.4-ce.0.el8.x86_64.rpm
更改gitlab默认端口
[root@gitlabdev ~]# vim /etc/gitlab/gitlab.rb
修改内容:external_url
后改为自己的http://ip:端口;
unicorn['port'] = 28080 修改 unicorn['port'] 端口;
!注意,两个端口不能一样
使用gitlab-ctl reconfigure
自动配置,并安装数据库,初始化信息,如下所示(第一次使用配置时间较长)
[root@gitlabdev ~]#gitlab-ctl reconfigure
=====================================================================================
至此系统已经启动,可在网页输入系统的IP+端口即可进入登录,初次登录要求修改root管理员密码;
在浏览器中输入 http://ip:端口/ ,然后 change password: ,并使用root用户登录 即可 (后续动作根据提示操作)
如操作太快,没有记住密码,可参看我的另一篇博客进行修改密码
修改密码链接:https://www.cnblogs.com/cndevops/p/14973118.html
=====================================================================================
使用gitlab-ctl
启动所有gitlab组件
[root@gitlabdev ~]#gitlab-ctl start
启动服务
[root@gitlabdev ~]#gitlab-ctl reconfigure
停止服务
[root@gitlabdev ~]#gitlab-ctl stop
最新文章
- nginx实现本地图片生成缩略图
- Linux之head、tail、grep、cut等命令详解
- Java并发编程实战(使用synchronized实现同步方法)
- 再谈select, iocp, epoll,kqueue及各种I/O复用机制
- Java-String类的常用方法总结
- Sqlite注入测试
- 读《JavaScript语言精粹》的一些感言
- 基于.net mvc的校友录(源程序)
- Maven-编译打包
- OC6_复合类的类存管理
- Bleed Brake Master Cylinder with Intelligent Tester IT2
- SQLServer 跨服务器查询的两个办法
- [转]Libev源码分析 -- 整体设计
- C# Socket的TCP通讯
- loadrunner提高篇-结果分析实践
- IndentationError: unexpected indent
- opencv 增强现实(一):特征点检测
- UIMediaScanner从相册读取资源的功能
- C# 语法一 构造函数
- Database学习 - mysql 数据库 多表/复合/子 查询
热门文章
- 大文件查找 du -ahx . | sort -rh | head -10
- 11.20 yum:自动化RPM包管理工具
- python3 ftplib模块连接FTP
- 进程-信号相关 函数-(转自wblyuyang)
- 【遥感数字图像处理实验】Erdas版详细图文实验教程(8实验全)
- 使用Apache Pulsar + Hudi构建Lakehouse方案了解下?
- rabbit_消费者
- 201871030139-于泽浩 实验三 结对项目—《D{0-1}KP 实例数据集算法实验平台》项目报告
- JVM-栈帧之局部变量表
- MEMS传感器作为变革的驱动力