This tutorial applies to centos
Check nodejs before installation. If nodejs is not installed, follow the steps below to install
$ su - $ yum install openssl-devel$ cd /usr/local/src$ wget http://nodejs.org/dist/v0.10.29/node-v0.10.29.tar.gz$ tar zxvf node-v0.10.29.tar.gz$ cd node-v0.10.29$ ./configure$ make$ make install
Check the version number to see if the installation is successful:
$ node -vv0.10.29
Check git
If not, follow these steps to install
$ sudo yum -y install git
Start to install the bower private library step 1 install git and git-deamon
$ sudo yum install -y git git-daemon
Step 2 install private-Bower
$ sudo npm install -g private-bower
Step 3 set private-Bower
$ sudo su -$ cd /data$ mkdir private-bower$ vim /data/private-bower-config.json
Paste the following content:
{ "port": 5678, "registryFile": "./private-bower/bowerRepository.json", "disablePublic": false, "publicRegistry": "http://bower.herokuapp.com/packages/", "repositoryCache": { "git": { "enabled": true, "cacheDirectory": "./private-bower/gitRepoCache", "host": "localhost", "port": 6789 }, "svn": { "enabled": true, "cacheDirectory": "./private-bower/svnRepoCache", "host": "localhost", "port": 7891 } }, "log4js" : { "enabled": true, "configPath" : "./private-bower/log4js.conf.json" }}
$ vim /data/private-bower/log4js.conf.json
{ "appenders": [ { "type": "dateFile", "filename": "./private-bower/private-bower.log", "pattern": "-yyyy-MM-dd", "alwaysIncludePattern": false }, { "type": "console" } ], "replaceConsole": true}
Start private-Bower
$ sudo su -$ cd /data$ private-bower --config ./private-bower-config.json[2014-06-30 10:00:22.481] [INFO] console - [bower] Refreshing public packages...[2014-06-30 10:00:22.512] [INFO] console - [bower] Bower server started on port 5678[2014-06-30 10:00:22.538] [INFO] console - [bower] Starting git cache server[2014-06-30 10:00:22.543] [INFO] console - [bower] Starting svn cache server[2014-06-30 10:01:09.167] [INFO] console - [bower] Loaded public packages
Make sure that private-Bower is started properly:
Open a new window to access:
$ lynx http://localhost:5678/
Will display:
Fork me on GitHub
Private Bower
____________________
Docs public packages
Private bower service is down
No private packages registered read docs about how to register packages.
Loading packages...
{Package. name }}
Hits: {package. Hits }}
{Package. Repo }}
Created
Barnatoth
Barna Tóth
If so, the installation is complete.
Client Test
$ sudo su -$ npm install -g bower$ su - wlsuser$ bower help$ vim .bowerrc{ "registry": "http://<your private repository ip>:5678" }$ cd <testdir>$ bower install jquery