Linux is always known for its efficiency as a server, and it is common for people who learn computers to build a variety of servers and development environments on Linux. The following is the entire process of configuring a JSP server in Linux recently , with some basic steps and troubleshooting:
1. Install Java JDK
First download the JDK unpacking package from the official website , download the latest version of the tar.gz format, and then unzip it after downloading:
TAR-ZXVF *.tar.gz
Copy the extracted folder to the /usr/local (You can not do this here, just remember the path to the jdk , but for unified management, it is recommended to keep this category of folders in a fixed location)
Configuring Environment variables
This configuration applies to each user who logs on to the system, and can involve security issues
Vim/etc/profile
At the end of the profile file, add the following statement
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
Reboot! (or edit source /etc/profile to be valid one time )
Javac Java =version Confirmation
This setting applies to individual users
cd/home/{ User host directory }
Vim. BASHRC
At the end of the BASHRC file, add the following statement
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, installation MyEclipse
Download the myeclise for Linux run file from the Web .
Chmod +x (additional privileges)
Sudo SH myecliseforlinux.run
* This step may encounter a Java RunTime environment (JRE) or Java development Kit (JDK) must is available in order to run Eclipse. No Java Virtual machine is found after searching the following locations:...
This problem, this problem is encountered when the Ubuntu installation, because ubuntu provided itself with OPen Java, here need to activate our installed JDK .
Workaround:
Enter the following command on the shell
sudo update-alternatives--install "/usr/bin/java" "java" "JDK path /bin/java"
sudo update-alternatives--install "/usr/bin/javac" "Javac" "JDK path /bin/javac"
sudo update-alternatives--install "/usr/bin/javaws" "Javaws" "JDK path /bin/javaws"
sudo update-alternatives--config java
sudo update-alternatives--config javac
sudo update-alternatives--config javaws
Next follow the steps to install it down.
Some friends may prefer to apply directly when installing ./myecliseforlinux to install, so the son is also possible, but this is a memory, small memory of the machine prone to panic.
3. Install Tomcat
the installation of Tomcat is actually just a process of decompression. Unzip the tar package downloaded from the official website to /etc/local . Start with bin/startup.sh in the directory
The process of configuring MyEclipse with Tomcat is the same as the process configured under Windows, and is not discussed here.
4. Install MySQL
MySQL installation is the most difficult step in the entire installation process, but the MySQL official website also provides a complete set of documents, details can be found on the official website:mysql installation documentation
Specific steps:
1. adding users and user groups
Groupadd MySQL
Useradd-r-G MySQL MySQL
2. Unzip the tar package downloaded from the official websiteand move to the /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 installation files
cripts/mysql_install_db--user=mysql
6. Configure the file owner again
Chown-r Root.
7 . Set the owner of the data Directory
# chown-r MySQL Data
8. Copying configuration files
CP SUPPORT-FILES/MY-DEFULT.CNF/ETC/MY.CNF
9. start MySQL
Bin/mysqld_safe--user=mysql &
Initialize Password
bin/mysqladmin-u root password ' new_password '
Copy MySQL. Server into init.d list
CP Support-files/mysql.server/etc/init.d/mysql.server
Automatic startof boot
sudo update-rc.d-f mysql.server defaults
This article is the author in the configuration environment after the summary of the installation method and problem-solving methods. Which references the resources of the following website, hereby declares, and expresses thanks
Reference website
Mysql
http://blog.csdn.net/ichsonx/article/details/9285935
MyEclipse
Http://www.linuxidc.com/Linux/2012-11/74190.htm