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

最新文章

  1. C++实现邮件群发的方法
  2. js常用正则
  3. ASimpleCache使用感受
  4. html5 大幅度地增加和改良input元素的种类
  5. 【redis】03list类型
  6. SVD学习
  7. 读写锁的实现原理(pthread_rwlock_t)
  8. 分布式事物(同样适用于dubbo事务等分布式事务)
  9. gevent模块学习(一)
  10. spark on yarn 集群部署
  11. 从OsChina Git下载项目到MyEclipse中
  12. Codeforces.643E.Bear and Destroying Subtrees(DP 期望)
  13. Word中回车和网页换行替换
  14. 【星云测试】开发者测试(3)-采用精准测试工具对springcloud微服务应用进行穿透测试
  15. gulp-rev 添加版本号
  16. Java学习笔记——基础篇
  17. LOJ103 子串查找
  18. django-orm简记
  19. windows8安装docker(tool box)
  20. react-native 中使用 mobx

热门文章

  1. MongoDB常用数据库命令第二集
  2. 24、vuex刷新页面数据丢失解决办法
  3. Socket-网络服务提供的一种机制
  4. 【案例】如何让阀门制造提高排产效率?APS系统帮你实现
  5. sizeof()计算
  6. SAP CDS重定向视图和直接读这两者场景的性能比较
  7. APP开发基础知识(转载)
  8. U盘启动安装CentOS 7出现 -dracut initqueue timeout
  9. 【PyTorch v1.1.0文档研习】60分钟快速上手
  10. @Transactional(rollbackFor)