Ubuntu download and install j2ee development environment steps

  
                

In order to develop J2ee, you need to build the j2ee development environment first. This article will give a detailed introduction to the Ubuntu system installation and build J2EE development environment. Interested friends can come and understand.

First, download

1.jdk

2.tomcat

3.mysql

4.mysql workbench < Br>

5.eclipse javaee

Second, install &&configure environment variables

1.jdk 7

Extract tar -xvf jdk-7u25-linux -x64.tar.gz

Move to /opt/directory sudo mv jdk1.7.0_25//opt/

Configure environment variables

PATH=“/usr /local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/jdk1.7.0_25/bin”

CLASS_PATH=“/opt/jdk1.7.0_25/lib”

JAVA_HOME=“/opt/jdk1.7.0_25”

Execute java, javac command:

sudo update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_25/bin/java 300

sudo update-alternatives --install /usr/bin/Javac javac /opt/jdk1.7.0_25/bin/javac 300

Select the default version:

sudo update-alternatives --config java

Tests are normal:

java java -version javac

2.tomcat

tomcat is easier to install, unzip, move to opt, tomcat/bin/has a startup and shutdown script, run it.

Note the permissions issue.

3.mysql 5.6

Install the tarball mysql-5.6.13-linux-glibc2.5-x86_64.tar.gz

Unzip tar -zxvf mysql-5.6. 13-linux-glibc2.5-x86_64.tar.gz

Rename mv mysql-5.6.13-linux-glibc2.5-x86_64 mysql5.6

Transfer sudo mv mysql5.6 /opt/

Enter mysql folder cd mysql5.6/

Add mysql user group and user:

sudo groupadd mysql

sudo useradd -r -g mysql mysql

Change the user and user group to which the mysql5.6 folder belongs:

sudo chown -R mysql .

sudo chgrp -R mysql .

Execute the installation script:

sudo scripts/mysql_install_db --user=mysql

Error: Installing MySQL system tables. . ./bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

Need to install libaio.so.1, execute:

sudo apt-get install libaio-dev

After installing libaio, run the mysql installation script to install successfully

Change the permissions back, only keep the data directory as mysql user

sudo chown -R root .

sudo chown -R mysql data

Copy the mysql configuration file to the etc directory (global configuration)

sudo cp support-files/my-default.cnf /etc /my.cnf

Start mysql in Mysql5.6 directory:

/opt/mysql5.6$ sudo bin/mysqld_safe --user=mysql&

Initialize mysql Password:

sudo bin/mysqladmin -u root password ‘111111’

Modify the basepath of mysql.server

vim support-files/mysql.server is the current directory The default path of the file is: /usr/local/mysql. Lazy students can copy to this directory from the beginning,
Previous12Next page Total 2 pages

Copyright © Windows knowledge All Rights Reserved