Linux has always been well known for setting up a jsp server (configuring a jsp Development Environment) as a server, people who build various servers and development environments on linux often learn computers. The following describes the process of configuring the jsp server in linux, including the basic steps and troubleshooting process:
1. Install java jdk
Download the latest version of tar.gz from the official website and decompress the JDK package:
Tar-zxvf * .tar.gz
Copy the decompressed folder to/usr/local (you do not need to remember the jdk path here, but for unified management, we recommend that you store these folders in a fixed location)
Configure environment variables
// This configuration applies to users logging on to the system and involves security issues.
Vim/etc/profile
Add the following statement at the end of the profile file:
Export JAVA_HOME =/usr/local/{jdk path}
Export JRE_HOME =/usr/local/{jdk path}/jre
Export PATH = $ JAVA_HOME/bin: $ JAVA_HOME/jre/bin: $ PATH
Export CLASSPATH =.: $ JAVA_HOME/lib/tools. jar: $ JAVA_HOME/lib/dt. jar
Restart! (Or edit source/etc/profile for one time)
Javac java = version confirmation
// This setting applies to a single user
Cd/home/{user's home directory}
Vim. bashrc
Add the following statement at the end of the bashrc file:
Export JAVA_HOME =/usr/local/{jdk path}
Export JRE_HOME =/usr/local/{jdk path}/jre
Export PATH = $ JAVA_HOME/bin: $ JAVA_HOME/jre/bin: $ PATH
Export CLASSPATH =.: $ JAVA_HOME/lib/tools. jar: $ JAVA_HOME/lib/dt. jar
2. install myeclipse
Download the run file of myeclise for linux from the Internet.
Chmod + x (additional permissions)
Sudo sh myecliseforlinux. run
* This step may encounter A Java RunTime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. no java virtual machine was found after searching the following locations :...
This problem occurs when ubuntu is installed because ubuntu provides OPen java itself. we need to activate the installed jdk here.
Solution:
Run the following command on shell:
Sudo update-alternatives -- install "/usr/bin/java" "java" "jdk path/bin/java" 300
Sudo update-alternatives -- install "/usr/bin/javac" "javac" "jdk path/bin/javac" 300
Sudo update-alternatives -- install "/usr/bin/javaws" "javaws" "jdk path/bin/javaws" 300
Sudo update-alternatives -- config java
Sudo update-alternatives -- config javac
Sudo update-alternatives -- config javaws
Next, follow the steps to continue the installation.
Some users may like to install./myecliseforlinux directly during installation. this is also possible, but it occupies a lot of memory and the machine with a small memory is prone to crash.
3. install tomcat
Tomcat installation is actually a process of decompression. Extract the tar package downloaded from the official website to/etc/local. Start with bin/startup. sh in the directory
The integration process of myeclipse and tomcat is the same as that of configuration in windows.
4. install mysql
Mysql installation is the most difficult step in the entire installation process. However, the mysql official website also provides a complete set of documents. for details, refer to the official website: mysql official installation documentation.
Procedure:
1. add users and user groups
Groupadd mysql
Useradd-r-g mysql
2. decompress the downloaded tar package from the official website and move it to/etc/local.
Tar zxvf/home/user/mysql-5.5.15-linux2.6-i686.tar.gz
3. configure a soft link to the file
Ln-s mysql-5.5.15-linux2.6-i686 mysql
4. change the user group to which the file belongs
Chown-R mysql.
Chgrp-R mysql.
5. execute the installation file
Cripts/mysql_install_db -- user = mysql
6. configure the file owner again
Chown-R root.
7. set the data directory owner
# Chown-R mysql data
8. copy the configuration file
Cp support-files/my-defult.cnf/etc/my. cnf
9. start mysql
Bin/mysqld_safe -- user = mysql &
10. initialize the password
Bin/mysqladmin-u root password 'new _ password'
11. copy mysql. Server to the init. d list.
Cp support-files/mysql. server/etc/init. d/mysql. server
12. automatic start upon startup
Sudo update-rc.d-f mysql. server defaults
This article is the installation method and troubleshooting method summarized after the environment is configured. I have referenced the resources of the following websites and hereby declare and thank you
Reference website
Mysql
Http://blog.csdn.net/ichsonx/article/details/9285935
Myeclipse
Http://www.linuxidc.com/Linux/2012-11/74190.htm