gitlab-安装部署
gitlab 功能:实现开发的持续集成
- gitlab 环境要求:https://docs.gitlab.com/ce/install/requirements.html 对CPU,内存,存储等等有要求
- gitlab 国外下载地址:gitlab/gitlab-ce - Packages · packages.gitlab.com
- gitlab 国内下载地址:下载地址 https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/,根据自己的环境下载对应的版本
安装环境
centos7.9,cpu 2core 内存 3GB
- 安装部署
rpm –ivh gitlab-ce-11.11.8-ce.0.el7.x86_64.rpm
- 修改配置
vim /etc/gitlab/gitlab.rb external_url 'http://10.80.0.21' gitlab_rails['smtp_enable'] = true gitlab_rails['smtp_address'] = "smtp.163.com" gitlab_rails['smtp_port'] = 465 gitlab_rails['smtp_user_name'] = "git201901xdx@163.com" gitlab_rails['smtp_password'] = "xxxxxxxxxxx" gitlab_rails['smtp_domain'] = "163.com" gitlab_rails['smtp_authentication'] = "login" gitlab_rails['smtp_enable_starttls_auto'] = true gitlab_rails['smtp_tls'] = true gitlab_rails['gitlab_email_from'] = 'git201901xdx@163.com' user['git_user_email'] = "git201901xdx@163.com"
- 重新配置,并启动gitlab服务
gitlab-ctl reconfigure # 会安装1-2分钟,结尾打印 Running handlers: Running handlers complete Chef Client finished, 481/1275 resources updated in 01 minutes 32 seconds gitlab Reconfigured!
- gitlab相关目录
- /etc/gitlab 配置文件目录
- /run/gitlab 运行pid目录
- /opt/gitlab 安装目录
- /var/opt/gitlab 数据目录,代码存放目录
- /var/log/gitlab 日志目录
- 访问gitlab http://10.80.0.21/
修改初始化密码,至少8位,修改后会自动跳转到登陆页面,输入:root/密码 即可登录