ububtu sudo apt-get update

1. Error in the certificate verification [IP: xxx:xxx:xxx:443]

无法安全地用该源进行更新,所以默认禁用该源。
heze@heze:/etc/apt/sources.list.d$ sudo apt-get update
命中:1 http://mirrors.aliyun.com/ubuntu focal InRelease
命中:2 http://mirrors.163.com/ubuntu bionic InRelease                                                                                                  
命中:3 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                          
命中:4 http://mirrors.163.com/ubuntu bionic-security InRelease                                                            
命中:6 http://mirrors.aliyun.com/ubuntu focal-security InRelease                                                          
命中:7 http://mirrors.aliyun.com/ubuntu focal-updates InRelease                               
命中:8 http://cn.archive.ubuntu.com/ubuntu focal InRelease                                                                           
命中:9 http://mirrors.aliyun.com/ubuntu focal-proposed InRelease                                                                     
忽略:5 https://pkg.jenkins.io/debian-stable binary/ InRelease                                                   
命中:10 http://mirrors.aliyun.com/ubuntu focal-backports InRelease                                              
错误:11 https://pkg.jenkins.io/debian-stable binary/ ReleaseCertificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: xxx:xxx:xxx::xxx 443]
正在读取软件包列表... 完成                          
E: 仓库 “http://pkg.jenkins.io/debian-stable binary/ Release” 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。

尝试解决:

安装 https 相关包
 1. sudo apt install apt-transport-https2. sudo apt install ca-certificates3. sudo apt-get update

2. ubuntu jenkins 修改默认启动端口(8080 => 9090)

有很多博客记录修改方式是:

1. 修改 sudo vim /etc/init.d/jenkins 
# Verify that the jenkins port is not already in use, winstone does not exit
# even for BindExceptioncheck_tcp_port "http" "${HTTP_PORT}" "8080" "${HTTP_HOST}" "0.0.0.0" || return 22. 修改 sudo vim /etc/default/jenkins
# port for HTTP connector (default 8080; disable with -1)
HTTP_PORT=8080

比较尴尬,并没有生效。

=====================================================================

一样的朋友可以试下下面的方式:

1. ps -def | grep java   (查看 java 相关进程信息 )heze@heze:/etc/default$ ps -def | grep java
jenkins    91470       1 99 09:54 ?        00:00:31 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/java/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080
heze       91625   88963  0 09:54 pts/1    00:00:00 grep --color=auto java2. systemctl status jenkins (查看 jenkins 状态)heze@heze:/etc/default$ systemctl status jenkins
● jenkins.service - Jenkins Continuous Integration ServerLoaded: loaded (/lib/systemd/system/jenkins.service; enabled; vendor preset: enabled)Active: active (running) since Sun 2022-05-01 09:47:07 CST; 4min 7s agoMain PID: 90383 (java)Tasks: 49 (limit: 9341)Memory: 401.8MCGroup: /system.slice/jenkins.service└─90383 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/java/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=80803. sudo vim /lib/systemd/system/jenkins.service# Port to listen on for HTTP requests. Set to -1 to disable.
# To be able to listen on privileged ports (port numbers less than 1024),
# add the CAP_NET_BIND_SERVICE capability to the AmbientCapabilities
# directive below.
Environment="JENKINS_PORT=9090"4. sudo systemctl restart jenkinsheze@heze:/etc/default$ sudo systemctl restart jenkins
Warning: The unit file, source configuration file or drop-ins of jenkins.service changed on disk. Run 'systemctl daemon-reload' to reload units.5. systemctl daemon-reload6. sudo systemctl restart jenkins7. ps -def | grep javajenkins    91470       1 99 09:54 ?        00:00:31 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/java/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=9090
heze       91625   88963  0 09:54 pts/1    00:00:00 grep --color=auto java

3. 安装tomcat

 1. 下载 tomcat 包文件 wget http://dlcdn.apache.org/tomcat/tomcat-9/v9.0.64/src/apache-tomcat-9.0.64-src.tar.gz2. 解压文件 tar -zxvf apache-tomcat-9.0.64-src.tar.gz3. 文件夹重命名mv ./apache-tomcat-9.0.64-src ./tomcat9.0cd tomcat9.04. 编辑 ./bin 目录下 (shutdown.sh、startup.sh) 文件中最后分别加入:#tomcatexport TOMCAT=/tomcat/apache-tomcat-8.5.75export JAVA_HOME=/jdk/jdk1.8.0_291export JRE_HOME=${JAVA_HOME}/jreexport CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/libexport PATH=${JAVA_HOME}/bin:$PATH5. 启动:./startup.sh6. 关闭:./shutdown.sh7. 默认端口 8080,可以通过浏览器访问 http://127.0.0.1:80808. 修改默认端口 port="8080" 修改成你自定义端口即可vim ./tomcat9.0/conf/server.xml9. 重启后使用新端口访问

4. 安装phpstorm

1. 下载工具包文件wget  https://download.jetbrains.com.cn/webide/PhpStorm-2022.1.3.tar.gz2. 解压文件tar -zxvf PhpStorm-2022.1.3.tar3. move 文件夹到合适的位置mv ./PhpStorm-2022.1.3 /opt/phpstorm20224. 创建软连接ln -s /opt/phpstorm2022/bin/phpstorm.sh  /usr/local/bin/phpstorm6. 激活 phpstorm激活码获取:传送门(http://idea.lanyus.com)

5. phpstorm 添加桌面快捷方式

1. 查找 phpstorm.sh 的位置whereis phpstorm|grep ".sh"2. 创建快捷方式vim /usr/share/applications/phpstorm.desktop文件内容:
* 注意文件路径是否需要替换[Desktop Entry]Type=ApplicationName=PhpstormGenericName=PhpstormComment=PhpstormExec="/opt/phpstorm/bin/phpstorm.sh" %fIcon=/opt/phpstorm/bin/phpstorm.pngTerminal=phpstormCategories=phpstorm

6. …

后续问题再记录


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部