Linux:搭建GitLab
2024-09-02 13:22:33
0.写在前面
GitLab官方明确要求最低配置2核4G,如果配置过低,会出现502错误。
1.安装SSH
#安装ssh
sudo yum install -y curl policycoreutils-pythonopenssh-server #将SSH服务设置成开机自启动
sudo systemctl enable sshd #启动SSH服务
sudo systemctl start sshd
2.安装防火墙
#安装防火墙
yum install firewalld systemd -y #开启防火墙
service firewalld start #添加http服务到firewalld,pemmanent表示永久生效,若不加--permanent系统下次启动后就会失效
sudo firewall-cmd --permanent --add-service=http #重启防火墙,安装命令
sudo systemctl reload firewalld
开启防火墙之后,导致服务器访问不了,可以停掉:service firewalld stop
3.安装Postfix
#安装Postfix以发送通知邮件
sudo yum install postfix #将postfix服务设置成开机自启动
sudo systemctl enable postfix #启动postfix
sudo systemctl start postfix
4.安装GitLab
#wget未安装则进行安装
yum -y install wget #下载GitLab安装包
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-12.4.3-ce.0.el7.x86_64.rpm #安装
rpm -ivh gitlab-ce-12.4.3-ce.0.el7.x86_64.rpm
EL是Red Hat Enterprise Linux的简写
EL5软件包用于在Red Hat 5.x, CentOS 5.x, CloudLinux 5.x的安装
EL6软件包用于在Red Hat 6.x, CentOS 6.x, and CloudLinux 6.x进行安装
EL7 软件包用于在Red Hat 7.x, CentOS 7.x, and CloudLinux 7.x的安装
cat /etc/redhat-release 查看CentOS版本
5.配置GitLab
#修改gitlab配置文件指定服务器ip和自定义端口:
vim /etc/gitlab/gitlab.rb 修改这个参数
external_url 'ip:port' #重置并启动GitLab
gitlab-ctl reconfigure
gitlab-ctl restart
最新文章
- C++实现邮件群发的方法
- js常用正则
- ASimpleCache使用感受
- html5 大幅度地增加和改良input元素的种类
- 【redis】03list类型
- SVD学习
- 读写锁的实现原理(pthread_rwlock_t)
- 分布式事物(同样适用于dubbo事务等分布式事务)
- gevent模块学习(一)
- spark on yarn 集群部署
- 从OsChina Git下载项目到MyEclipse中
- Codeforces.643E.Bear and Destroying Subtrees(DP 期望)
- Word中回车和网页换行替换
- 【星云测试】开发者测试(3)-采用精准测试工具对springcloud微服务应用进行穿透测试
- gulp-rev 添加版本号
- Java学习笔记——基础篇
- LOJ103 子串查找
- django-orm简记
- windows8安装docker(tool box)
- react-native 中使用 mobx