-
打开终端进入到下载目录.
-
运行命令
java -jar jenkins.war --httpPort=8080
. -
打开浏览器进入链接
http://localhost:8080
. -
按照说明完成安装.
hudson.model.UpdateCenter.xml ,修改插件下载地址
<?xml version='1.1' encoding='UTF-8'?>
<sites>
<site>
<id>default</id>
<url>http://mirror.xmission.com/jenkins/updates/update-center.json</url>
</site>
</sites>
https://blog.csdn.net/qq_26462567/article/details/100765438
修改配置文件
6.配置新增nodejs插件 (在可选插件中安装)

7.配置ssh
A为本地主机(即用于控制其他主机的机器) ;
B为远程主机(即被控制的机器Server), 假如ip为192.168.60.110;
A和B的系统都是Linux
在A上运行命令:
# ssh-keygen -t rsa (连续三次回车,即在本地生成了公钥和私钥,不设置密码)
# ssh root@192.168.60.110 “mkdir .ssh” (需要输入密码)
# scp ~/.ssh/id_rsa.pub root@192.168.60.110:.ssh/id_rsa.pub (需要输入密码)
在B上的命令:
# touch /root/.ssh/authorized_keys (如果已经存在这个文件, 跳过这条)
# cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys (将id_rsa.pub的内容追加到authorized_keys 中)
回到A机器:
# ssh root@192.168.60.110 (不需要密码, 登录成功)
a、丢弃旧的构建
2天,6个
b、选择git
配置地址,用户名密码
c、写shell脚本
source /etc/profile
cnpm install --unsafe-perm
npm run build:sit
scp -r ./dist root@10.19.106.224:/u02/webapps
// scp -P 22022 -r ./dist root@10.19.106.224:/u02/webapps 指定端口
ssh root@10.19.106.224 sh<<EOF
//ssh -p 22022 root@10.19.106.224 sh<<EOF 指定端口
source /etc/profile
/usr/local/nginx/sbin/nginx -s reload
9.linux关闭防火墙
sudo systemctl stop firewalld 临时关闭
sudo systemctl disable firewalld ,然后reboot 永久关闭
sudo systemctl status firewalld 查看防火墙状态。
完成
密码在启动日志里
将war包解压到当前文件夹
jar -xvf hello.war
将当前文件夹下所有内容打成war包
jar -cvfM0 hello.war ./
网友评论