java project online process

Reprinted from: https://www.cnblogs.com/hjchoset/p/6073363.html

About how to bring Java web online, deploy it to the public network, and make it accessible to people all over the world. A serialized, complete process introduction will be made.

1. Develop the project in myeclipse and package it into war format. For those who do not know, please refer to the following

How to package a project into a war file with Myeclipse

In File --> Export, you can choose the format of the export project as WAR file

2. To buy a cloud server, it is recommended to go to Alibaba Cloud to buy (ecs), the tutorial is as follows

The first: http://jingyan.baidu.com/article/4e5b3e195ae68a91901e2402.html

The last step of the first tutorial does not need to read the remote connection. Now let’s talk about the remote connection. Just buy an Alibaba Cloud server.
Note: Explain what a cloud server is. Just another computer that never shuts down and never goes online.

The second: https://yq.aliyun.com/articles/280838

The process of the second tutorial:

①、Provide the registered email address and the contact person of the company name to associate the account (the recharge authentication process can be omitted);
②、After the association is successful, log in to the email address, check the activation email, and click the link to complete the registration process;
③、Register you according to the associated email 4. After the account
registration is completed, select the server configuration;
5. Finally, click Buy Now, choose the payment method, do not pay, contact your sales manager and copy your transaction ID to him;

The above is the purchase operation process of Alibaba Cloud server

3. Log in to your Alibaba Cloud server, the following is the tutorial

To purchase Alibaba Cloud server for Linux system:

http://jingyan.baidu.com/article/84b4f565f3d99260f7da3271.html



Purchase an Alibaba Cloud server for Windows (win2012 as an example):

http://www.imaoye.com/article/aliyunECS.html

(The tutorial talks about the problem of remote connection, but the login is included, so ignore the first two pictures)

4. Remote connection (take windows as an example, because windows is relatively suitable for novices)


http://jingyan.baidu.com/article/cd4c297914be1e756e6e60c3.html

5. Configure the Java web environment (take windows as an example, because windows is relatively suitable for novices)


After you successfully connect to the Alibaba Cloud server, the windows system has a graphical interface, which already has an ie, you can download jdk, tomcat and MySQL, Then you may encounter some problems during the installation and configuration of environment variables (not to mention the installation, it is too easy for students learning java web), such as IE is different from your computer's IE, the server's IE is protected by security, many Things (links) cannot be downloaded. There is no way to do this. You can only try them one by one.


You can also copy and paste your computer's jdk, tomcat, and mysql directly to the server without downloading, yes! This is the benefit of remote connection, you can operate directly


Note: The data of the mysql database can be typed again by yourself, or it can be exported from the local mysql, copied to the server, and then imported into the server's mysql.

6. Publish the project

Open the browser on your local computer and enter http://ip:8080/, where http:// is a fixed spelling, ip is the external network IP of the Alibaba Cloud server you bought, and 8080 is the port number of your tomcat. Press Enter, you will see the interface of tomcat, in which there is a tomcat Manager point below, the interface will prompt to enter the user and password of tomcat of your server t (you will be prompted to create a user during installation, uninstall and re-create if not created, must be To have a user), enter another interface of tomcat after input, click a "Browse" button (the interface only has a Chinese button), select the war file in the first step, and then click the "Deploy" button under the button, a few After a few seconds, the interface will refresh.

刷新后,你可以在任何有网络的电脑输入:http://ip:8080/application/.....(该url跟你在开发项目是的url是一样的,只是把localhost换成服务器的ip),就可以访问你的项目了。

7.域名

此时,你可以访问,但是访问路径不像人家:www.baidu.com,.com/.cn/.net/...的叫域名,你需要一个域名来代替你的http://ip:8080/......

①买域名,还在阿里云买。教程:
http://jingyan.baidu.com/article/ab69b270dc91492ca7189f03.html


②域名备案。教程:
http://jingyan.baidu.com/article/925f8cb8176a49c0dde056c6.html


③域名解析.教程:
http://jingyan.baidu.com/article/676629973f96f454d51b849b.html


8.访问项目

至此,你就可以在有网络下访问你的网站(项目)

Guess you like

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