Windows installation and uninstallation
Description
- This document applies to installation and use in a Windows environment.
Operation steps:
1 Server installation
Open the application MVMS_Server_Setup_V2.0.04051 (version number).exe to install the server, select the installation language, and click Next;

Set the IP address of the server, see figure 2-2. The format is, for example, 122.114.13.244. The specified IP assumes that all servers are installed on this computer; if it is not set, the IP can also be modified manually later; in addition, for distributed deployment, the IPs of different servers also need to be specified manually. Please refer to section 3, Server configuration.

Click Next and specify the installation path of the server, see figure 2-3; by default, it is installed in the Program Files (x86) directory on drive C, and the folder name is MVMS Server;

Click Next to enter the installation process.

- Click Next again until the installation is complete, as shown in figure 2-5.

2 Server configuration
2.1 Firewall configuration
After the server is installed, the server ports need to be opened in the firewall. The ports that need to be opened for the MVMS server group are a range: 7701-7717 (note: these ports may be occupied by other programs, in which case the port numbers need to be modified manually; please refer to 3.2 Server address configuration). The following is how to open the firewall.
Open Control Panel in the Windows system, click the Windows Firewall option, and click Advanced Settings.

After entering the advanced settings page, select Inbound Rules and then select New Rule.

In the Rule Type window, select the rule type, and in the window on the right select Port.

Click Next, select TCP, select "Specific local ports", and enter the range of firewall ports to be opened: 7701-7717, see figure 3-4. For the following steps, click Next, enter a custom rule name and save it.

2.2 Server address configuration
2.2.1 Understanding the IP address and ports of the server The MVMS server consists of a group of servers and supports distributed deployment, but the usual deployment is to deploy all servers on one cloud server at the same time, using one public IP address. In this case, the servers can be configured in two types: one is external servers, which use public IP addresses and provide external business services. The other is internal servers, which only need to use internal LAN addresses. They themselves do not need to provide external services, so they do not need to expose their IPs externally. External programs cannot directly access internal servers, so internal servers are safer and less vulnerable to attacks. For example, the MySQL database server is of this type. The classification of the MVMS server group is as follows: External servers: User server (User), Load Balance server (Load Balance), Media server (Media), Device server (Device), also called signaling server, Web server (Web), Httpflv streaming media server Internal servers: Center server (Center), Database server (mysql DB)
- Description of the default ports used by the servers MYSQL database port: 7701 Center server port: 7702 Media server, uses two ports Media server device access port: 7704 Media server user access port: 7705 Device management server (signaling, gateway server), uses two ports: Device access port: 7706 User access port: 7707 User server: 7708 Web server: 7709 Web server Https port: 7710 http-flv (H5) video server: 7712 Load balance server: (not supported at present) All these ports can be modified in the configuration file global.ini.
2.2.2 Configure the IP address and ports of the server During the installation, the default server group can be deployed on one server computer. The installation program prompts you to enter a public IP address of the server. All external servers use this IP address. If it is not filled in, it can also be modified manually as follows: Method 1: Open the shortcut of the MVMS_Server Control service management tool on the desktop. This is a tool for controlling and managing the server; for more functions, see section 3.4 later in the manual. Open this application, and there is a parameter settings button. After opening it, you can configure the IP and ports of the server.

Change all the IPs to the correct IP addresses, save and restart the server. Method 2: Open the config folder in the installation directory. There is a global.ini file, which is the configuration file of the server. You can open it with Notepad and edit it. Change the IP addresses after device server ip, center server ip, user server ip, media server ip and web server ip to the correct IPs.

After modifying and saving, restart the server. Tip: External servers use public IP addresses, and internal servers can use LAN addresses or the address 127.0.0.1. See section 3.2.1.
2.3 Running steps
Generally, the server runs automatically after the installation is complete, which can be seen in the Windows system service list. MVMS has 8 services in total: Yh_Mysql, Yh_Tomcat8, Yh_Service_Stream, Yh_Service_User, Yh_Service_Device, Yh_Service_Center, Yh_Service_Keeper, Yh_Service_Httpflv;

2.4 Using the server management tool
The MVMS server comes with a server management tool, the MVMS_Service_MonitorTool.exe program, which is located in the yh_service directory of the server installation directory. This tool can be used to start and stop all servers, configure server IPs and ports, register serial numbers, repair service installation, and back up the database. A corresponding shortcut is also automatically generated on the desktop. After opening it, the program interface is as follows.

① Server parameter settings
Click the Server Settings button (see figure 3-10) to modify the server parameters, such as the IP and the port numbers of different services.

② Registration
After clicking the Register button, you can enter the registration function, see figure 3-11. In the pop-up window there is a generated feature code, which is used to apply for a registration code. After registration, the server can be used for a long time.

③ Installation and uninstallation of services
Click the Install Service and Uninstall Service buttons to install and uninstall the services, see figure 3-12. All services will be uninstalled and reinstalled.

Install service: If a service is deleted by mistake, you can use this button. The system checks for missing services, reinstalls and starts the services. After all services are installed, the command prompt box closes automatically:

Uninstall service: This uninstalls the eight installed services and then installs them again; it can solve some unknown service running errors. After all services are uninstalled, the command prompt box closes automatically:

④ Starting and stopping services
Select a service and click Stop to stop the running of that service; if no service is selected, clicking Stop stops all servers. The same applies to the other buttons.

⑤ Database maintenance
Click the Database Maintenance button to open the database maintenance window, where you can back up, restore and store the database.

⑥ Uninstall the server
Note: Before uninstalling the MVMS server, please use the MVMS_Server Control tool to stop all services first, then exit the management tool before performing the following uninstallation steps; otherwise, the uninstallation may fail because some services are running. In the Windows program management window, find the MVMS program and click to uninstall it. See figure 3-17 below:

In the dialog box below, select Yes, see figure 3-18.

In addition, you can also find the uninstallation application in the installation directory.

Open it and confirm the uninstallation of the server. After the uninstallation succeeds, the corresponding started services are also stopped and uninstalled.