官方文档点击这里
简介
maven 代码构建工具
git 基于分布式的代码版本管理工具
?GitLab 是一个基于 Git 的web平台,集成了大量用于软件开发和部署以及项目管理的工具
安装
在线安装文档请点击 JDK安装请点击 Maven安装请点击
- 硬件要求
操作系统:CentOS (7/8)、Debian (9/10)、Ubuntu (16.04/18.04/20.04) 软件需求:GitLab 13.0 and later requires Redis version 4.0 or higher 硬件需求:CPU 最低要求4核(最多支持500个用户) 内存需求:最低要求4GB内存(最多支持500个用户) 数据库要求:PostgreSQL是唯一受支持的数据库,它与Omnibus GitLab包捆绑在一起。GitLab 12.1中删除了对MySQL的支持。建议使用GitLab和MySQL/MariaDB的现有用户在升级之前迁移到PostgreSQL - 安装和配置依赖项?
?
sudo dnf install -y curl policycoreutils openssh-server perl
sudo systemctl enable sshd
sudo systemctl start sshd
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo systemctl reload firewalld
sudo dnf install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
yum install -y openssh-server
yum install -y policycoreutils-python-utils
cd /usr/local/ && mkdir gitlab && cd gitlab
yum install -y gitlab-ce-14.5.1-ce.0.el8.x86_64.rpm
gitlab-ctl stop
rpm -e gitlab-ce
yum list installed|grep gitlab
yum remove gitlab-ce.x86_64
find / -name gitlab | xargs rm -rf
vi /etc/gitlab/gitlab.rb
external_url 'http://192.168.233.135:81'
gitlab-ctl reconfigure
gitlab-ctl restart
gitlab-ctl show-config
gitlab-rake gitlab:check SANITIZE=true --trace
gitlab-ctl status
gitlab-ctl start
gitlab-ctl stop
gitlab-rails console
user = User.find(1)
user.password = '密码'
user.password_confirmation = '重复密码'
user.save!
- 配置邮件服务[QQ邮箱]
获取QQ邮箱的授权码如下: 配置相关参数: 参考文档:https://docs.gitlab.com/omnibus/settings/smtp.html
vi /etc/gitlab/gitlab.rb
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.qq.com"
gitlab_rails['smtp_port'] = 465
gitlab_rails['smtp_user_name'] = "735245459@qq.com"
gitlab_rails['smtp_password'] = "qq邮箱授权码"
gitlab_rails['smtp_domain'] = "qq.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = true
gitlab_rails['smtp_pool'] = false
gitlab_rails['gitlab_email_enabled'] = true
gitlab_rails['gitlab_email_from'] = '735245459@qq.com'
gitlab_rails['gitlab_email_display_name'] = 'GitlabForLixing'
gitlab_rails['gitlab_email_reply_to'] = '735245459@qq.com'
gitlab-ctl reconfigure
gitlab-ctl restart
gitlab-rails console
Notify.test_email("lixing_java@163.com","title","gitlab").deliver_now
登录并配置
登录地址:192.168.233.135:81
- 设置中文
注意:修改后需要重新登录 - 编辑个人资料
- 禁用用户注册功能
- 设置初始化分支名称为master
- 关联本地Git的SSH密钥
|