Jenkins配置

//密码
配置时候生成的密码:
/var/lib/jenkins/secrets/initialAdminPassword


//ssh key
user
====》Config
====》SSH Public Keys
     SSH Public Keys
复制粘帖

//反向代理报错
报错:
It appears that your reverse proxy set up is broken.

解决:
系统管理->系统设置->Jenkins Location并找到Jenkins URL,填入浏览器打开jenkins的ip和端口
ps:
确保端口值与计算机上Jenkins文件夹中jenkins.xml文件<arguments>部分中设置的端口值匹配。


Manage Jenkins
====》System Configuration
====》configuration
====》Jenkins Location
====》        Jenkins URL   localhost改成: http://127.0.0.1:9090/


http://192.168.30.94:9090/


//配置LDAP

配置LDAP验证。
note:
    轻型目录访问协议(英文:Lightweight Directory Access Protocol,缩写:LDAP,/ˈɛldæp/)是一个开放的,中立的,工业标准的应用协议,通过IP协议提供访问控制和维护分布式信息的目录信息。

a、全局安全配置 -> 勾选LDAP -> 点开Advanced Server Configuration
b、添加配置
    Server    ldap://ldap.oupeng.com
    root DN   dc=beijing,dc=op
    User search filter    uid={0}
    勾选 Parse user attribute for list of LDAP groups - memberOf
    Manager DN    cn=admin,dc=beijing,dc=op
    Manager Password    PASS
    Display Name LDAP attribute   uid
    Email Address LDAP attribute    mail

保存配置,然后就可以用LDAP账号登陆了。

note:
    不用此配置


 Jenkins’ own user database     
         Allow users to sign up


//版本更新warning
版本更新warning:
Jenkins
Configure Global Security
Hidden security warnings

This section allows you to suppress warnings, applicable to your Jenkins configuration, provided by the updates sites. If you do, they won’t be shown by the Update Site Warnings administrative monitor. Checked warnings are reported (the default), unchecked warnings are hidden.
     Security warnings    
Jenkins core: Multiple security vulnerabilities in Jenkins 2.274 and earlier, LTS 2.263.1 and earlier
https://www.jenkins.io/security/advisory/2021-01-13/

//插件check
http://localhost:9090/pluginManager/advanced

Update Site
https://updates.jenkins.io/update-center.json
http://updates.jenkins.io/update-center.json

点击:
    check now


//安装新插件 ---
安装新插件:
http://localhost:9090/pluginManager/available
搜索 Locale

    This plugin is up for adoption! We are looking for new maintainers. Visit our Adopt a Plugin initiative for more information.


Restart Jenkins when installation is complete and no jobs are running

一直是 Pending 状态

//安装新插件手动
http://updates.jenkins-ci.org/download/plugins/
http://updates.jenkins-ci.org/download/plugins/locale/


插件下载地址:http://updates.jenkins-ci.org/download/plugins/
如果有插件一直安装失败的情况,可以从jenkins官网下载插件,然后导入到jenkins。
示例:从官方下载gitlab-plugin插件到本地,然后导入到jenkins中。
在jenkins插件管理->高级选择上传插件进行安装。

//插件--publish over ssh
publish-over-ssh
    1.22    SHA-1: 1d69bb208dc85e94628799bbe9c80132c5baf06b, SHA-256: 754e47773e05ae45a08ebcc783126f40a5537f2e6505cb8f09379ef2468f07ae

// 插件--设置中文
设置中文。忽略浏览器语言,强制使用中文。
     a、安装Locale plugin插件。插件怎么装这里就不说了。
     b、系统设置 -> Locale,Default Language -> zh_CN,勾选Ignore browser preference and force this language to all users忽略浏览器属性强制所有用户使用该语言。


//修改时区

修改时区。这种方式安装的jenkins默认不是亚洲时区。

    # vim /etc/default/jenkins
    JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Duser.timezone=Asia/Shanghai"
     
    # /etc/init.d/jenkins stop
    # /etc/init.d/jenkins start

修改完后在 系统信息 -> 系统属性 -> user.timezone能看到对应的值 Asia/Shanghai。

注意:
    不改也可以

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值