gitlab,Jenkins安装与部署后台web
1、gitlab的安装
1.1 系统为乌班图18.04版本
设置apt源
vi /etc/apt/sources.list 删除其他内容,改为下面
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
1.2 下载安装包
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu/pool/bionic/main/g/gitlab-ce/gitlab-ce_12.2.5-ce.0_amd64.deb
dpkg -i gitlab-ce_12.2.5-ce.0_amd64.deb 安装
出现下面这个图代表安装成功
1.3 配置访问
gitlab是通过邮箱注册账户的,所以需要开启POP3/SMTP服务
QQ授权码生成方式:QQ授权码教程
vi /etc/gitlab/gitlab.rb 修改这行,把访问地址设置为本机IP
external_url 'http://192.168.116.161'
#下面是管理员账户邮箱配置,收到授权码后,修改qq号和qq邮箱授权码这2个就行,其他不用变
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.qq.com"
gitlab_rails['smtp_port'] = 465
gitlab_rails['smtp_user_name'] = "qq号@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['gitlab_email_from'] = "qq号@qq.com"
user["git_user_email"] = "qq号@qq.com"
gitlab-ctl reconfigure 初始化配置并启动,等到出现下面这个界面表示初始化成功
1.4 输入地址访问
http://192.168.116.161/
默认会直接让你输入密码,账户为root
设置密码后跳转到登录界面,输入账户root,密码为上面设置的密码即可登录
注意:默认有register自动注册账户功能,也就是图上的register
1.5 将自动注册账户功能关闭
选择红色箭头位置
左边列表栏找到这个
这里默认是enabled,将打钩取消,关闭自动注册账户
下面有保存选项,点击Save changes
重新登录,确认关闭成功
1.6 开启中文显示
右上角选择设置
左边列表找到这个
在最下面选择中文,然后保存退出,重新登录下网站