The first deployment of javaweb project on Alibaba Cloud server, Windows Server 2012 R2 experience

Hello everyone, I am a pig arched by cabbage.

First put MySQL, Tomcat, jdk connection at the beginning for you to download
Link: https://pan.baidu.com/s/1KVSg_KlqouzpaidUGjrosg
extraction code: 4ny7

Let's start talking about my experience.

Since I learned the computer and typed the code, I really wanted to see through the red dust and see through life. I gradually became silent and used to loneliness. The attitude of encountering things changed from expecting others to relying on myself. Your ability to solve problems is very important!
Whenever someone asks me a question, I always say that you know Baidu. Not wanting to answer, but not wanting you to miss an opportunity to grow knowledge. The sense of accomplishment made by yourself is far greater than what others taught you. The time of hand in hand is gone. What kind of questions should I ask when asking questions? It is to ask the teacher to make a call when he has no ideas, or to ask the teacher which technology to use to solve such problems. Instead of saying wow, let the teacher take specific steps to help you do it. After all, the teacher ’s time is also very precious. Do n’t ask me how I came to this conclusion, because young people did n’t know how to do it, but my teacher, Brother Yu, ignored my news and did n’t reply (actually, I forgot and never criticized Yu. (Meaning), I just realized that such a low problem is not worthy of asking him to come forward to solve it.
Why do you say this in the middle of the night? Because I have been typing the code recently to design a webpage with features such as lost and found, online shopping mall, and seat occupancy. This time, I don't want to just run it on my own computer, but publish it on the server. I want to break through my comfort zone. After all, this is another opportunity for progress. Because of limited energy, knocking the code and configuring the server, I was too busy, so I handed over the release task to another brother. At eight o'clock, the brother told me that after four hours, he still couldn't access the server I have tried every method, just follow the tutorial, and it still doesn't work. Some people say that four hours is too exaggerated, not exaggerated, not exaggerated at all. Sometimes a small error can take a long time, the code is knocked out, you do n’t know how his grandmother made this mistake, then another mistake. And the final product is the result of such a one-by-one error resolution. So don't say what seems to be a very simple web page or function, the background has been modified many times.
Of course, I certainly cannot let go of this opportunity to try something new. Let's talk about the process of solving this problem. First, I originally saw that the centos system is more stable than the windows system, so I changed the Alibaba Cloud server system to centos, but finally because I was not familiar with Linux, I changed to the familiar windows. , At least your own computer is windows, release javaweb needs three things jdk, Tomcat, mysql. In this case, remote control and file transfer are required. So I downloaded xshell (remote connection tool), xftp (file transfer tool), and I could n’t connect for a long time. I spent a long time here to find a way. Finally, I said what xftp is going to do in windows. It is very complicated. Too understand. I don't know on which blog I saw direct ctrl + c, v directly copied the files from the computer to the computer on the server. So I tried this method, but it was not successful on the web page. At this time, I tried mstcs remote connection. Wow. Yes, so I copied the jdk, Tomcat, and MySQL from the computer to the server, and finally backed up my sql to the server. In the database, then place the javaweb envy into a war package and place it under the webapps under Tomcat. The following big problem is coming, and it has been a big problem that has troubled me for three hours. Through the public network ip + port + project, access failed, check, check, check, say that the security group is not configured, and then modify the security group, say that the firewall is not closed, and then turn off the firewall, grandma's leg, still not good. Drunk, I was deeply attracted by a sentence. Some people said that localhost can access the public IP. He wants to start the startup.bat under the lib package under Tomcat. Every time he clicks, he always flashes by. It is very strange, so I put the war package on my computer, and then click startup.bat, I Go, a large list of loading in cmd, access with localhost, you can access successfully. So I decided that the problem could be here, and I executed startup in the command line window of the server. bat. Say that JAVA_HOME is not available, so I reconfigured the environment variables, because when I first started configuring, I was lazy and put the path of jdk directly under the path. Still not working, I searched and searched again, so I found the blog in Figure 3, and solved the problem perfectly with the mood of the tank. I still can't sleep with excitement. The mood can be described as very exciting and exciting, let me have an idea to record the mood at this moment.
Methods are always more difficult than difficulties, only to find ways to succeed, not to find reasons for failure. Stepping through the mist step by step, the light is in front of me, how can the hard work of four or five hours not meet the joy of this moment. Please call me positive energy boy ~

Insert picture description here

Published 24 original articles · praised 4 · visits 2038

Guess you like

Origin blog.csdn.net/weixin_44226263/article/details/104929284