























npm install @vue-office/docx --save
当前前后端构建环境在线上阿里云CICD主机有一套,原计划在线上CICD主机构建后推送到公司测试环境,后端Jar包有5个,每个包大约100+M,验证推送速度大约1M/s,如果采用原计划的 从阿里云CICD构建好前后端包推送 到公司测试环境,耗时久,流水线效率低。在公司内部配置一套构建环境,将构建耗时控制在5分钟内。目前对比(不对性能服务器对构建耗时影响较大,线上阿里云8C/14G前后端构建单体不超过2分钟非首次,首次一般前后端都会下载相关依赖),当前后端构建线下是4分多钟()。
构建环境:
后端:maven3.6 以上,jdk1.8
前端:node v22.20.0,pnpm10.18.3,npm 10.9.3
构建服务器:192.168.1.166
nvm环境 没有vpn 比较难从github下载数据
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
重新加载配置 source ~/.bashrc
配置NVM使用淘宝Node.js镜像 echo 'export NVM_NODEJS_ORG_MIRROR=https://npmmirror.com/mirrors/node' >> ~/.bashrc source ~/.bashrc
nvm install 22.20.0
nvm use 22.20.0
nvm alias default 22.20.0
node --version npm --version
安装pnpm 10.18.3 使用npm安装指定版本的pnpm bash
npm install -g pnpm@10.18.3
pnpm --version
配置镜像源(可选,国内用户推荐)
npm config set registry https://registry.npmmirror.com
pnpm config set registry https://registry.npmmirror.com
npm config get registry pnpm config get registry
正式前端构建命令: pnpm i pnpm run build:prod
二、后端构建 后端:maven3.6 以上,jdk1.8 本次mvn3.9版本
直接下载jdk/mvn 配置环境变量即可。
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
export NVM_NODEJS_ORG_MIRROR=https://npmmirror.com/mirrors/node
export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_381
export PATH=$JAVA_HOME/bin:$PATH
export MAVEN_HOME=/usr/local/maven/apache-maven-3.9.11
export PATH=$MAVEN_HOME/bin:$PATH
export PATH=$MAVEN_HOME/bin:$PATH
配置192.168.1.166 从 https://gitlab.ztqd.net/ 拉取及更新代码证书
登录特定拉取代码账号-编辑个人资料,ssh密码[在166 生成公钥,长短自定义]
首次拉代码
git clone -b local ssh://git@gitlab.ztqd.net:5222/juqing/juqing_tms.git
前天 还构建好好的 ,第二天上班再用 就不行了
dmesg | tail -20 [ 1848.425634] systemd[1]: systemd-logind.service: Failed to spawn 'start' task: Permission denied [ 1848.425693] systemd[1]: systemd-logind.service: Failed with result 'resources'. [ 1848.425960] systemd[1]: Failed to start systemd-logind.service - User Login Management. [ 1848.627140] systemd[1]: systemd-logind.service: Scheduled restart job, restart counter is at 4. [ 1848.639015] systemd[1]: Starting modprobe@drm.service - Load Kernel Module drm... [ 1848.644759] (modprobe)[38165]: modprobe@drm.service: Failed to connect stdout to the journal socket, ignoring: Connection refused [ 1848.651792] systemd[1]: modprobe@drm.service: Deactivated successfully. [ 1848.652691] systemd[1]: Finished modprobe@drm.service - Load Kernel Module drm. [ 1848.653845] systemd[1]: systemd-logind.service: Failed to create cgroup /system.slice/systemd-logind.service: Permission denied [ 1848.659940] systemd[1]: systemd-logind.service: Failed to spawn 'start' task: Permission denied [ 1848.659992] systemd[1]: systemd-logind.service: Failed with result 'resources'. [ 1848.660031] systemd[1]: Failed to start systemd-logind.service - User Login Management. [ 1848.874957] systemd[1]: systemd-logind.service: Scheduled restart job, restart counter is at 5. [ 1848.886522] systemd[1]: Starting modprobe@drm.service - Load Kernel Module drm... [ 1848.898381] (modprobe)[38166]: modprobe@drm.service: Failed to connect stdout to the journal socket, ignoring: Connection refused [ 1848.909022] systemd[1]: modprobe@drm.service: Deactivated successfully. [ 1848.909971] systemd[1]: Finished modprobe@drm.service - Load Kernel Module drm. [ 1848.910643] systemd[1]: systemd-logind.service: Start request repeated too quickly. [ 1848.910650] systemd[1]: systemd-logind.service: Failed with result 'resources'. [ 1848.910694] systemd[1]: Failed to start systemd-logind.service - User Login Management.
sudo journalctl --output=short > /tmp/full_journal_log.txt
sudo journalctl --output=verbose > /tmp/full_journal_verbose.txt
系统负载奇怪 飙到100%
重新安装ubuntu24, 配置ssh 只允许特定用户从特定 IP 登录。
AllowUsers root@192.168.1.250 root@192.168.1.200
finalshell 登录文件查看及上传 可能的 ssh 配置 行
Subsystem sftp internal-sftp
加白名单及添加pub公钥
centos8 放行redis mysql
sudo firewall-cmd --add-port=6379/tcp --permanent
sudo firewall-cmd --add-port=3306/tcp --permanent
sudo firewall-cmd --reload
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。