Installation and deployment steps of Geoscne Enterprise on Linux 3.1 based on CentOS7.6 operating system (starting from the deployment of virtual machines)

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

insert image description here

1.1.2 Select Custom (Advanced)

insert image description here

1.1.3 The default is enough, if there are special needs, you can choose according to the actual situation

insert image description here

1.1.4 Choose to install the operating system later

insert image description here

1.1.5 Select Linux as the client operating system, and select CentOS 7 64-bit as the version

insert image description here

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

insert image description here

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.

insert image description here

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

insert image description here

1.1.8 The following options are defaulted, just keep clicking Next.

insert image description here
insert image description here
insert image description here
insert image description here

1.1.9 Set the disk capacity, the disk is not recommended to be lower than 100GB.

insert image description here

1.1.10 Specify the disk file storage location

insert image description here

1.1.11 Click Finish to successfully create the virtual machine.

insert image description here

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

insert image description here

1.2.2 Choose to use the ISO image file, find the downloaded image file, and click OK.

insert image description here

1.2.3 Click to open this virtual machine

insert image description here

1.2.4 Enter the installation interface, click and use the up and down arrows to control and select install CentOS 7.

insert image description here

1.2.5 After waiting patiently, enter the language selection, select Chinese, Simplified Chinese, and click to continue

insert image description here

1.2.6 After entering the configuration interface, select the installation location, and click Finish after entering

insert image description here

insert image description here

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.

insert image description hereinsert image description here

1.2.8 Click to start the installation, set the root password, click Finish, wait patiently for the system installation to complete

insert image description here
insert image description here
insert image description here

1.2.9 After the system installation is complete, restart the virtual machine, and the virtual machine has been installed and started successfully.

insert image description hereinsert image description here

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
insert image description here

1.3.1 Use Xshell to connect to the virtual machine

ip addr View virtual machine ip insert image description here
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.
insert image description here
insert image description here

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.
insert image description here
insert image description here

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

insert image description here

2. Environmental preparation

2.1 Turn off the firewall

停止防火墙:systemctl stop firewalld.service
禁止防火墙的开机启动:systemctl disable firewalld.service
查看防火墙状态:systemctl status firewalld.service

insert image description here

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(#设置密码)

insert image description here
You can also use the command:

cat /etc/passwd | grep 用户名
cat /etc/group|grep 组名

Find a user or group
insert image description here

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
insert image description here
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 :wqto 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.
insert image description here
Use the more command to check whether the modification is successful:more /etc/sysconfig/network
insert image description here

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

insert image description here
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
insert image description here

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/
insert image description here
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

insert image description here
Add content to limits.confthe 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.
insert image description here
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).
insert image description here
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

insert image description here
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.
insert image description here
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
insert image description here
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.
insert image description here
Use Xftp to put the authorization file into the Linux system, copy the path and enter the location of the authorization file here.
insert image description hereWhen prompted, it indicates that the server installation is successful
insert image description here

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.
insert image description here
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.
insert image description here
Create a site and set an administrator
insert image description here
insert image description here
insert image description here
insert image description here
password
insert image description here
insert image description here

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.
insert image description here
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

insert image description here
If the following information is displayed, the installation is successful
insert image description here

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.
insert image description here
Set the location of the content directory and click Next.
insert image description here
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.
insert image description here
insert image description here
insert image description here

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.
insert image description here

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
insert image description here

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.
insert image description here
insert image description here

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
insert image description here
insert image description here
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.
insert image description here
insert image description here
insert image description here
insert image description here
Next, we need to install and configure the Web Adapter so we can log into the portal with the initial administrator account.
insert image description here

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.
insert image description here
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

insert image description here
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
insert image description here

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
insert image description here
. 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.
insert image description here
This step will generate two files xy.crt and xy.key in the ssl folder
insert image description here

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.
insert image description here
You can see that a new file xy.pfx is generated in the ssl folder
insert image description here

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

insert image description here

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.xmlmodify 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" />

insert image description here
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
insert image description here
and see the prompt Tomcat started, use a browser to visit these two addresses: https://xy.geo31.cdand http://xy.geo31.cd, if they can be accessed normally, tomcat is configured successfully.
insert image description here

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.
insert image description here
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
insert image description here

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.
insert image description here
Returning Successfully Registered indicates that the configuration is successful, that is, you can use webadaptor to access GeoScnen Portal
insert image description hereinsert image description here

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
insert image description hereinsert image description here

3.5 Configure joint hosting for Portal and Server

Log in to the Portal address with a browser: https://xy.geo31.cd/geosceneclick Platform Management -> System Configuration -> Server -> Add Server
insert image description here
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 .
insert image description here
Check the hosting server and click Save to complete the configuration.
insert image description here
insert image description here

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
insert image description here
data location, select the file you want to publish, enter the title and label, and click OK to start the publishing service.
insert image description here
insert image description here
After the release is successful, click "Visualization" to browse your data on the Portal.
insert image description here
insert image description here
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.
insert image description here
Change to GIS Professional Advanced, click OK, and
insert image description here
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.
insert image description here
insert image description here
The release of 3D data is the same as that of 2D data. After the release is successful, click "Open in Scene Viewer".
insert image description here
insert image description here
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

Guess you like

Origin blog.csdn.net/Xxy9426/article/details/128799637