In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
How to deploy the Java code to the CVM? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.
There are three ways to deploy Java under CVM. They are Java image deployment, one-click installation package deployment and manual deployment.
The advantages of the first two methods are convenient and fast, while the disadvantages are that they cost a few yuan to dozens of yuan. Manual deployment is just the opposite of the first two ways, its advantage is free, while honing your technology, the disadvantage is that it is more troublesome.
If you are not short of money or time is tight, you can choose Java image deployment or one-click installation package deployment. There is usually an introduction on the official website of the service provider. If you deploy manually, you need to download the Java jdk installation package and Tomcat.
Steps to deploy Java code to a CVM
After downloading all the 1.jdk installation packages, first open Xshell and Xftp, create a folder on the CVM with Xftp, and copy and paste the jdk installation package and tomcat installation package to the corresponding folder of the CVM.
two。 Enter the command in Xshell to extract the jdk installation package to the specified folder. After the decompression, there will be corresponding files in the jdk folder, and the configuration of environment variables will begin.
3. After editing the content, press the ESC key and type ": wq", then enter enter to save and exit.
4. After saving, enter the instruction: # source / etc/profile to verify whether it is successful.
After 5.jdk is installed, install the unzipped tomcat and enter the bin folder under the unzipped folder.
6. Edit the setclasspath.sh script and add: export JAVA_HOME=/usr/java/jdk/jdk version number export JRE_HOME=/usr/java/jdk/jdk version number / jre
7. Save the edits, press the ESC key, and type ": wq", then enter enter to save and exit.
8. Now that you have started tomcat,jdk and tomcat, you can access the CVM with a browser.
9. Just upload the project to the Webapps folder under the Tomcat folder. After uploading, the browser can visit it.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.