1. Download nexus:http://www.sonatype.org/nexus/go/
# wget https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.11.2-03-bundle.tar.gz
2. Decompression
#mkdir/usr/nexus
# TAR-ZXVF Nexus-2.11.2-03-bundle.tar.gz-c/usr/nexus/
#cd/usr/nexus
# ls
nexus-2.11.2-03 Sonatype-work
(A Nexus service, a private library directory)
3. Edit Nexus nexus.properties file, configure port and work directory information (leave default)
# CD NEXUS-2.11.2-03
# ls
Bin conf lib LICENSE.txt logs Nexus NOTICE.txt tmp
View directory structure, jetty run
# CD Conf
# VI Nexus.properties
# Jetty Section
application-port=8081
application-host=0.0.0.0
Nexus-webapp=${bundlebasedir}/nexus
Nexus-webapp-context-path=/nexus
# Nexus Section
nexus-work=${bundlebasedir}/. /sonatype-work/nexus
Runtime=${bundlebasedir}/nexus/web-inf
4. Edit Nexus Script, configure Run_as_user parameters
# Vi/usr/nexus/nexus-2.11.2-03/bin/nexus
#RUN_AS_USER =
Switch
Run_as_user=root
5. Open 8081 port in firewall
# Vi/etc/sysconfig/iptables
Add to:
-A input-m state--state new-m tcp-p TCP--dport 8081-j ACCEPT
Restart firewall after saving
# Service Iptables Restart
6. Start Nexus
#/usr/nexus/nexus-2.11.2-03/bin/nexus Start
****************************************
Warning-not RECOMMENDED to RUN as ROOT
****************************************
Starting Nexus OSS ...
Started Nexus OSS.
7. Open in Browser: http://192.168.1.103:8081/nexus/
8, login, click the log in the upper right corner enter the username password, the default username admin, the default password admin123:
To this, the Nexus has been installed to complete
Nexus's access rights model
Nexus is access control based on permissions, and each resource of the server has the corresponding permissions to control, so the user must have the necessary permissions to perform a specific operation. The administrator must assign permissions to the Nexus user as a role. A user can be given one or more roles, a role can contain one or more permissions, and a role can contain one or more other roles.
Three users are pre-defined on the Nexus, after logging in with admin, click the user link on the left side of the page to see the list:
Admin: The user has all of the Nexus permissions and the default password is admin123.
Deployment: The user can access the Nexus, browse the contents of the warehouse, search, upload the deployment widget, but not configure the Nexus, the default password is deployment123.
Anonymous: This user corresponds to all anonymous users who are not logged in, and they can browse and search the warehouse.
Installation of Maven Private library Nexus