Quick deployment and setup of JDK, Tomcat, and MySQL on FedoraLinux

Source: Internet
Author: User
The main content of a jsp server in linux tonight is to install jdk, tomcat, and mysql. simply record the process. the difference is that the entire installation and configuration process does not need to be connected to the internet. you only need to download four required files in advance. as a web server...

 

A linux jsp server is built very easily tonight.

The main content is to install jdk, then install tomcat, and then install mysql.

Simply record the process.

The difference is that the entire installation and configuration process does not need to be connected to the internet. you only need to download four required files in advance.

Being unable to connect to the Internet as a web server is of course strange, but I am also helpless ..

 

------------------------------------- Jdk ---------------------------

[Download]

Here under the http://java.sun.com/javase/downloads/index.jsp

Version is 6u29, File name: jdk-6u29-linux-i586.bin

Everything downloaded tonight is stored in the "download" Directory of the Aloong account.

 

[Installation]

Change permissions for downloaded jdk-6u29-linux-i586.bin files

Chmod a + rwx jdk-6u29-linux-i586.bin

Run

Sh jdk-6u29-linux-i586.bin

In this way, the installation is successfully completed in the "download/jdk1.6.0 _ 29" directory.

 

[Configuration]

I directly modified the/etc/profile File. if it is for the current user, modify the. bashrc file.

Add the following content, because it needs to be changed when Tomcat is installed below, so you can set it together later.

 

JAVA_HOME =/home/Aloong/download/jdk1.6.0 _ 29

CLASSPATH =.: $ JAVA_HOME/lib/tools. jar: $ JAVA_HOME/lib/dt. jar

PATH = $ JAVA_HOME/bin: $ PATH

Export JAVA_HOME CLASSPATH PATH

 

Finally, run source/etc/profile (or. bashrc)

 

[Test]

Input: java-version

The version number is displayed successfully.

 

---------------------------- Tomcat ------------------

Online tutorials generally refer to tomcat installed with apache. as long as I simply install tomcat, it turns out that there is no problem ..

 

[Download]

I'm using the tar.gz version of http://tomcat.apache.org/download-60.cgi.

File name: apache-tomcat-6.0.35.tar.gz

 

[Installation]

Decompress the package directly to the "Aloong/download/apache-tomcat-6.0.35" directory.

 

[Configuration]

Configure/etc/profile (or. bashrc)

Add the following content

 

CATALINA_HOME =/home/Aloong/download/apache-tomcat-6.0.35

CATALINA_BASE =/home/Aloong/download/apache-tomcat-6.0.35

CATALINA_TMPDIR =/home/Aloong/download/apache-tomcat-6.0.35

JAVA_HOME =/home/Aloong/download/jdk1.6.0 _ 29

CLASSPATH =.: $ JAVA_HOME/lib/tools. jar: $ JAVA_HOME/jre/lib/rt. jar

PATH = $ JAVA_HOME/bin: $ PATH: $ CATALINA_HOME/bin

Export JAVA_HOME CLASSPATH PATH

Export CATALINA_HOME CATALINA_BASE CATALINA_TMPDIR

 

The above content includes the configuration of jdk and tomcat I just installed. you only need this one.

Finally, run source/etc/profile (or. bashrc)

 

[Test]

Enter http: // localhost: 8080/in the browser. the welcome page is correct.

The packaged war package can be accessed by adding the project name after the above link directly under webapps under the installation directory.

 

------------------------- Mysql -----------------

This is the most tangled, because at first I only got down the server and did not get down the client results and did not know how to log on.

 

[Download]

Download Page: http://dev.mysql.com/downloads/mysql/

I want to run two RPM packages: (x86, 32-bit) server and client

File names: MySQL-server-5.5.19-1.linux2.6.i386.rpm

MySQL-client-5.6.3_m6-1.linux2.6.i386.rpm

 

[Installation]

Double-click to install the client.

 

However, one problem I encountered was that my Fedora13 already had one of the packages, so a conflict was reported during installation, resulting in the server being unable to be installed. the solution is as follows:

I will first add and delete the software application, filter the installed programs, and search for mysql to get the file name of the conflicting package:

Mysql-libs-5.1.45-2.fc13"

Run the following command to force uninstall:

Rpm-e mysql-libs-5.1.45-2.fc13 -- nodeps

 

After this is done, the installation can be completed. I installed jdk and tomcat in the "/Aloong/download" directory, but Mysql does not have a fixed root directory, so it is not easy to find.

 

[Configuration]

Just a little simple configuration,

First, start the mysql service. use the su account to go to the "/etc/init. d" directory and run the following command:

Mysql start

Then change the password of the root account. the command is

Mysqladmin-u root-p password root ^ C

Then you will be prompted to enter the root password

The next time you log on to mysql, you need to use the command

Mysql-u root-p

To log on

In addition, you can use the SQL file import method. after logging on to mysql, create a table and use the new table. then, run the following command:

Source xxx. SQL

 

------------------------------------- Remarks ----------------------------------

In addition, I also violently changed the file permissions of jdk and tomcat, because they were directly installed using the Aloong account and didn't want to have permission issues. if you find some permission problems, you can use the following command in the installation directory:

Chmod 777 *-R

 

In addition, I may have used the su account in some places, but I forgot to say that if you have no permission for any operation, try su, such as modifying the/etc/profile file, I use su all ..

 

Of course, this is a poor demonstration. I just want to quickly set up the environment ..

If you just want to set up a demo environment in a simple and rough way, follow my methods ..

Otherwise, please search for more relevant tutorials. I know that I am not standardized. Don't be misled by me ..

Author ALOONG

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.