Win7 + Ubuntu 14.04 +tomcat + MySQL build test environment manual

Source: Internet
Author: User
Tags administrator password nameserver tomcat server

One, Win7 under do install Ubuntu
    1. Download ununtu14.04 and EASYBCD software
    2. Win7 to free up a disk to install Ubuntu. I formatted the F-disk and then went back to the desktop, right-click on computer---------------------------
    3. Open EASYBCD and follow the instructions shown

  4. Click on the configuration will appear a Menu.lst file, the following English copy in, the original full cover out

Title Install Ubuntu

Root (hd0,0)

Kernel (hd0,0)/vmlinuz boot=casper iso-scan/filename=/ubuntu-14.04.3-desktop-i386.iso ro quiet splash locale=zh_cn. UTF-8

INITRD (hd0,0)/initrd.lz

Note: Ubuntu-14.04.3-desktop-i386.iso is the name of our Ubuntu installer package

  5. Unzip the Ubuntu image file, locate the Casper folder, unzip the Initrd.lz and Vmlinuz into the C drive, and unzip the. Disk folder to the C drive, then copy the entire ISO file to the C drive.

  6. Restart you will see that there are 2 boot menus for you to select the option we choose Neogrub boot loader.

7. Follow the steps above to see the Ubuntu interface. As shown

 8. Do not click Install First. To press Ctrl+alt+t to open the terminal, enter the code: sudo umount-l/isodevice This command cancels the mount of the drive that contains the disc (note that the-L is the lowercase of l, and the-L and/isodevice have a space. ), otherwise the partition interface cannot find the partition.

 9. Click Install Ubuntu 14.04 below to start the installation

  10. Create a partition for Ubuntu here. I used to have more than 200 g on the F plate, to swap20g, and the rest to the root partition/EXT4.

  11. Click "Install Now" and the following will be installed automatically.

12. After installation, reboot is available.

Second, set the fixed IP. (because Ubuntu will change IP every time it restarts, it is bad for us to build the environment)
    1. Open the terminal and log in with the root user
    2. Then edit the interfaces file, gedit/etc/network/interfaces
    3. Add information

# The Primary network interface

Auto Eth0

Iface eth0 inet Static

Address 192.168.1.100

Netmask 255.255.255.0

Gateway 192.168.1.1

Note: The address, netmask, and gateway are all for Ubuntu. Can be viewed through the Nm-tool command

4. After the addition, save the exit, the next step is to configure DNS resolution, the DNS resolution file in/etc/resolv.conf. Execution: Gedit/etc/resolvconf/resolv.conf.d/base

5. Under this file, add the following box:

NameServer 192.168.1.1

NameServer 220.170.64.68

Note: nameserver is DNS. Can be viewed through the Nm-tool command

6. Follow the above operation to restart it.

Third, install SSH (in order to be able to connect remotely)
    1. Update the source list. Open "Terminal Window", enter "sudo apt-get update"-and "Enter the administrator password of the currently logged in user"--return, you can
    2. Install SSH. Open "Terminal Window", enter "sudo apt-get install Openssh-server"-and enter "Y"-----the installation is complete.
    3. Check to see if the SSH service is started. Open "Terminal Window", enter "sudo ps-e |grep ssh"--and enter--with sshd, stating that the SSH service has been started, if not started, enter "sudo service ssh start"--return The SSH service will start. As shown

  4. Modify the configuration file/etc/ssh/sshd_config using Gedit. As shown

Install XSHELL5 locally, connect to Ubuntu
    1. Download the installation Xshell5.
    2. Double-click the desktop icon

  3. Click New

4. In the popup new Reply property interface, fill in the name and host, click OK. As shown

V. Installation of JDK
    1. Download Jdk-6u27-linux-i586.bin
    2. Copy the Jdk-6u27-linux-i586.bin to/usr/local.
    3. Start Terminal: Enter command sudo-s./jdk-6u20-linux-i586.bin
    4. After the above operation is completed, the JDK needs to be configured; Enter the command sudo gedit/etc/profile, paste the following information in the last line of the file that pops up:

Note: The above address is the native JDK installation address

5. Restart your machine after the terminal input: Java-version The following information appears, indicating that the installation is configured correctly.

Note: We are Java version "1.6.0_20"

Vi. installation of Tomcat
    1. Download apache-tomcat-6.0.28.tar.gz
    2. Copy the installation files to the/usr/local/directory, and in the terminal, unzip the installation package. (Command: sudo tar-zxvf apache-tomcat-6.0.28.tar.gz,
    3. Terminal input command: sudo gedit/usr/local/apache-tomcat-6.0.28/bin/startup.sh, configure startup.sh file, add the following configuration items

Note: The address here should be the same as the actual directory you installed

4. Go to the/usr/local/apache-tomcat-6.0.28/bin/directory and enter the command: Cd/usr/local/apache-tomcat-6.0.28/bin,sudo. startup.sh start the Tomcat server. As shown

  5. If you want to see the detailed point of Tomcat turn off the log, you can enter the logs/directory under Tomcat, enter Tail-f Catalina.out in the terminal, you can view the log in the terminal

6. If Tomcat starts an error, you can view a more detailed log in the following ways

6.1 You can create a new file under the Web-inf/classes directory logging.properties

6.2 Adding Java code under Logging.properties

  1. handlers = Org.apache.juli.FileHandler, Java.util.logging.ConsoleHandler
  2. ############################################################
  3. # Handler specific properties.
  4. # describes specific configuration info for handlers.
  5. ############################################################
  6. Org.apache.juli.FileHandler.level = FINE
  7. Org.apache.juli.FileHandler.directory = ${catalina.base}/logs
  8. Org.apache.juli.FileHandler.prefix = Error-debug.
  9. Java.util.logging.ConsoleHandler.level = FINE
  10. Java.util.logging.ConsoleHandler.formatter = Java.util.logging.SimpleFormatter
  11. When we start Tomcat again, a more verbose log error-debug.2015-10-06.log is generated in the logs directory.
Vii. installation of MySQL
    1. Open terminal, enter command: sudo apt-get install mysql-server. Direct installation. As shown

 2. After installation, enter the command in the terminal: Mysql–uroot–p. Enter the root password after entering, see the following interface to indicate that the installation is OK

3. mysql configuration.

3.1 sudo gedit/etc/mysql/my.cnf. Find bind-address=127.0.0.1 and change it to bind-address= your machine's IP.

3.2 sudo vi/etc/mysql/my.cnf add Lower_case_table_names=1 to mysqld.

[Note: The first line of Mysqld is also added Ship_name_resolve, because it is very slow to start without adding an environment]

4. Restart MySQL. (Command: Sudo/etc/init.d/mysql restart)

5. If there is a restart failure, turn off the original MySQL after restarting. The first is to find the MySQL process (command: ps-aux) MySQL to the right of the first number is the process number, close the process (command: Kill process number. )

6. mysql is open and remote.

Mysql-uroot-p

Use MySQL;

Update user Set host = '% ' where host = ' localhost ';

Flush privileges;

Exit

7. Restore the database to remote MySQL via Navicat

Eight, start the environment
    1. Copy the war package into Tomcat's WebApps directory and Tomcat will automatically unzip
    2. After MySQL is restored, restart MySQL.
    3. Restart Tomcat
    4. Enter the address in the browser

Win7 + Ubuntu 14.04 +tomcat + MySQL build test environment manual

Related Article

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.