Current location - Quotes Website - Collection of slogans - Tomcat installation configuration in linux system (I) includes jdk environment variable configuration.
Tomcat installation configuration in linux system (I) includes jdk environment variable configuration.
I rarely try to operate on linux myself. Recently, I bought Hong Kong Cloud with Yisu Cloud, and I have my own linux environment, so I will try it on it a little. The system is CentOS 7.2 64-bit, and all settings are mirror default settings given by Yi Suyun. I didn't do anything. Upload the packages from jdk-7u79-linux-x64.tar.gz and apache-tomcat-7.0.47.tar.gz directly through Xshell 5 and Xftp 5, and then decompress them. The purpose of this paper is to start tomcat directly after startup. After success, you can access it through the ip+ port of the server and see the default homepage of tomcat. All the things involved may be very basic, but I'm not familiar with them, so I recorded them here.

1. Decompress the jdk.tar.gz instruction.

2. Open the configuration file related to the system.

3. Add JAVA_HOME, PATH and CLASSPATH to the configuration file just now (:wq saves and exits).

4. Test the configuration

If it has been modified and reapplied.

5. Decompress tomcat (in the same way), change the 8080 of /conf/server.xml to 80 (I just don't want to add ports, and 80 ports are idle), and execute the instruction to start tomcat in the tomcat directory (use log to start, and Ctrl+C can exit the log).

6. The external network tests whether tomcat is started normally.

(This block should ensure that the server has an open port. If the environment is different, such as linux and firewall, this paper only records the simplest successful operation, and the specific failure depends on the environmental factors first, so I won't describe it here. )

7. Other related operations

Of course, the above has actually succeeded, but in fact we may need to close it. Some people say it's best not to turn off your phone, but to kill it. I'm not sure about it. We haven't delved into it yet, so let's close it with kill.

View process: