Install and configure JDK, Tomcat, and SVN servers in Ubuntu

Source: Internet
Author: User

Install and configure JDK, Tomcat, and SVN servers in Ubuntu

Abstract: This article describes how to install and configure jdk, tomcat, and svn servers in ubuntu.

Environment: VMware + Ubuntu14.04

1. Configure jdk

1. Download JDK

Http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html

Note: I directly copy the file to the ubuntu Desktop Folder in windows and use VMtool;

2. Configure the Directory

Note: It is best to operate as a root user.

Create a new directory first:

cd usrmkdir javacd javamkdir jdk

Copy the jdk tar file to the directory above:

cp  jdk-8u65-linux-x64.gz  usr/java/jdk

Run again

tar -zxvf jdk-8u65-linux-x64.gz 

The result is as follows:

3. Configure Environment Variables

Input:

 vi /etc/profile

Or

gedit   /etc/profile

Add the following content:

#set java environmentexport JAVA_HOME=/usr/java/jdk/jdk1.8.0_65export JRE_HOME=/usr/java/jdk/jdk1.8.0_65/jreexport CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATHexport PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$JAVA_HOME:$PATH
Note that the jdk directory should be changed to the corresponding directory and the root user should be used for modification. Otherwise, the directory cannot be saved.

Save and run:

source /etc/profile
Verify installation:

Input:

java -version
The following is displayed, indicating that the installation is successful.

2. Configure Tomcat

1. Download

Http://tomcat.apache.org/

2. Installation

Here, I put the downloaded package in/usr/java/tomcat.

Run

 cp apache-tomcat-7.0.67.tar.gz /usr/java/tomcat/
Decompress the package
tar -zxvf apache-tomcat-7.0.67.tar.gz 

The above is the decompressed result.

3. Configure the environment

Go to the bin folder of tomcat above:

Open

vi setclasspath.sh
Or
gedit setclasspath.sh
Add the following content:
export JAVA_HOME=/usr/java/jdk/jdk1.8.0_65 export JRE_HOME=/usr/java/jdk/jdk1.8.0_65/jre 
Save it.

Then return to the bin directory:

Run:

 ./startup.sh
Open your browser and enter:

Http: // localhost: 8080/. The following message is displayed, indicating that the installation is successful.


Iii. SVN Configuration

1. Installation

sudo apt-get install subversion
2. Find a directory as the SVN root directory.
I chose/data/svn, and the following commands also followed this directory. Please modify your own options and use mkdri to create a directory.

3. Create a database

 svnadmin create /data/svn/lin
4. Next, modify the three files under/data/svn/lin/conf/, which are svnserve. conf, passwd, and authz in sequence. The three roles are: Master configuration file, password configuration file, and permission configuration file.
5. Edit the vi/data/svn/lin/conf/svnserve. conf file.
Find the following items and modify them according to the following settings. Remove the preceding comments. Each line cannot start with a space.
6. Edit the vi/data/svn/lin/conf/passwd file.

The format is simple. The user name and password are saved in plaintext by default.
7. Edit the vi/data/svn/lin/conf/authz file.

8. Start the service

svnserve -d -r /data/svn
The-d parameter indicates that the process is started in daemon mode, and the-r parameter indicates the root directory of the code repository. If the startup succeeds, you can view the process through ps aux | grep svnserve, so far, a simple SVN service has been set up.

9. Next, perform the test and verification. Find a directory on the client and execute the command: (1) (2) the IP address here is the ubuntu address. You can use ifconfig

(3)

Enter the user name and password:

The result is as follows. I have put some items in the warehouse, so I won't talk about other operations.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.