CICD搭建部署
2024-01-10 22:31:19 0 举报
AI智能生成
CICD过程中的各类工具搭建部署
作者其他创作
大纲/内容
yum install -y wgetmv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backupwget http://mirrors.163.com/.help/CentOS7-Base-163.repo -O /etc/yum.repos.d/CentOS-Base.repoyum install -y vimyum install -y lrzszsystemctl stop firewalld && systemctl disable firewalldsetenforce 0 && sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/configyum install -y ntpntpdate ntp.aliyun.com
centos安装下基本的工具
gitlab安装部署
gitlab
Maven安装部署
Maven
harbor
nexus
镜像仓库
yum install -y java-11-openjdk
安装java
下载地址:http://mirrors.jenkins.io/war-stable/latest/jenkins.war
java -jar jenkins.war
启动jenkins
根据页面上提供的路径获取下密码输入进去即可
打开页面访问即可IP:8080
nohup java -jar jenkins.war &
这个方式看起来会一直在前台运行这个进程,一旦关闭jenkins就会停止,我这边试了下将这个进程放后台运行即可
直接下载war包安装
下载对应版本的rpm包
下载rpm包
rpm -ivh jenkins-2.387.3-1.1.noarch.rpm
访问jenkins服务
systemctl start jenkins
通过rpm包安装
wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo --no-check-certificate
rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
yum list | grep jenkins
yum install -y jenkins
systemctl enable jenkins
cat /var/lib/jenkins/secrets/initialAdminPassword
下一步下一步即可
添加jenkins的yum源,通过yum安装
wget -O /etc/yum.repos.d/docker-ce.repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum clean all && yum repolist && yum makecache
yum install -y docker-ce
systemctl enable docker.service --now
docker pull jenkins/jenkins:lts
docker images
mkdir -p ~/opt/docker/jenkins && cd ~/opt/docker/jenkins
docker run \\ -u root \\ --rm \\ -d \\ -p 8080:8080 \\ -p 50000:50000 \\ -v /opt/docker/jenkins/data:/var/jenkins_home \\ -v /var/run/docker.sock:/var/run/docker.sock \\ --name jenkins \\ jenkins/jenkins:lts
docker直接安装
docker compose 安装
docker方式安装
jenkins常用安装方法
jenkins搭建部署
CICD搭建部署
0 条评论
回复 删除
下一页