Welcome to the Linux community forum, and interact with 2 million technical staff. Before installing the jdk documentation, you must download the jdk documentation from the sun website. For example, the document on jdk6 installation should
Welcome to the Linux community forum and interact with 2 million technical staff> before you install the jdk documentation, you must download the jdk documentation from the sun website. The document you downloaded can be any language, including Chinese such as your document to install JDK 5, should be stored in the/tmp/jdk-1_5_0-doc.zip before installation; for example, the document on jdk6 installation should
Welcome to the Linux community forum and interact with 2 million technicians>
Before installing the jdk documentation, you must download the jdk documentation from the sun website. The document you downloaded can be any language, including Chinese such as your document to install JDK 5, should be stored in the/tmp/jdk-1_5_0-doc.zip before installation; for example, if you install JDK 6, you should store the downloaded documents to/tmp/jdk-6-doc.zip before installation. Of course, you may not do this before installation, because the installation process will prompt you to do so. Please check the terminal window prompts.
[Body]
1. First install JDK
Java 6 in the command line Input apt-get install sun-java6-jre sun-java6-jdk can choose whether to install jre
Java 5 enter apt-get install sun-java5-jre sun-java5-jdk in the command line
Multiple jdk can be installed at the same time, and the current default jdk can be changed at any time
Enter sudo update-alternatives -- config javac in the command line to change the current default jdk
Sun-java5-doc and sun-java6-doc are the installation programs for jdk documentation, but do not include jdk documentation.
Before installing the jdk documentation, you must download the jdk documentation from the sun website. The document you downloaded can be any language, including Chinese such as the document you installed JDK 5, should be stored in/tmp/jdk-1_5_0-doc.zip before installation; for example, if you install JDK 6, you should store the downloaded documents to/tmp/jdk-6-doc.zip before installation. Of course, you may not do this before installation, because the installation process will prompt you to do so. Please check the terminal window prompts.
Write environment variable gedit/etc/environment
Add JAVA_HOME =/usr/lib/jvm/java-6-sun to the editor.
Classpath does not need to be configured. Incorrect classpath may cause many problems. Jvm will know the built-in classpath. For custom classpath, you can add the-classpath parameter during running and compiling. As for the environment variables, it is not too late to specify them when the program you write requires them.
To make the configuration take effect, enter./etc/environment in the command line.
If you need to modify the priority of the system virtual machine, adjust the order of priority: sudo gedit/etc/jvm
After jdk is installed, enter java-version on the terminal to check whether the installation is successful (or directly enter java)
2. Installation
Download the green package from the official tomcat website. decompress the package and run startup. sh in the bin directory.
Enter http: // localhost: 8080 in the browser to check whether tomcat is enabled.
To disable tomcat, run shutdown. sh in the bin directory.
If you need to start tomcat at startup, refer to the following method:
Modify the/etc/rc. local file gedit/etc/rc. local to add
JAVA_HOME =/usr/lib/jvm/java-6-sun
CLASSPATH =.:/usr/lib/jvm/java-6-sun/lib
JRE_HOME =/usr/lib/jvm/java-6-sun/jre
Export JRE_HOME
Export CLASSPATH
Export JAVA_HOME
/Home/allenwei/Tomcat/apache-tomcat-6.0.14/bin/startup. sh // directory of tomcat
Modify/etc/profile, enter gedit/etc/profile, and add the following lines:
JAVA_HOME =/usr/lib/jvm/java-6-sun
CATALINA_HOME =/home/test/Tomcat/apache-tomcat-6.0.14
Export JAVA_HOME CATALINA_HOME
After the system is restarted, tomcat can be started with startup.
3. Install mysql
First, sudo apt-get install mysql-server mysql-client
After installation, enter sudo/etc/init. d/mysql start to start mysql.
Modify the root password.
View the default password. Enter sudo gedit/etc/mysql/debian. cnf in the [client] section to view the username and password.
Enter mysql-u root-p to log on, prompt to enter the password, and enter the password in the debian. cnf File
Change Password enter grant all privileges on *. * TO root @ localhostIDENTIFIED BY "the password you want TO change"
Mysql installation is complete.
You can also install the mysql graphical management tool sudo apt-get mysql-admin mysql-query-browser.
4. Install the deb package from the official website.