程序员

Sinopia安装部署

2020-08-04  本文已影响0人  夹胡碰

1.环境准备

Centos7
安装nodejs

以下是百度网盘下载资源 提取码 6666
node-v12.18.3-linux-x64.tar.xz

tar -xvf node-v12.18.3-linux-x64.tar.xz -C /usr/local/
vim /etc/profile
export NODE_HOME=/usr/local/node-v12.18.3-linux-x64
export PATH=$PATH:$NODE_HOME/bin
source /etc/profile
[root@bogon download]# npm -version
6.14.6
npm config set registry="https://registry.npm.taobao.org"

2. 安装Sinopia

npm install sinopia -g --no-optional --no-shrinkwrap
[root@bogon download]# npm install sinopia --no-optional --no-shrinkwrap
npm WARN deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN saveError ENOENT: no such file or directory, open '/opt/download/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/opt/download/package.json'
npm WARN download No description
npm WARN download No repository field.
npm WARN download No README data
npm WARN download No license field.

+ sinopia@1.4.0
added 170 packages from 345 contributors in 48.315s

2 packages are looking for funding
  run `npm fund` for details
sinopia
[root@bogon ~]# sinopia 
Sinopia doesn't need superuser privileges. Don't run it under root.
 warn  --- config file  - /root/.config/sinopia/config.yaml
 warn  --- http address - http://192.168.227.129:4873/
vim ~/.config/sinopia/config.yaml
# a list of other known repositories we can talk to
uplinks:
  npmjs:
    url: https://registry.npmjs.org/

packages:
  '@*/*':
    # scoped packages
    access: $all
    publish: $authenticated

  '*':
    # 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?)
    publish: $authenticated

    # if package is not available locally, proxy requests to 'npmjs' registry
    proxy: npmjs

# log settings
logs:
  - {type: stdout, format: pretty, level: http}
  #- {type: file, path: sinopia.log, level: info}
# 最后一行添加环境
listen: 192.168.227.129:4873
上一篇 下一篇

猜你喜欢

热点阅读