The purpose of writing this article is to record that I have built a simple map website that others can access based on Tencent Cloud Server.
Ready to work:
1. Buy a cloud server
2. Remotely log in to the server and configure the website environment
1) Install and configure IIS, install PHP, install MySQL
2) Configure the java jdk environment, tomcat, and goserver.
3) Install postgresql and postgis.
4) Postgis uploads shp data, and geoserver publishes wms services.
5) Based on OpenLayers, compile the html page that calls the wms service.
3. Put the HTML document on the server for access.
Tags: java configuration, tomcat configuration, geoserver installation
1. Java environment variable configuration
Next, start configuring environment variables, right-click [My Computer]--- [Properties]---[Advanced]---[Environment Variables], as shown in the figure:
Select [New System Variable] -- pop up the "New System Variable" dialog box, enter in the "Variable Name" text box
“JAVA_HOME”
Enter the JDK installation path (that is, the folder path in step 5) in the " Variable value" text box, and click the "OK" button, as shown in the figure:
Check the PATH variable in the "System Variables" option area . If it does not exist, create a new variable PATH, otherwise select the variable, click the "Edit" button, and add it at the beginning of the "Variable Value" text box
“%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;”
or directly
“%JAVA_HOME%\bin;”
Click the OK button, as shown in the figure:
Check the CLASSPATH variable in the "System Variables" option area . If it does not exist, create a new variable CLASSPATH, otherwise select the variable, click the "Edit" button, and add the following at the beginning of the "Variable Value" text box:
.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;
As shown in the figure:
2. Tomcat environment variable configuration
Install Tomcat , (it is recommended to use the Tomcat installation version) There is no Tomcat installation package on this machine and download it directly from the Apache official website:
Configure environment variables for Tomcat :
System variables:
Create a new CATALINA_BASE variable
Path to Tomcat installation
System variables:
Create a new CATALINA_HOME variable
Path to Tomcat installation:
System variables:
Add Path
Enter at the end of the variable value :
%CATALINA_HOME%\lib;%CATALINA_HOME%\bin
Startup complete interface:
To verify that the configuration is correct, enter in the browser:
If the Tomcat interface configuration is successful
3. Geoserver configuration
Install Geoserver , decompress Geoserver.war.zip, copy the geoserver.war in it to the webapps folder in the tomcat installation directory, and the decompressed file of geoserver.war will appear in the webapps directory after a while.
To verify the installation result, enter in the browser:
http:/localhost:8080/geoserver/web
The GeoServer interface appears, and the installation is complete.