前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Sinopia安装部署

Sinopia安装部署

作者头像
夹胡碰
发布2020-08-14 16:35:24
8480
发布2020-08-14 16:35:24
举报
文章被收录于专栏:程序猿~

1.环境准备

Centos7
安装nodejs

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

  • 解压
代码语言:javascript
复制
tar -xvf node-v12.18.3-linux-x64.tar.xz -C /usr/local/
  • 配置环境变量
代码语言:javascript
复制
vim /etc/profile
代码语言:javascript
复制
export NODE_HOME=/usr/local/node-v12.18.3-linux-x64
export PATH=$PATH:$NODE_HOME/bin
代码语言:javascript
复制
source /etc/profile
  • 查看版本信息 出现版本号表示安装成功
代码语言:javascript
复制
[root@bogon download]# npm -version
6.14.6
  • 设置淘宝国内镜像
代码语言:javascript
复制
npm config set registry="https://registry.npm.taobao.org"

2. 安装Sinopia

  • 安装
代码语言:javascript
复制
npm install sinopia -g --no-optional --no-shrinkwrap
代码语言:javascript
复制
[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
  • 启动
代码语言:javascript
复制
sinopia
代码语言:javascript
复制
[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/
  • 修改配置文件
代码语言:javascript
复制
vim ~/.config/sinopia/config.yaml
  • 最后一行添加 listen: 192.168.227.129:4873 保证共享访问
代码语言:javascript
复制
# 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
  • UI界面
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1.环境准备
    • Centos7
      • 安装nodejs
      • 2. 安装Sinopia
      领券
      问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档