Building the operating environment in the Ubuntu system of the javaweb project

1. Jdk installation

1. Copy the installation package to the root directory of the current user through the crt tool, ie /home/username/

2. Create a jvm package under usr/lib : sudo mkdir jvm

3. Put the compressed package cp(mv) into the jvm

4. Unzip the compressed package namely : sudo tar -xvf jdk.tar.gz

5. Configure environment variables : /etc/profile : sudo vi /etc/profile

 

export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_21 

export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$CLASSPATH 

export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH

Then save and exit , test

( There are three environment variable configuration files, profile , environment , and bash.bashrc in ubuntu , which are generally configured in profile . If it fails, you can configure it in the other two configuration files to try )

Second, the installation of Tomcat

6. Copy the installation package to the root directory of the current user via the crt tool, ie /home/username/

7. Create a jvm package under usr/lib : sudo mkdir jvm

8. Put the compressed package cp(mv) into the jvm

9. Decompress the compressed package namely : sudo tar -xvf tomcat.tar.gz

( Error , indicating that the compressed package will be suffixed and not suitable for this kind of command )

5. Start tomcat.

 

( When the startup fails : start the .sh command without permission ( the file is not executable at this time ), you need to modify the permissions of the current user : chmod +x *.sh; When the log creation fails , because the permissions of the .log file are relatively high , you need to Modify the operation permissions of the current user on this file ( chmod -R 777 file) 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326026452&siteId=291194637