Download and install
- In the official website to download Nexus Repository Manager OSS 3.x , unzip to any location.
-
Administrators run powershell, switch to the nexus-3.13.0-01 / bin directory
$
./nexus.exe /install
After installation, you will be prompted successInstalled service 'nexus
$
./nexus.exe /run
Run the service, the first minor to wait for a long time -
After waiting for boot up, enter
http://127.0.0.1:8081
, click on the upper right corner ofSign In
the landing, the default account: admin password: admin123
Add npm warehouse
The following input Name are modified according to their needs
- Click on the left menu
Repositories
, then clickCreate repository
the button. - Select
npm(proxy)
, enter Name: npm-proxy, remote storage fill https://registry.npm.taobao.org or https://registry.npmjs.org for packet case the address request to the address proxy. - Click again
Create repository
button to add npm (hossted) Enter Name:. Npm-xueyou used to store their own private package - Click again
Create repository
button to add npm (group) Enter Name:. Npm-all, before the addition of the following Member repositories in the right choice of two move
Configuration and verification npm warehouse
- $
npm config set registry http://localhost:8081/repository/npm-all/
Url url here have acquired the right warehouse in npm-all - Not enter a directory, initialize Package Penalty for,
npm init -y
,npm --loglevel info install grunt
to see if an address from its own warehouses pull package - Set permissions, Realms menu, add npm Bearer Token Realm to the right
- Add users, then
npm login –registry=http://192.168.0.102:8081/repository/npm-all/
landing, need to fill out the account, password and email - Log
npm login --registry=http://192.168.0.102:8081/repository/npm-all/
enter just the new user's password and user and mailbox
Post your own package
To ensure the release of the module with the file directory has package.json
- Add user
npm adduser -registry http://192.168.0.102:8081/repository/npm-xueyou/
- Release package, npm publish -registry http://192.168.0.102:8081/repository/npm-xueyou/
- Modify package.json added
"publishConfig": { "registry": "http://192.168.0.102:8081/repository/npm-xueyou/" }
, so directlynpm publish
on the release of
Nexus enable Boot
nexus/bin
Directory to the environment variable- New
nexus-start.bat
inputnexus.exe /run
save - win + r input
shell:startup
to openC:\Users\tangdekun\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
the directory, the file into