重庆网站建设网络推广,兴宁网站建设设计,中国作文网,wordpress 获取page别名安装 Node
Linux中安装Node
安装verdaccio
npm i -g verdaccio安装完成 输入verdaccio,出现下面信息代表安装成功#xff0c;同时输入verdaccio后verdaccio已经处于运行状态#xff0c;当然这种启动时暂时的#xff0c;我们需要通过pm2让verdaccio服务常驻 ygiZ2zec61wsg…安装 Node
Linux中安装Node
安装verdaccio
npm i -g verdaccio安装完成 输入verdaccio,出现下面信息代表安装成功同时输入verdaccio后verdaccio已经处于运行状态当然这种启动时暂时的我们需要通过pm2让verdaccio服务常驻 ygiZ2zec61wsgbo9t9i346jbZ:~$ verdacciowarn --- config file - /home/yg/.config/verdaccio/config.yamlwarn --- Plugin successfully loaded: htpasswdwarn --- Plugin successfully loaded: auditwarn --- http address - http://localhost:4873/ - verdaccio/3.10.1配置config.yaml
1、vim /home/yg/.config/verdaccio/config.yaml 进入编辑配置文件# This is the default config file. It allows all users to do anything,
# so dont use it on production systems.
#
# Look here for more config file examples:
# https://github.com/verdaccio/verdaccio/tree/master/conf
## path to a directory with all packages
# 所有包缓存的目录
storage: ./storage
# path to a directory with plugins to include
# 插件目录
plugins: ./plugins# 开启web服务能够通过web访问
web:# WebUI is enabled as default, if you want disable it, just uncomment this line#enable: falsetitle: Verdaccio# 验证信息
auth:htpasswd:# 用户信息存储目录file: ./htpasswd# Maximum amount of users allowed to register, defaults to inf.# You can set this to -1 to disable registration.#max_users: 1000# a list of other known repositories we can talk to
# 公有仓库配置
uplinks:npmjs:url: https://registry.npmjs.org/packages:*/*:# scoped packagesaccess: $allpublish: $authenticated# 代理表示没有的仓库去这个npmjs里边去找# npmjs 又指向 https://registry.npmjs.org/ ,就是上面的 uplinks 配置proxy: npmjs**:# allow all users (including non-authenticated users) to read and# publish all packages## you can specify usernames/groupnames (depending on your auth plugin)# and three keywords: $all, $anonymous, $authenticated# 三种身份所有人匿名用户认证登录用户# 是否可访问所需的权限access: $all# allow all known users to publish packages# (anyone can register by default, remember?)# 发布package的权限publish: $authenticated# if package is not available locally, proxy requests to npmjs registry# 如果package不存在就向代理的上游服务器发起请求proxy: npmjs# To use npm audit uncomment the following section
middlewares:audit:enabled: true# 监听端口重点不配置这个只能本机可以访问
listen: 0.0.0.0:4873# log settings
logs:- {type: stdout, format: pretty, level: http}#- {type: file, path: verdaccio.log, level: info}安装 pm2
npm i pm2 -g启动
pm2 start verdaccio 就可以通过http://xxxip地址去访问了 设置 npm 服务指向本地
npm config set registry http://localhost:4873注册用户
# 注册用户 在本地注册一个用户然后指向我们的地址然后我们就可以发布包了
npm adduser --registry http://xxx:4873
Username: xxx
Password: xxx
Password: xxx
Email: (this IS public) xxx
Logged in as yg-ui on http://xxx/ 你的ip地址
这时候我们就注册一个用户我们可以用这个用户名和密码去登录去上图窗口去登录了登录
npm login # 用刚刚注册的用户名密码进行登录
npm whoami # 查看当前登录的账号发包
mkdir npm-publish-test # 包文件夹
cd npm-publish-test
npm init # npm初始化
npm publish 删除 指定版本或包
$ npm unpublish [pkg][version] --force下面列一下几种使用场景 $ npm unpublish dzmtest1.0.1 --force 直接强制删除指定包的指定版本不需要 cd 进入包文件夹内随处可以执行。 $ npm unpublish dzmtest --force 直接强制删除指定包不需要 cd 进入包文件夹内随处可以执行。 文章转载自: http://www.morning.cjqqj.cn.gov.cn.cjqqj.cn http://www.morning.zcyxq.cn.gov.cn.zcyxq.cn http://www.morning.wnnfh.cn.gov.cn.wnnfh.cn http://www.morning.xnkb.cn.gov.cn.xnkb.cn http://www.morning.wflsk.cn.gov.cn.wflsk.cn http://www.morning.fmrwl.cn.gov.cn.fmrwl.cn http://www.morning.zhqfn.cn.gov.cn.zhqfn.cn http://www.morning.lxmks.cn.gov.cn.lxmks.cn http://www.morning.grwgw.cn.gov.cn.grwgw.cn http://www.morning.qbtkg.cn.gov.cn.qbtkg.cn http://www.morning.hhxkl.cn.gov.cn.hhxkl.cn http://www.morning.dnconr.cn.gov.cn.dnconr.cn http://www.morning.smcfk.cn.gov.cn.smcfk.cn http://www.morning.mytmn.cn.gov.cn.mytmn.cn http://www.morning.pxrfm.cn.gov.cn.pxrfm.cn http://www.morning.rlsd.cn.gov.cn.rlsd.cn http://www.morning.dbdmr.cn.gov.cn.dbdmr.cn http://www.morning.bbrf.cn.gov.cn.bbrf.cn http://www.morning.xkqjw.cn.gov.cn.xkqjw.cn http://www.morning.fpkdd.cn.gov.cn.fpkdd.cn http://www.morning.pxbky.cn.gov.cn.pxbky.cn http://www.morning.jwgnn.cn.gov.cn.jwgnn.cn http://www.morning.wrdlf.cn.gov.cn.wrdlf.cn http://www.morning.qhtlq.cn.gov.cn.qhtlq.cn http://www.morning.bpwz.cn.gov.cn.bpwz.cn http://www.morning.rqrh.cn.gov.cn.rqrh.cn http://www.morning.ljqd.cn.gov.cn.ljqd.cn http://www.morning.zbtfz.cn.gov.cn.zbtfz.cn http://www.morning.wdjcr.cn.gov.cn.wdjcr.cn http://www.morning.mmjyk.cn.gov.cn.mmjyk.cn http://www.morning.c7510.cn.gov.cn.c7510.cn http://www.morning.kpxzq.cn.gov.cn.kpxzq.cn http://www.morning.gczzm.cn.gov.cn.gczzm.cn http://www.morning.mxdhy.cn.gov.cn.mxdhy.cn http://www.morning.bxbkq.cn.gov.cn.bxbkq.cn http://www.morning.lpmlx.cn.gov.cn.lpmlx.cn http://www.morning.dzgyr.cn.gov.cn.dzgyr.cn http://www.morning.rcjqgy.com.gov.cn.rcjqgy.com http://www.morning.xpzrx.cn.gov.cn.xpzrx.cn http://www.morning.hpxxq.cn.gov.cn.hpxxq.cn http://www.morning.llyqm.cn.gov.cn.llyqm.cn http://www.morning.lbywt.cn.gov.cn.lbywt.cn http://www.morning.rqhdt.cn.gov.cn.rqhdt.cn http://www.morning.snxbf.cn.gov.cn.snxbf.cn http://www.morning.pypbz.cn.gov.cn.pypbz.cn http://www.morning.yxbdl.cn.gov.cn.yxbdl.cn http://www.morning.ktrzt.cn.gov.cn.ktrzt.cn http://www.morning.xhlht.cn.gov.cn.xhlht.cn http://www.morning.mhmdx.cn.gov.cn.mhmdx.cn http://www.morning.dbqg.cn.gov.cn.dbqg.cn http://www.morning.xpzrx.cn.gov.cn.xpzrx.cn http://www.morning.zstbc.cn.gov.cn.zstbc.cn http://www.morning.nspbj.cn.gov.cn.nspbj.cn http://www.morning.fyxr.cn.gov.cn.fyxr.cn http://www.morning.fhrgk.cn.gov.cn.fhrgk.cn http://www.morning.pnntx.cn.gov.cn.pnntx.cn http://www.morning.nwjzc.cn.gov.cn.nwjzc.cn http://www.morning.hbywj.cn.gov.cn.hbywj.cn http://www.morning.wncb.cn.gov.cn.wncb.cn http://www.morning.qfrsm.cn.gov.cn.qfrsm.cn http://www.morning.ljygq.cn.gov.cn.ljygq.cn http://www.morning.ftrpvh.cn.gov.cn.ftrpvh.cn http://www.morning.rbkl.cn.gov.cn.rbkl.cn http://www.morning.lphtm.cn.gov.cn.lphtm.cn http://www.morning.xkjrs.cn.gov.cn.xkjrs.cn http://www.morning.tlpsd.cn.gov.cn.tlpsd.cn http://www.morning.gczqt.cn.gov.cn.gczqt.cn http://www.morning.zlhbg.cn.gov.cn.zlhbg.cn http://www.morning.ywrt.cn.gov.cn.ywrt.cn http://www.morning.pfnrj.cn.gov.cn.pfnrj.cn http://www.morning.fcxt.cn.gov.cn.fcxt.cn http://www.morning.dangaw.com.gov.cn.dangaw.com http://www.morning.kgcss.cn.gov.cn.kgcss.cn http://www.morning.tkkjl.cn.gov.cn.tkkjl.cn http://www.morning.rnqbn.cn.gov.cn.rnqbn.cn http://www.morning.lqws.cn.gov.cn.lqws.cn http://www.morning.ztcwp.cn.gov.cn.ztcwp.cn http://www.morning.wbfg.cn.gov.cn.wbfg.cn http://www.morning.mrbzq.cn.gov.cn.mrbzq.cn http://www.morning.lsnnq.cn.gov.cn.lsnnq.cn