centos6.5 64位下安装私有npm

搭建自己的私有npm库

1.安装Couchdb

[[email protected]_private ~]# yum install wget
[[email protected]_private ~]# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
[[email protected]_private ~]# rpm -ivh --test epel-release-6-8.noarch.rpm
[[email protected]_private ~]# rpm -ivh epel-release-6-8.noarch.rpm
[[email protected]_private ~]# yum --enablerepo=epel info couchdb
[[email protected]_private ~]# yum install couchdb
[[email protected]_private ~]# vi /etc/couchdb/local.ini
    [httpd]
    port = 5984
    bind_address = 127.0.0.1 (改为自己的IP地址)
[[email protected]_private ~]#  /etc/init.d/couchdb start
[[email protected]_private ~]# /etc/init.d/couchdb status
couchdb (pid  1329) 正在运行...
[[email protected]_private ~]# service iptables stop

2.Couchdb追加用户

打开管理画面:http://your-ip-address:5984/_utils/
点击画面右下角的“Fix this”,创建用户。admin/admin

3.创建npm数据库

[[email protected]_private ~]# curl -X PUT http://admin:[email protected]:5984/registry
{“ok”:true}

4.配置npm用数据库

[[email protected]_private ~]# vi /etc/couchdb/local.ini
[couch_httpd_auth]
public_fields = appdotnet, avatar, avatarMedium, avatarLarge, date, email, fields, freenode, fullname, github, homepage, name, roles, twitter, type, _id, _rev
users_db_public = true

[httpd]
secure_rewrites = false

[couchdb]
delayed_commits = false

5.安装git和node

[[email protected]_private ~]# yum install git
[[email protected]_private ~]# yum installl npm
[[email protected]_private ~]# rpm --import https://fedoraproject.org/static/0608B895.txt
[[email protected]_private ~]# rpm -Uvh http://download-i2.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
[[email protected]_private ~]# yum install nodejs npm --enablerepo=epel

6.安装 npm-registry-couchapp

[[email protected]_private ~]# git clone git://github.com/npm/npm-registry-couchapp
[[email protected]_private ~]# cd npm-registry-couchapp/
[[email protected]_private npm-registry-couchapp]# npm install
[[email protected]_private npm-registry-couchapp]# npm start --npm-registry-couchapp:couch=http://admin:[email protected]:5984/registry
[[email protected]_private npm-registry-couchapp]# npm run load --npm-registry-couchapp:couch=http://admin:[email protected]:5984/registry

7.同步官方npm库

[[email protected]_private npm-registry-couchapp]# curl -X POST http://admin:[email protected]:5984/_replicate -d ‘{"source":"http://isaacs.iriscouch.com/registry/", "target":"registry", "create_target":true}‘ -H "Content-Type: application/json"

8.在本地定义.npmrc

loglevel = "info"
always-auth = true
registry = http://admin:[email protected]:5984/registry/_design/scratch/_rewrite

9. 在本地发布私有npm包

http://oschina.net/shanhe/blog/280441

centos6.5 64位下安装私有npm

时间: 2024-11-08 18:16:56

centos6.5 64位下安装私有npm的相关文章

centos6.4 64位下安装nfs文件共享系统

不知道谁装的服务器,默认自带,以下内容摘自互联网,配置部分按教程执行成功 一.环境介绍: 服务器:centos 192.168.1.225 客户端:centos 192.168.1.226 二.安装: NFS的安装配置: centos 5 : yum -y install nfs-utils portmap centos 6(在CentOS 6.3当中,portmap服务由rpcbind负责) : yum -y install nfs-utils rpcbind 三.服务器端配置: 1.创建共享

linux(centos6.8 64位)下安装mysql5.7(yum方式)

下载mysql源安装包 # wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm 安装mysql源包 #yum localinstall mysql57-community-release-el7-8.noarch.rpm 检查mysql源是否安装成功 # yum repolist enabled | grep "mysql.*-community.*" 看到下图(三个)表示成功: mysql-

CentOS6.4 64位下安装sphinx及sphinx for php扩展

在官方网站下载最新的sphinx,最近数据库要被搜索给玩死了,想想还是加个索引吧.这儿分享一下sphinx的安装及php扩展sphinx.so的安装方法,可能网上有很多相似的教程. 安装前请确定你安装了一些常用的东东,比如gcc mysql-devel之类的!当然,不装它也会提示你一些错误的,看着来吧!下面进入正题 //这句话信息量很大的,下面是需要安装的常用扩展 sphinx官网:http://sphinxsearch.com/downloads/release/ 请使用稳定版,线上机器就别玩

centos6.6 64位下安装nfs文件共享系统

一.环境介绍: 服务器:centos 192.168.1.1 客户端:centos 192.168.1.22 二.安装: nfs的安装配置: centos 5 : yum -y install nfs-utils portmap centos 6(在CentOS 6.3当中,portmap服务由rpcbind负责) : yum -y install nfs-utils rpcbind 三.服务器端配置: 1.创建共享目录: [[email protected] /]# mkdir /usr/lo

Hadoop 2.2.0 在CentOS6.2 64位下的编译

最近在学习搭建Hadoop,直接从Apache官方网站直接下载最新版本Hadoop2.2,结果运行时发现提示 “libhadoop.so.1.0.0 which might have disabled stack guard” 的警告.Google了一下发现是因为 hadoop 2.2.0提供的是libhadoop.so库是32位的,而我们的机器是64位. 所以需要重新在64位的机器上编译hadoop. 1.安装JDK 下载JDK1.7的Linux 64位版本jdk-7u15-linux-x64

ubuntu 64位下安装wps

首先,去官网下载wps.地址:http://community.wps.cn/download/ 然后切换到下载目录,执行如下命令: $ sudo apt-get install ia32-libs* 然后执行安装命令: $ sudo dpkg -i --force-architecture wps-office_8.1.0.3724~b1p2_i386.deb 会报如下错误: Selecting previously unselected package wps-office. (Readin

windows7旗舰版64位下安装、破解及运行QTP11报错

说明:如果你出现了以下几种情况,希望能解决你的问题:如果没有,就当路过. 1.安装qtp11时报vc++ 2005缺少,但怎么也不能成功安装 解决方法: 1.找到qtp安装包里面的vc++ 2005组件 QuickTest\CHS\prerequisites\vc2005_sp1_redist. 2.运行vcredist_x86.exe文件,如果安装失败,修改后缀名为压缩文件,如:zip.rar,解压文件后重新运行解压后的文件. 2.网上介绍用mgn-mqt82.exe的方法破解qtp11失败

win7 64位下安装hadoop的eclipse插件并编写运行WordCount程序

win7 64位下安装hadoop的eclipse插件并编写运行WordCount程序 环境: win7 64位 hadoop-2.6.0 步骤: 1.下载hadoop-eclipse-plugin-2.6.0.jar包 2.把hadoop-eclipse-plugin-2.6.0.jar放到eclipse安装目录下的plugins目录下 3.打开eclipse发现左边多出来一个DFS Locations 4.在win7上解压hadoop-2.6.0. 5.下载hadoop.dll.winuti

吐血贡献——centos6.5 64位静默安装oracle 10G R2

操作系统:CentOS release 6.5 (Final) 64位 oracle版本:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit 一.下载必须安装包: # yum -y install binutils compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc g