环境说明
服务 | ip | 端口 | 备注 |
nexus | 192.168.80.129 (内网) | 8081 | 内网地址无法访问外网 |
nginx |
192.168.80.128 (内网) 192.168.174.126 (外网) |
代理端口 88 | 192.168.174.126 地址可以访问外网 |
创建 Blob Stores
创建 Repositories
设置 proxy
repo 测试
安装 cnpm
# npm install -g cnpm --registry=http://192.168.80.129:8081/repository/npm-aliyun-repo/
added 1 package in 20s
59 packages are looking for funding
run `npm fund` for details
查看 cnpm 版本信息
# cnpm version
[email protected] (/usr/local/node-v20.11.1-linux-x64/lib/node_modules/cnpm/lib/parse_argv.js)
[email protected] (/usr/local/node-v20.11.1-linux-x64/lib/node_modules/cnpm/node_modules/npm/index.js)
[email protected] (/usr/local/node-v20.11.1-linux-x64/bin/node)
[email protected] (/usr/local/node-v20.11.1-linux-x64/lib/node_modules/cnpm/node_modules/npminstall/lib/index.js)
prefix=/usr/local/node-v20.11.1-linux-x64
linux x64 6.5.0-14-generic
registry=https://registry.npmmirror.com
查看
参考文档
https://help.sonatype.com/en/npm-registry.html#/
标签:npm,node,v20.11,cnpm,nexus,代理,x64,linux From: https://www.cnblogs.com/wangguishe/p/18096528