1. Install the CentOS operating system
1.1 Open the Vmware Workstation software to install the Liunx operating system
1.1.1 Choose to create a new virtual machine
1.1.2 Select Custom (Advanced)
1.1.3 The default is enough, if there are special needs, you can choose according to the actual situation
1.1.4 Choose to install the operating system later
1.1.5 Select Linux as the client operating system, and select CentOS 7 64-bit as the version
1.1.6 Customize the name of the virtual machine (xy.geo31.cd), and try to choose a solid-state hard disk as the storage location, which is relatively fast
1.1.7 Set the processor configuration, create a virtual machine on the local machine, and control the number of cores to half or less as much as possible. If it is created on the cloud, there is no such condition.
1.1.8 Set the virtual machine memory, the principle is the same as above. Try not to exceed half of the memory of the machine
1.1.8 The following options are defaulted, just keep clicking Next.
1.1.9 Set the disk capacity, the disk is not recommended to be lower than 100GB.
1.1.10 Specify the disk file storage location
1.1.11 Click Finish to successfully create the virtual machine.
1.2 Start the virtual machine and configure the virtual machine.
1.2.1 Click the CD/DVD option to set the Linux image file
1.2.2 Choose to use the ISO image file, find the downloaded image file, and click OK.
1.2.3 Click to open this virtual machine
1.2.4 Enter the installation interface, click and use the up and down arrows to control and select install CentOS 7.
1.2.5 After waiting patiently, enter the language selection, select Chinese, Simplified Chinese, and click to continue
1.2.6 After entering the configuration interface, select the installation location, and click Finish after entering
1.2.7 Click on the network and host name, turn on the Ethernet switch after entering, you can set the host name in the host name, click Apply (or not set, you can also set it by modifying the hostname later), click Finish.
1.2.8 Click to start the installation, set the root password, click Finish, wait patiently for the system installation to complete
1.2.9 After the system installation is complete, restart the virtual machine, and the virtual machine has been installed and started successfully.
1.3 Use Xshell and Xftp to connect to the virtual machine
Use Xshell to connect to the virtual machine
Transfer the Geoscene Enterprise3.1 installation package and the JAVA and Tomcat installation packages required for installation to the virtual machine using Xftp
Fixed virtual machine IP
Modify the ip address:
①Enter the linux terminal, enter cd /etc/sysconfig/network-scripts to enter the directory.
②Enter ls to view the network card.
③ Edit network card information: vi ifcfg-ens33.
④Set ONBOOT=yes, set BOOTPROTO=static for static allocation, and modify the ip address according to the gateway (for example: modify the ip address to be close to the gateway address.) ⑤Enter
systemctl restart network to restart the network service.
⑥View network configuration: cat ifcfg-ens33
1.3.1 Use Xshell to connect to the virtual machine
ip addr View virtual machine ip
Use Xshell software to realize remote control server through ssh service, the default ssh server port is 22. Enter the server ip and account password to connect. After connecting, you can control the server by entering various Linux commands.
1.3.2 Use Xftp to transfer the installation package to the virtual machine
Use Xftp software to transfer the installation files placed under the windows system to the Linux system. PSCP, PuTTY and WinSCP software can also be used for transmission. Transfer the compressed packages of DataStore, Portal, Server, WebAdaptor, jdk, and tomcat files in the local system to the root folder, and ensure that the path is in English.
1.3.3 Decompress the transmitted installation package
Run the tar -zxvf command to decompress the installation packages such as DataStore, Portal, Server, WebAdaptor, jdk, and tomcat.
The command is as follows: cd /root
tar -zxvf GeoScene_Server_Linux_31_180192063.tar.gz
tar -zxvf GeoScene_DataStore_Linux_31_180204094.tar.gz
tar -zxvf GeoScene_Portal_Linux_31_180199130.tar.gz
tar -zxvf GeoScene_Web_Adaptor_java_Linux_31_180216011.tar.gz
2. Environmental preparation
2.1 Turn off the firewall
停止防火墙:systemctl stop firewalld.service
禁止防火墙的开机启动:systemctl disable firewalld.service
查看防火墙状态:systemctl status firewalld.service
2.2 Create users and groups
Use the groupadd and useradd commands to create the user geoscene and the group GEOscene, and add the geoscene user to the GEOscene group. The password for the geoscene user is xy942698.
The command is as follows:
groupadd GEOscene(#创建组)
useradd -g GEOscene -m geoscene(#将用户geoscene用户加入GEOscene组)
passwd geoscene(#设置密码)
You can also use the command:
cat /etc/passwd | grep 用户名
cat /etc/group|grep 组名
Find a user or group
2.3 Modify the host name to correspond to the IP
The installed computer name of Geoscene Enterprise is in the form of a fully qualified domain name. This modification can be achieved by editing the two files /etc/hostname and /etc/hosts.
2.3.1 Modify the hostname file
Use the command: vim /etc/hostname
write xy in the file
to change the hostname with the command, change the hostname to xy, note that this is edited with vi, press after entering the file i
, when the word insert appears at the bottom, it can be edited. After editing, press Esc to exit editing, and enter :wq
to save.
2.3.2 Modify the network file
Command: vi /etc/sysconfig/network
Open the network file and change the hostname in the file to xy.
Use the more command to check whether the modification is successful:more /etc/sysconfig/network
2.3.3 Modify the hosts file
Use the command: vi /etc/hosts
After opening hosts, add the following content:
(服务器ip) xy.geo31.cd xy
Execute the command: hostname xy
Make the modified hostname take effect immediately
Check whether the hostname modification is successful
Use the command to check whether the hostname modification is successful
Check the domain name: hostname
Check the fully qualified domain name: hostname -f
2.3.4 Modify folder permissions
Put the original decompressed folder into the geoscene user’s file in Xftp, and the path is /home/geoscene/
Run chown and chmod in turn to modify the permissions of the four files decompressed in 1.3.3.
The command is as follows:
chown -R geoscene:GEOscene /home/geoscene/GeoScene_Server_Linux_31_180192063
chmod -R 755 /home/geoscene/GeoScene_Server_Linux_31_180192063
chown -R geoscene:GEOscene /home/geoscene/GeoScene_DataStore_Linux_31_180204094
chmod -R 755 /home/geoscene/GeoScene_DataStore_Linux_31_180204094
chown -R geoscene:GEOscene /home/geoscene/GeoScene_Portal_Linux_31_180199130
chmod -R 755 /home/geoscene/GeoScene_Portal_Linux_31_180199130
chown -R geoscene:GEOscene /home/geoscene/GeoScene_Web_Adaptor_java_Linux_31_180216011
chmod -R 755 /home/geoscene/GeoScene_Web_Adaptor_java_Linux_31_180216011
3. Install Geoscene Enterprise 3.1
3.1 Install and configure GeoScene Server
3.1.1 Modify the limits.conf file
Command: vi /etc/security/limits.conf
Start editing the limits.conf file, and add the following content to the last line of the file:
geoscene soft nofile 66666
geoscene hard nofile 66666
geoscene soft nproc 25059
geoscene hard nproc 25059
Add content to limits.conf
the file to limit the user's resource usage
3.1.2 Check whether the environment meets the Server requirements
Use the su command to switch to the geoscene user: su - geoscene
You can see that [root@xy ~]# has changed to [geoscene@xy ~]#, and all GeoScene software must be installed under the geoscene user.
Command: ./GeoScene_Server_Linux_31_180192063/serverdiag
Run the serverdiag script to diagnose whether the current environment meets the requirements of GeoSceneServer installation (you can also cd into the file before running).
When the prompt "Found 0 errors and 0 warnings" appears, it means that the environment meets the requirements and GeoSceneServer can be installed.
3.1.3 Install GeoScene Server
Use console mode for interactive installation (silent mode can also be used for silent installation)
command:
cd GeoScene_Server_Linux_31_180192063
./Setup -m console
After the detection environment is satisfied, you can press the Enter key to start the installation, and then press the corresponding key according to the prompt.
After pressing Y to accept the agreement, you will be asked to choose the functional components you want to install. This time, choose 1, 2
installation paths. If you need to modify the path, please manually enter a path. If you do not want to modify it, press enter to continue.
Use Xftp to put the authorization file into the Linux system, copy the path and enter the location of the authorization file here.
When prompted, it indicates that the server installation is successful
3.1.4 Deployment GeoScene Server
If you want to browse on this machine, you also need to add the address to the hosts of this machine before you can open it with a browser (administrator privileges are required to edit, you can copy the hosts to the desktop first, and then overwrite the original file after changing), the path Usually in C:\Windows\System32\drivers\etc.
Enter the returned GeoScene Server Manager address in the browser, and it will jump to the 6443 port of GeoScene Server to configure the site.
Create a site and set an administrator
password
3.2 Install and configure GeoScene Data Store
3.2.1 Diagnose whether the environment meets the requirements of GeoScene Data Store
Command: ./GeoScene_DataStore_Linux_31_180204094/datastorediag
Run the datastorediag script in the same way as above to diagnose whether the current environment meets the requirements for GeoSceneDataStore installation.
If there is a problem, the system will give the requirements and the modification method, use the su command to return to the root to make the modification
3.2.2 Install GeoScene Data Store
The installation method is the same as that of the server, first use the cd command to enter the folder, and then use the console mode to install.
Order:cd GeoScene_DataStore_Linux_31_180204094/
./Setup -m silent -l yes
If the following information is displayed, the installation is successful
3.2.3 Deployment GeoScene Data Store
Enter the address returned after the installation of GeoScene Data Store in the browser, and enter the configuration wizard to start configuration. Enter the address of the Server and the user and password of the set administrator account, and click Next.
Set the location of the content directory and click Next.
Select the type of GeoScene Data Store to be configured. It is recommended to check the first two. The last type of 'space-time' can be configured later when it is used. Then click Next, and then click Finish until the installation is successful.
After the configuration is successful, you can go to the GeoScene Sever manager panel and find all the verifications in the site->GIS server->data store. When a green tick appears, it means that the Datastore is available.
3.3 Install and configure GeoScene Portal
3.3.1 Diagnose whether the environment meets the installation requirements of GeoScene Portal
Command: ./GeoScene_Portal_Linux_31_180199130/portaldiag
When the following information appears, it means that the current environment meets the requirements, and GeoScene Portal can be installed
3.3.2 Install GeoScene Portal
Order:cd GeoScene_Portal_Linux_31_180199130/
./Setup -m console
Also follow the prompt Enter to next step, Y to accept the installation, then select the path, and wait for the installation process to complete.
3.3.3 Configure GeoScene Portal
Enter the access address returned after the Portal is installed in the browser to start the configuration of the GeoScene Portal. Click to create a new portal, import the local license file
and fill in the relevant information. Note that the initial administrator account created here will be used to configure the Adaptor later. The user name is portaladmin, and the password can be directly admin123. Then click Next, and finally click Create to create a GeoScene Enterprise portal.
Next, we need to install and configure the Web Adapter so we can log into the portal with the initial administrator account.
3.4 Install and configure GeoScene Web Adapter
3.4.1 Installation environment preparation
3.4.1.1 Install JAVA environment
3.4.1.1.1 Unzip the installation package
After downloading the installation package, use Xftp to transfer it to the server, use the tar command to decompress the installation package (the path can be selected under /home/geoscene), remember to switch the user back to root with the su command before operation, and the root password is the server password .
Order:cd /home/geoscene
tar -zxvf jdk-8u341-linux-x64.tar.gz
3.4.1.1.2 Configure environment variables
Command: vi /etc/profile
Open the profile file and edit it.
Write the following content in the last line of the file:
JAVA_HOME=/home/geoscene/jdk1.8.0_341
CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH PATH
Use the source command to make the modification take effect immediately
Command: source /etc/profile
Verify that the installation is successful
Command: java -version
Verify that java is installed successfully, the following information will appear on success, you can see the version of java
3.4.1.2 Create a self-signed certificate
3.4.1.2.1 Create private key and certificate request
First, according to the input path, you need to create a tomcat9 folder and ssl folder in Xftp to store the private key file and certificate. Here, you choose to create it under the path /home/ and then use the openssl command to create a self-signed certificate
. The openssl command is used for a cryptographic method library of the secure socket layer, which contains the main cryptographic algorithms on the market.
Command:
openssl req -newkey rsa:2048 -nodes -keyout /home/tomcat9/ssl/xy.key -x509 -days 365 -out /home/tomcat9/ssl/xy.crt
Then enter the information according to the given prompt, which can be filled in personalizedly. Note that the Common Name needs to input the fully qualified domain name of the current machine.
This step will generate two files xy.crt and xy.key in the ssl folder
3.4.1.2.2 Create a self-signed certificate
Command: openssl pkcs12 -inkey /home/tomcat9/ssl/xy.key -in /home/tomcat9/ssl/xy.crt -export -out /home/tomcat9/ssl/xy.pfx
After the command is executed, you will be prompted to set a password. Here it is set to xy942698.
You can see that a new file xy.pfx is generated in the ssl folder
3.4.1.2 Install Tomcat and enable SSL
3.4.1.2.1 Install Tomcat
According to the user support given on the official website, versions above 9.0 can be selected. Here, version 9.0.65 of Tomcat is selected.
After downloading the installation package, use Xftp to transfer it to the server, and use the tar command to decompress the installation package
Command:cd /home/tomcat9
tar -zxvf apache-tomcat-9.0.65.tar.gz
3.4.1.2.2 Enable ssl for Tomcat
Command: vi apache-tomcat-9.0.65/conf/server.xml
Open the server.xml file of tomcat (if you can’t modify it, you need to cd into the conf folder first, and then vi server.xml
modify it)
to modify the content as follows:
change the port number of 8080 to 80, and change the redirection port to 443
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="443" />
Uncomment the connector corresponding to port number 8443, change port 8443 to 443 and enable ssl
<Connector port="443" protocol="HTTP/1.1"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS"
keystoreFile="/home/tomcat9/ssl/xy.pfx" keystorePass="xy942698" />
The keystoreFile and keystorePass here are created in step 3.4.1.2.
It should be noted that the content of the configuration file here will be different depending on the version of tomcat selected. Please confirm the version of tomcat and then modify it according to the format corresponding to the version.
3.4.1.2.3 Verify whether tomcat is successfully installed
Order:cd /home/tomcat9/apache-tomcat-9.0.65/bin/
./startup.sh
Run startup.sh
, run tomcat
and see the prompt Tomcat started, use a browser to visit these two addresses: https://xy.geo31.cd
and http://xy.geo31.cd
, if they can be accessed normally, tomcat is configured successfully.
3.4.2 Deploy GeoScene Web Adapter to Tomcat
The GeoScene Web Adapter 3.1 compressed package is decompressed, and there is already a .war file in the package, so the GeoScene Web Adapter for linux version 3.1 does not need to be installed, and the war file can be used to directly deploy the GeoScene Web Adapter to tomcat.
Order:
cp /home/geoscene/GeoScene_Web_Adaptor_java_Linux_31_180216011/setup_resources/Disk1/InstData/part1/geoscene.war /home/tomcat9/apache-tomcat-9.0.65/webapps/geoscene.war
cp /home/geoscene/GeoScene_Web_Adaptor_java_Linux_31_180216011/setup_resources/Disk1/InstData/part1/geoscene.war /home/tomcat9/apache-tomcat-9.0.65/webapps/server.war
Deploy the Web Adapter application named geoscene and server to tomcat in turn to realize the configuration of GeoScene Portal and GeoScene Server
3.4.3 Configure GeoScene Web Adapter for Portal and Server
3.4.3.1 Configuring Web Adapter for portal
Use the su command to switch to the geoscene user before configuration Command
:
cd /home/geoscene/GeoScene_Web_Adaptor_java_Linux_31_180216011/setup_resources/Disk1/InstData/part1/tools
./configurewebadaptor.sh -m portal -w https://xy.geo31.cd/geoscene/webadaptor -g https://xy.geo31.cd:7443 -u portaladmin -p admin123
First cd to the tools folder under the adapter file, and then run the command, note that -u and -p here are the administrator user and password created when configuring GeoScene Portal in 3.3.3, respectively.
Returning Successfully Registered indicates that the configuration is successful, that is, you can use webadaptor to access GeoScnen Portal
3.4.3.2 Configuring Web Adapter for Server
Order:
./configurewebadaptor.sh -m server -w https://xy.geo31.cd/server/webadaptor -g https://xy.geo31.cd:6443 -u siteadmin -p admin123 -a true
The -u -p here corresponds to the administrator account and password created when configuring GeoScene Server in 3.4
Returning Successfully Registered indicates that the configuration is successful, and you can use webadaptor to access GeoScnen Server
3.5 Configure joint hosting for Portal and Server
Log in to the Portal address with a browser: https://xy.geo31.cd/geoscene
click Platform Management -> System Configuration -> Server -> Add Server
in turn, enter the URL of the GeoScene Server site and the URL of the GeoScene Server site management in the input box, as well as the user and password of the administrator, and finally click Add .
Check the hosting server and click Save to complete the configuration.
3.6 Publishing services in the portal to verify the hosting server
3.6.1 Add 2D and 3D services
Prepare the data you want to publish locally, and enter the Portal address in the browser: https://xy.geo31.cd/geoscene Click in turn: Personal Center -> My Content -> Add Item After clicking upload file, find the local
data location, select the file you want to publish, enter the title and label, and click OK to start the publishing service.
After the release is successful, click "Visualization" to browse your data on the Portal.
Note: If you cannot find the map viewer after sending the service, you need to change the user type to "GIS Professional Advanced". Platform management - member management - find the user that needs to be changed - click the three dots on the right - manage user types.
Change to GIS Professional Advanced, click OK, and
return to the newly released feature page. The "Open in Map Viewer" button appears, which can be clicked to view the feature layer in a map viewer.
The release of 3D data is the same as that of 2D data. After the release is successful, click "Open in Scene Viewer".
At this point, this tutorial is all over, I hope it can help you with simple configuration, thank you for your support. Pay more attention
conclusion
I update the resources and data I have on the WeChat official account, including but not limited to software installation packages, resource packages, test data and development tutorials. At the same time, the problems and solutions encountered in the usual use will be updated. Welcome friends in need to pay attention to my official account! GISer who is too lazy to name