Install nexus in CentOS and set it to System Service
CentOS 6.x:
1. download the latest source package from the official website. For example, nexus-2.11.4-01-bundle.tar.gz is saved in the/usr/local/directory.
2. decompress the package and create a soft link:
[Python] view plaincopy
- Tarzxvfnexus-2.11.4-01-bundle.tar.gz
- Ln-s/usr/local/nexus-2.11.4-01/usr/local/nexus
3. The nexus is started with Jetty. The default port is 8081. If a port conflict exists, edit conf/nexus. in the properties file, locate the application-port = 8081 line and change it to application-port = 9037.
4. Because I am operating the system as root, modify the bin/nexus file and find # RUN_AS_USER =. Add RUN_AS_USER = root
5. Modify bin/jsw/conf/wrapper. conf file, change the java command path, and find wrapper. java. command = java line, changed to wrapper. java. command =/usr/local/jdk/bin/java (depending on your jdk location)
6. Create a service. You can directly use the soft link:
[Python] view plaincopy
- Ln-s/usr/local/nexus/bin/nexus/etc/init. d/nexus
Now, the nexus service is made and started.