gitlab+jenkins+docker
配置yum源vim /etc/yum.repos.d/gitlab-ce.repo复制以下内容:[gitlab-ce]name=gitlab-cebaseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6Repo_gpgcheck=0Enabled=1Gpgkey=https://packages.gitlab.com...
·
配置yum源
vim /etc/yum.repos.d/gitlab-ce.repo
复制以下内容:
[gitlab-ce]
name=gitlab-ce
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6
Repo_gpgcheck=0
Enabled=1
Gpgkey=https://packages.gitlab.com/gpg.key
yum install gitlab-ce #自动安装最新版
编辑配置文件
cd /etc/gitlab/
ls
gitlab.rb
vim gitlab.rb
external_url 'http://172.25.34.1'
浏览器进行访问,默认启动的是nginx,监听80端口,设置用户密码,用户名为root
SSH密钥
ssh-keygen
cd ~/.ssh
ls
authorized_keys id_rsa id_rsa.pub known_hosts
cat id_rsa.pub
设置界面进入ssh
上传文件到私有仓库
touch index.html
echo aini1wannian > index.html
git add index.html
git commit -m "cn"
jekins服务构建
jdk-8u171-linux-x64.rpm jenkins-2.164.3-1.1.noarch.rpm
yum install -y *
浏览器访问172.25.34.2:8080
根据网页提示查看密码
[root@server5 jenkins]# cat /var/lib/jenkins/secrets/initialAdminPassword
70dc913f40e9434889ae1423b9aefd94
修改下载源
[root@server5 jenkins]# pwd
/var/lib/jenkins
[root@server5 jenkins]# vim hudson.model.UpdateCenter.xml
[root@server5 jenkins]# cat hudson.model.UpdateCenter.xml
<?xml version='1.1' encoding='UTF-8'?>
<sites>
<site>
<id>default</id>
<url>https://mirrors.tuna.tsinghua.edu.cn/</url>
</site>
</sites>
[root@server5 jenkins]# systemctl restart jenkins
更多推荐
所有评论(0)