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/ Release
  Certificate 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-https
 2. sudo apt install ca-certificates
 3. 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 BindException
 check_tcp_port "http" "${HTTP_PORT}" "8080" "${HTTP_HOST}" "0.0.0.0" || return 2

2. 修改 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 java

2. systemctl status jenkins (查看 jenkins 状态)

heze@heze:/etc/default$ systemctl status jenkins
● jenkins.service - Jenkins Continuous Integration Server
     Loaded: loaded (/lib/systemd/system/jenkins.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2022-05-01 09:47:07 CST; 4min 7s ago
   Main PID: 90383 (java)
      Tasks: 49 (limit: 9341)
     Memory: 401.8M
     CGroup: /system.slice/jenkins.service
             └─90383 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/java/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080

3. 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 jenkins

heze@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-reload

6. sudo systemctl restart jenkins

7. 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=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.gz
 
 2. 解压文件 
	tar -zxvf apache-tomcat-9.0.64-src.tar.gz

 3. 文件夹重命名
 	mv ./apache-tomcat-9.0.64-src ./tomcat9.0
 	cd tomcat9.0
	
 4. 编辑 ./bin 目录下 (shutdown.sh、startup.sh) 文件中最后分别加入:
	#tomcat
	export TOMCAT=/tomcat/apache-tomcat-8.5.75
	export JAVA_HOME=/jdk/jdk1.8.0_291
	export JRE_HOME=${JAVA_HOME}/jre
	export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
	export PATH=${JAVA_HOME}/bin:$PATH

 5. 启动:./startup.sh

 6. 关闭:./shutdown.sh

 7. 默认端口 8080,可以通过浏览器访问 http://127.0.0.1:8080

 8. 修改默认端口 port="8080" 修改成你自定义端口即可
 	vim ./tomcat9.0/conf/server.xml

 9. 重启后使用新端口访问

4. 安装phpstorm


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

5. phpstorm 添加桌面快捷方式


 1. 查找 phpstorm.sh 的位置
	whereis phpstorm|grep ".sh"
	
 2. 创建快捷方式
	vim /usr/share/applications/phpstorm.desktop
	
文件内容:
* 注意文件路径是否需要替换

	[Desktop Entry]
	Type=Application
	Name=Phpstorm
	GenericName=Phpstorm
	Comment=Phpstorm
	Exec="/opt/phpstorm/bin/phpstorm.sh" %f
	Icon=/opt/phpstorm/bin/phpstorm.png
	Terminal=phpstorm
	Categories=phpstorm

6. …

后续问题再记录

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值