Ubuntu 14.04 Java Development Environment Building--3--TOMCAT and MySQL installation

Source: Internet
Author: User
Tags mysql login

In the previous two articles, the installation methods for JDK and eclipse have been explained, so let's briefly talk about the installation methods of Tomcat and MySQL.

The installation of Tomcat.

Unzip the apache-tomcat-6.0.39.tar.gz in the right place

cd/opt//home/home/Download/apache-tomcat-6.0. tar.gz/opt/developtools/-zxvf apache-tomcat-6.0.  the . tar.gz# extract to get Tomcat folder [email protected]:/opt/developtools/server$ lsapache-tomcat- 6.0 .  the

Next you need to modify the permissions of the apache-tomcat-6.0.39, otherwise it will not start the main or because I installed the path of the problem,
Here is the permission control, if you install under the $home can not do the following operations.

sudo chown-r tone:tone apache-tomcat-6.0. [email protected]:/opt/developtools/server$ ls-4drwxr9 4096   - Ten: apache-tomcat-6.0.  the

OK below to start Tomcat,

[Email protected]:/opt/developtools/server$ cd apache-tomcat-6.0. the/[email protected]:/opt/developtools/server/apache-tomcat-6.0. the$ lsbin lib logs RELEASE-NOTES temp workconf LICENSE NOTICE RUNNING.txt webapps[email protected]:/opt/developtools/server/apache-tomcat-6.0. the$ CD bin/[email protected]:/opt/developtools/server/apache-tomcat-6.0. the/bin$./startup.sh Using catalina_base:/opt/developtools/server/apache-tomcat-6.0. theUsing catalina_home:/opt/developtools/server/apache-tomcat-6.0. theUsing Catalina_tmpdir:/opt/developtools/server/apache-tomcat-6.0. the/tempusing jre_home:/opt/developtools/jvm/jdk1.6.0_45/jreusing CLASSPATH:/opt/developtools/server/apache-tomcat-6.0. the/bin/bootstrap.jar

With the above output, Tomcat is up, open the browser to access localhost:8080

You will see the familiar picture, as follows:

This completes the Tomcat installation.

Next, simply talk about MySQL installation and configuration

Installation:

sudo apt-get
#安装过程会有交互, you need to enter the root user password

After the installation is complete, a configuration is required to configure the default code for MySQL: Modify to UTF-8 to prevent future development of the Chinese garbled

Now Ubuntu 12.04 starts the default installation of MySQL is MYSQL5. X version of Nature Ubuntu 14.04 is also mysql5. X version

Before you modify the default encoding format just add Default-character-set=utf8 to OK but now the startup will be an error:
Start MySQL. The restart (8) utility is also available.
Start:job failed to start

The correct way to modify this is:

cd/etc/mysql cp my.cnf my.cnf.old #备份配置文件sudo vim my.cnf# Add the following under the [Mysqld] tab [MYSQLD] #Set UTF-8  Init_connect='SET collation_connection = utf8_unicode_ci'init_connect= ' SET NAMES UTF8 ' character-set-server=utf8collation-server=utf8_unicode_ciskip- character-set-client-handshake#esc:wq

Restart MySQL login to view the encoding format:

Mysql> Show variables like'character%';+--------------------------+----------------------------+| variable_name | Value |+--------------------------+----------------------------+| character_set_client | UTF8 | | character_set_connection | UTF8 | | Character_set_database | UTF8 | | Character_set_filesystem | binary | | Character_set_results | UTF8 | | Character_set_server | UTF8 | | Character_set_system | UTF8 | | Character_sets_dir | /usr/share/mysql/charsets/|+--------------------------+----------------------------+8Rowsinch Set(0.00sec) MySQL> Show variables like'collation%';+----------------------+-----------------+| variable_name | Value |+----------------------+-----------------+| collation_connection | Utf8_unicode_ci | | Collation_database | Utf8_unicode_ci | | Collation_server | Utf8_unicode_ci |+----------------------+-----------------+3Rowsinch Set(0.00Sec

So MySQL also installs the configuration to complete

The MySQL management tool mysql-workbench can also be installed directly:

sudo apt-get install  mysql-workbench

At this point, the Java development environment was completed in Ubuntu 14.04.

Ubuntu 14.04 Java Development Environment Building--3--TOMCAT and MySQL installation

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.