contos7部属gitlab

1、安装依赖包

sudo yum install -y curl policycoreutils-python openssh-server  postfix

2、开启相关服务及放行防火墙

#启动sshd并配置开机启动
sudo systemctl enable sshd
sudo systemctl start sshd
#启动postfix并配置开机启动
sudo systemctl enable postfix
sudo systemctl start postfix
#防火墙放行http、https
sudo firewall-cmd  --permanent  --add-service=http
sudo firewall-cmd  --permanent  --add-service=https
#从新加载防火墙
sudo systemctl reload firewalld

3、到清华源下载gitlab-ce 版

清华大学源地址:https://mirrors.tuna.tsinghua.edu.cn/python

contos7部属gitlab
直接在服务器上下载git

cd /tmp  && wget  https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-12.3.5-ce.0.el7.x86_64.rpm

或者下载到本地的wondows机器再上传到服务器vim

4、安装gitlab及修改配置文件

一、安装gitlab服务器

rpm -ivh  gitlab-ce-12.3.5-ce.0.el7.x86_64.rpm

contos7部属gitlab

二、修改配置文件 /etc/gitlab/gitlab.rbssh

vim   /etc/gitlab/gitlab.rb

contos7部属gitlab
把图中的域名改为本身的域名或者ipcurl

sed   -i  "/^external_url/c  external_url   'http://192.168.0.107:168' "    /etc/gitlab/gitlab.rb

contos7部属gitlab
配置邮箱帐号
contos7部属gitlab
配置邮箱smtp
contos7部属gitlab
三、从新加载gitlab 的配置文件ide

gitlab-ctl  reconfigure

首次加载配置文件时间有点长gitlab

四、gitlab 命令post

#gitlab 启动
gitlab-ctl  start 
#gitlab 中止
gitlab-ctl  stop
#查看gitlab 状态
gitlab-ctl  status

五、访问 http://192.168.0.107:168 设置管理员密码,登陆gitlaburl

相关文章
相关标签/搜索