- 1 description
- 2 Installation Steps
- 2.1
- 2.2 Maven Installation Steps
- 2.2.1 Unpacking the MAVEN installation package
- 2.2.2 Configuring environment variables
- 2.3 Sonatype Nexus Installation Steps
1 description
Environment: Redhat Enterprise Linux server5.3-x64.
Version: Maven 3.0.5, Nexus-2.5.1-bundle.
2 Installation Steps 2.1
Maven:
Http://mirrors.cnnic.cn/apache/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
Nexus:
http://www.sonatype.org/nexus/archived_version?id=38
2.2 Maven Installation Steps 2.2.1 Unpacking the MAVEN installation package
1. Transfer the downloaded apache-maven-3.0.5-bin.tar.gz package to the server using the FTP tool.
2. Unzip the installation package
Decompression command:
?
1 |
tar -zvxf apache-maven-3.0.5-bin. tar .gz |
Move to the/usr/local:
?
1 |
mv apache-maven-3.0.5 /usr/local |
MAVEN is installed under the/usr/local directory.
2.2.2 Configuring environment variables
1. Edit the/etc/profile and add the following at the end:
Edit command:
?
Insert: Press I
In the last line join:
?
123 |
export MAVEN_HOME= /usr/local/apache-maven-3 .0.5 export PATH=$PATH:$MAVEN_HOME /bin |
Press ESC, enter: X to exit the save.
Let the system re-execute the next/etc/profile, command:
?
2. Verify that the installation is successful
?
2.3 Sonatype Nexus Installation Steps
1. Transfer the downloaded nexus-2.5.1-bundle.tar.gz package to the server using the FTP tool.
2. Unzip the installation package
Decompression command:
?
1 |
tar -zvxf nexus-2.5.1-bundle. tar .gz |
Move to the/usr/local:
?
12345 |
sudo cp nexus-2.5-01-bundle. tar .gz /usr/local cd /usr/local ls -n nexus-2.5-01 nexus |
The Nexus is installed in the /usr/local directory.
You can edit $NEXUS _home/conf/nexus.properties Custom settings parameters, including port numbers, and so on.
Depending on your system platform, you can start the Nexus and start the command:
?
(if you are logged in with the root account, you need to set up run_as_user=root, you can also add a Nexus user to manage the Nexus specifically, you need to note that this account has access to the Nexus)
2. Set up the Nexus for Linux system service and boot automatically
1. Copy $nexus_home/bin/jsw/linux-x86-64/nexus to/etc/init.d/nexus
2. Grant the Nexus script permission to execute:
?
1 |
chmod 755 /etc/init .d /nexus |
3. Modify the Nexus file to configure the following parameters:
A) Modify the Nexus_home absolute path, such as: Nexus_home= "/usr/local/nexus"
b) Set Run_as_user=nexus, or all other users, provided that this user is created.
?
1234567891011 |
NEXUS_HOME=
/usr/local/nexus
PLATFORM=linux-x86-64
PLATFORM_DIR=
"${NEXUS_HOME}/bin/jsw/${PLATFORM}"
WRAPPER_CMD=
"${PLATFORM_DIR}/wrapper"
WRAPPER_CONF=
"${PLATFORM_DIR}/../conf/wrapper.conf"
PIDDIR=
"${NEXUS_HOME}"
|
4. Red Hat, Fedora, CentOS add Nexus Service:
?
123456789 |
cd /etc/init .d chkconfig--add Nexus chkconfig--levels 345 nexus on      service Nexus start      tail -f /usr/local/nexus/logs/wrapper .log |
Ubuntu and Debian add Nexus Service
?
123456789 |
cd /etc/init .d update-rc.d Nexus defaults chkconfig--levels 345 nexus on      service Nexus start tail -f /usr/local/nexus/logs/wrapper .log |
After the configuration is complete, you can access: Http://localhost:8081/nexus (localhost for your server address), enter the system to set up
Default Admin Account: admin Password: admin123
You can manage your warehouse when you enter.
Linux installs Maven and Nexus Agent repositories