首页 > 系统相关 >centos6.9安装Jenkins服务

centos6.9安装Jenkins服务

时间:2024-01-24 15:47:37浏览次数:26  
标签:39 64 missing mtr perl centos6.9 Jenkins 安装 pl

1.安装javajdk,默认centos6.9只能下载到java8,安装成功后Jenkins会有一堆插件用不了,使用这里手动安装java17,在官网找对应安装包

https://www.oracle.com/java/technologies/downloads/#java17

这里下载了jdk-17_linux-x64_bin.rpm格式

 

rpm -ivh 文件名
java -version 查看下版本,有输出就安装成功了


设置JAVA_HOME:为了方便使用Java 17,您可以设置JAVA_HOME环境变量。编辑/etc/profile文件,并在文件末尾添加以下行:

export JAVA_HOME=/usr/java/jdk-17
export PATH=$JAVA_HOME/bin:$PATH

保存文件并退出。然后运行以下命令以使更改生效:

source /etc/profile

至此java环境安装成功

 

安装Jenkins

2. 添加Jenkins仓库的GPG密钥:
```
sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key
```

3. 添加Jenkins仓库到yum源列表:
```
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
```

4. 导入Jenkins仓库的GPG密钥:
```
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
```

6. 安装Jenkins:
```
sudo yum install jenkins

注意这里默认会装上最新的,根据你本地的环境可能会下不了,我安装的时候就报错了

Resolving Dependencies
--> Running transaction check
---> Package jenkins.noarch 0:2.426.1-1.1 will be installed
--> Processing Dependency: systemd for package: jenkins-2.426.1-1.1.noarch
--> Processing Dependency: systemd for package: jenkins-2.426.1-1.1.noarch
--> Finished Dependency Resolution
Error: Package: jenkins-2.426.1-1.1.noarch (jenkins)
           Requires: systemd
 You could try using --skip-broken to work around the problem
** Found 40 pre-existing rpmdb problem(s), 'yum check' output follows:
mysql1-5.6.39-1.x86_64 has missing requires of perl(lib::mtr_gcov.pl)
mysql1-5.6.39-1.x86_64 has missing requires of perl(lib::mtr_gprof.pl)
mysql1-5.6.39-1.x86_64 has missing requires of perl(lib::mtr_io.pl)
mysql1-5.6.39-1.x86_64 has missing requires of perl(lib::mtr_misc.pl)
mysql1-5.6.39-1.x86_64 has missing requires of perl(lib::mtr_process.pl)
mysql1-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_cases.pl)
mysql1-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_gcov.pl)
mysql1-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_gprof.pl)
mysql1-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_im.pl)
mysql1-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_io.pl)
mysql1-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_match.pl)
mysql1-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_misc.pl)
mysql1-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_process.pl)
mysql1-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_report.pl)
mysql1-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_stress.pl)
mysql1-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_timer.pl)
mysql1-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_unique.pl)
mysql1-5.6.39-1.x86_64 has missing requires of perl(mtr_io.pl)
mysql1-5.6.39-1.x86_64 has missing requires of perl(mtr_misc.pl)
mysql1-5.6.39-1.x86_64 has missing requires of perl(mtr_process.pl)
mysql2-5.6.39-1.x86_64 has missing requires of perl(lib::mtr_gcov.pl)
mysql2-5.6.39-1.x86_64 has missing requires of perl(lib::mtr_gprof.pl)
mysql2-5.6.39-1.x86_64 has missing requires of perl(lib::mtr_io.pl)
mysql2-5.6.39-1.x86_64 has missing requires of perl(lib::mtr_misc.pl)
mysql2-5.6.39-1.x86_64 has missing requires of perl(lib::mtr_process.pl)
mysql2-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_cases.pl)
mysql2-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_gcov.pl)
mysql2-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_gprof.pl)
mysql2-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_im.pl)
mysql2-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_io.pl)
mysql2-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_match.pl)
mysql2-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_misc.pl)
mysql2-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_process.pl)
mysql2-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_report.pl)
mysql2-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_stress.pl)
mysql2-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_timer.pl)
mysql2-5.6.39-1.x86_64 has missing requires of perl(lib::v1/mtr_unique.pl)
mysql2-5.6.39-1.x86_64 has missing requires of perl(mtr_io.pl)
mysql2-5.6.39-1.x86_64 has missing requires of perl(mtr_misc.pl)
mysql2-5.6.39-1.x86_64 has missing requires of perl(mtr_process.pl)说是我的mysql环境有问题,搞来搞去没成功

解决方法:到Jenkins仓库官网看下https://pkg.jenkins.io/redhat-stable/ 有什么版本可以用

 

 sudo yum install jenkins-2.361.1

指定这个版本我就安装成功了

```

7. 启动Jenkins服务:
```
sudo service jenkins start
```

8. 配置Jenkins服务开机自启动:
```
sudo chkconfig jenkins on
```

9. 打开防火墙端口,允许Jenkins流量通过:
```
sudo firewall-cmd --zone=public --add-port=8080/tcp --permanent
sudo firewall-cmd --reload
```

10. 完成安装后,通过以下URL访问Jenkins Web界面:
```
http://your_server_ip:8080
```

11. 在首次访问时,您将需要提供Jenkins管理员密码。您可以通过以下命令找到该密码:
```
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
```

复制密码并粘贴到Jenkins Web界面中进行验证。

 

标签:39,64,missing,mtr,perl,centos6.9,Jenkins,安装,pl
From: https://www.cnblogs.com/Cxiangyang/p/17984782

相关文章

  • Ubuntu20.04安装后,root账户无法登录,ssh无法远程连接处理方法
    摘自:https://blog.csdn.net/Alex_81D/article/details/131512358 二、给root账户设置密码,并保证可成功登录1.设置root用户密码在桌面上使用快捷键Ctrl+Alt+T打开终端模拟器执行sudopasswdroot,然后输入设置的密码,输入两次,完成了设置root用户密码2.修改配置文件修改gdm-auto......
  • k8s系列-minikube操作应用之安装篇
    Minikube是一个轻量级的Kubernetes集群,专为本地开发和测试环境设计。Minikube由Kubernetes社区维护,支持macOS、Linux和Windows等多种操作系统平台。它使用Kubernetes的官方稳定版本,并提供了大部分功能,包括容器编排管理、负载均衡、Ingress以及权限控制等高级特性。......
  • 四、掌握ArgoCD:安装、Gitlab集成和RBAC配置以实现无缝持续部署
    Gitlab集成    然后点击提交(saveapplication),将得到应用创建后的信息:  注册完成后,我们可以看到应用现在只有0个Clients,即还没有任何实例作为这个Application的实例进行认证:但不管怎么说,应用注册这一步我们算成功完成啦!GiveMeFive~用如下命令编辑con......
  • k8s~istio的安装与核心组件
    安装istio在线安装:https://istio.io/latest/docs/setup/getting-started/#download或者直接在这里下载:https://github.com/istio/istio/releases/tag/1.20.2$curl-Lhttps://istio.io/downloadIstio|ISTIO_VERSION=1.20.2TARGET_ARCH=x86_64sh-$cdistio-1.20.2$e......
  • mellanox ib card芯片型号是ConnectX-6操作系统centos 7.6升级完内核5.19 .4后,安装驱
    在升级内核后,有时候需要重新编译和安装驱动以适配新的内核版本。以下是一些可能的解决步骤:确保内核头文件已安装:在升级内核后,可能需要安装新内核版本的头文件。使用以下命令安装:bashCopycodesudoyuminstallkernel-devel-$(uname-r)kernel-headers-$(uname-r)确保......
  • 安装宝塔脚本中报的错误
    实验环境:openKylin操作系统1.安装过程root@sky9890:~#URL=https://download.bt.cn/bthids/scripts/install_hids.sh&&if[-f/usr/bin/curl];thencurl-sSO"$URL";elsewget-Oinstall_hids.sh"$URL";fi;bashinstall_hids.sh--2024-01-2413:21:......
  • 安装OpenNebula主控额外依赖和主程序
    配置下国内源gemsources-rhttps://rubygems.org/-ahttps://gems.ruby-china.com/如果网络错误更换下面地址gemsources--removehttps://rubygems.orgsourcehttps://rubygems.orgnotpresentincachegemsources--addhttp://rubygems.orghttps://rubygems.or......
  • db2安装部署
    环境:OS:Centos7DB:v11.5.61.解压[root@host135db2]#tar-xvfv11.5.6_linuxx64_server_dec.tar.gz[root@host135db2]#mvserver_dec/opt/db2 2.检查安装环境[root@host135db2]#./db2prereqcheck 3.安装依赖包yuminstalllibstdc++*yuminstallpam*yumgroupinst......
  • Ubuntu安装Ansible AWX
    环境:AWSEC2,UbuntuServer22.04+桌面环境1.-安装dockersudoaptinstallapt-transport-httpsca-certificatescurlsoftware-properties-commoncurl-fsSLhttps://download.docker.com/linux/ubuntu/gpg|sudoapt-keyadd-sudoadd-apt-repository"deb[arch=amd64]......
  • DataGrip 2023.3.2 安装教程(附最新激活码,亲测有效)
    DataGrip是JetBrains公司开发的一款多引擎数据库环境,支持MySQL,MariaDB,PostgreSQL,SQLite,HyperSQL,ApacheDerby,H2,HSQLDB,MSSQLServer,Oracle,DB2,InterSystemsCache,Informix,Firebird,Derby和SQLServerExpress。它提供了单一的、集成的开发环境,用于......