Skip to content

Linux Service Deployment Guide

1. Overview

1.1 Deployment plan

DULI private deployment is built on Docker. Each service is packaged as an independent image.

For online deployment, a single command can automatically download dependencies and finish installation.

For offline deployment, you can download the image package first and then configure and initialize it according to the customer environment.

1.2 Deployment methods

NameDescription
On-premises deploymentThe customer purchases the server and installs it in the company’s own server room.
Cloud deploymentThe customer purchases the server from a cloud service provider.

1.3 Deployment architecture

NameDescriptionRecommended user scaleNumber of servers
Single-node deploymentUsually deployed on one physical server0-200 users1
Separated deploymentInternal and external networks are separated, and messaging, cloud drive, and mail services are deployed independently100-999 users3

2. Environment preparation

2.1 Server specifications

2.1.1 Trial edition

UsersCPUMemoryDisk
Up to 1004 cores12 GB60 GB

2.1.2 Production edition

UsersCPUMemoryDisk
0-20024 cores+64 GB+1 TB+

2.2 Operating system and software

NameVersionNotes
Operating systemCentOS 7.9A clean operating system is recommended. Otherwise ports may fail to start normally or installation scripts may terminate unexpectedly.

2.3 Network requirements

NamePortsNotes
Proxy ports / project ports / service ports3306, 9001-9018, 10001-10002, 8085/18085, 12321-12322, 19001-190181. Allow these ports through the local firewall.
2. If mobile or other external devices need access, configure TCP port mapping.
3. If you are using cloud servers, also allow them in the security group.
4. - indicates a range and / indicates parallel ports.
5. 19001-19018 may remain closed to the public network when only intranet access is required.

3. Installation and deployment

Linux deployment uses Docker. Running the one-click deployment command usually takes about 12 minutes.

3.1 Install Docker

The DULI installation script automatically installs Docker. If you have special Docker version requirements, install it manually according to the official Docker documentation.

3.2 Install services

After preparation is complete, check the basic environment first. Deployment methods are divided into online deployment and offline deployment.

NameDescriptionNotes
Online deploymentThe script downloads the server installation package from the Internet and automatically configures and deploys it.1. Public network access is available.
2. Yum repositories are available.
3. No port conflict exists.

3.2.1 Check installation environment

bash
# Check the operating system
cat /etc/redhat-release

# Check memory
free -m

# Check CPU
cat /proc/cpuinfo | awk '/processor/' | wc -l

# Check disk
df -h

3.2.2 Single-node deployment

Run a single command to automatically download dependencies and install:

bash
cd /opt/ && echo yes | /bin/bash -c "$(curl -fsSL https://download.duliduli.com/download/Linux/main/v1.0.1/install.sh )"

Initialize system parameters:

Start deploying the services and projects required for a single node:

During installation, the script automatically downloads the server installation package:

After the package is downloaded, the script installs Docker, assigns Docker virtual IP addresses, and connects to the image repository:

After Docker is installed, service containers are pulled. The images are large, so please wait patiently:

After the related images are pulled, service containers start first and initialize the MySQL database:

Then the remaining server-side images continue to be pulled:

After installation is complete, the terminal outputs the DULI-related access addresses:

Check containers with docker ps:

After logging into the management console, apply for authorization and activate the service.

3.2.3 Uninstall and reinstall

bash
# Delete Docker container resources.
# If there are containers unrelated to DULI, identify them manually to avoid accidental deletion.
# Note: the reinstall command clears historical DULI data. Confirm before executing.
docker stop $(docker ps | egrep -i duli | awk '{print $NF}')
docker rm -f $(docker ps -aq)
docker rmi -f $(docker images | egrep -i duli | awk '{print $3}')
docker network ls | egrep compose | awk '{print $1}' | xargs docker network rm
rm -rf /opt/dldl-installer-*
rm -f ~/quick-install.sh
clear
cd /opt/ && echo yes | /bin/bash -c "$(curl -fsSL https://download.duliduli.com/download/Linux/main/v1.0.1/install.sh )"

3.3 Version update

3.3.1 Single-node upgrade

bash
# Enter the script root directory
cd /opt/dldl-installer-v1.0.1

# Run the upgrade command
sh quick-install.sh update

The script automatically retrieves the official version number and prompts for the target version. Press Enter after input and the upgrade continues automatically.

After the upgrade, confirm that the version has been updated to the target release, for example v1.0.2.

3.4 Services and images

After installation, the following services are available:

Container nameImageDescription
DuliApache192.168.168.241/duliimages/duliapacheProxy service
DuliMysql192.168.168.241/duliimages/dulimysqlDatabase
DuliRedis192.168.168.241/duliimages/duliredisCache service
DuliHBase192.168.168.241/duliimages/dulihbaseMessage database
DuliGoFast192.168.168.241/duliimages/duligofastFile service
Duli192.168.168.241/duliimages/duliEntry, messaging, admin, and auth services
DuliWpp192.168.168.241/duliimages/duliwppCloud drive service
DuliMail192.168.168.241/duliimages/dulimailMail service
DuliMgmt192.168.168.241/duliimages/dulimgmtWorkflow service
DuliYjs192.168.168.241/duliimages/duliyjsDocument collaboration service

Image versions may differ from the examples.

3.4.1 Service management

bash
docker [start|stop|restart] container_name

3.4.2 Service logs

bash
docker logs -f container_name
TypeServiceIdentifierCurrent logHistorical log
InstallerInstall scriptInstall script/var/log/duliduli/duliduli.log-
DULI projectCloud drive serviceDuliWpplogs/DuliWpp/DuliWpp.outlogs/DuliWpp/DuliWpp.out-20240715.gz
DULI projectMail serviceDuliMaillogs/DuliMail/DuliMail.outlogs/DuliMail/DuliMail.out-20240715.gz
DULI projectWorkflow serviceDuliMgmtlogs/DuliMgmt/DuliMgmt.outlogs/DuliMgmt/DuliMgmt.out-20240715.gz
DULI projectMessage serviceDuliFrontlogs/DuliFront/DuliFront.outlogs/DuliFront/DuliFront.out-20240715.gz
DULI projectBackend serviceDuliBackendlogs/DuliBackend/DuliBackend.outlogs/DuliBackend/DuliBackend.out-20240715.gz
DULI projectEntry serviceDuliRoutelogs/DuliRoute/DuliRoute.loglogs/DuliRoute/7z/2024-07/2024-07-13-1.DuliRoute.gz
DULI projectAuth serviceDuliAuthlogs/DuliAuth/DuliAuth.outlogs/DuliAuth/DuliAuth.out-20240715.gz
InfrastructureProxy serviceDuliApachelogs/DuliApache/access.loglogs/DuliApache/log/access.log-20240714.gz
InfrastructureDatabaseDuliMysqllogs/DuliMysql/logs/mysqld.log-
InfrastructureMessage databaseDuliHBaselogs/DuliHBase/hbase-root-master-hbase-server.log-
InfrastructureFile serviceDuliGoFastlogs/DuliGoFast/log/fileserver.log-

3.4.3 Port information

TypeSideService / ProjectProxy PortInternal Port
ProxyProxy serviceDuliApache80/44380/443
DatabaseDatabaseDuliMysql33063306
DatabaseCache serviceDuliRedis7001-70067001-7006
DatabaseMessage databaseDuliZookeeper21812181
DatabaseMessage databaseDuliHadoop5001050010
DatabaseMessage databaseDuliHBase1601016010
File serviceFile serviceDuliGoFast190019001
DULIEntry serviceDuliRoute190029002
DULIMessaging serviceDuliFront190039003
DULIBackend serviceDuliBackend190059005
DULIAuth serviceDuliAuth190069006
DULIDuliRoute SocketstreamPort Socket290029002
DULIDuliFront SocketwsPort Socket190099009
DULIDuliFront SocketnettyPort Socket190109010
DULIDuliFront SocketandroidPort Socket190119011
DULIDuliFront SocketnatcrossPort WsSocket190129012
DULIDuliFront SocketnatcrossTransferPort WsSocket190159015
Cloud driveDrive serviceClooudDisk190149014
Cloud driveDrive serviceDisk Socket290149014
Cloud driveDrive serviceuploadPort190049004
CollaborationDocument collaboration serviceyjs122342234
MailMail serviceDuliMail190179017
WorkflowWorkflow serviceDuliMgmt190189018
Online previewPreview serviceopenoffice180858085

3.5 Data maintenance

All service data is mapped under /app in the installation directory.

DirectoryDescription
/opt/dldl-installer-v1.0.1Service installation root
quick-install.shMain server management script
softServer installation archives
scriptsSub-scripts
confAddress, port, and database configuration
composeDocker Compose files for services and projects
logProject and service log directory
dataProject and service data directory
data/DuliDataBackupHBase and Hadoop backup path
data/DuliApache/certSSL certificate path

3.5.1 HBase maintenance

bash
docker exec -it DuliHBase sh -c "hbase shell"

Example: list HBase tables

bash
docker exec -it DuliHBase sh -c "echo 'list' | hbase shell"

Backup scripts:

bash
# Snapshot backup for 1 day of data
docker exec -it DuliHBase sh -c 'sh /opt/hbase_backup.sh SnapExport 1'

# Physical backup for 1 day of data
docker exec -it DuliHBase sh -c 'sh /opt/hbase_backup.sh Export 1'

3.5.2 MySQL maintenance

bash
docker exec -ti DuliMysql sh -c 'mysql -h${MysqlAddress} -uroot -P${MysqlPort}'

Manual backup:

bash
docker exec -ti DuliMysql sh -c 'mysqldump -uroot -h"$MysqlAddress" -P"$MysqlPort" --all-databases -ER' > /path/to/backup-file

Scripted backup:

bash
# Enter the installation directory
cd /opt/dldl-installer-v1.0.1

# Load environment variables
. quick-install.sh

# Execute the backup script
sh scripts/mysql.sh Export

4. Domain configuration

4.1 Switch to HTTPS

4.1.1 Preparation

DomainCertificate filePrivate key file
Primary / secondary domainCRT or PEMKEY

Example:

DomainCertificate filePrivate key file
example.comcert.crtcert.key

4.1.2 Modify SSL configuration

Before changing the protocol, back up the related files first to avoid service interruption caused by configuration mistakes.

Enter the installation directory:

bash
cd /opt/dldl-installer-v1.0.1

Upload the certificate:

bash
# You can upload with sftp or use rz
# Install rz if needed:
yum install -y lrzsz

# Copy the certificate to the nginx cert directory
cp cert.crt cert.key data/DuliApache/cert/

Run the HTTPS enable script:

bash
sh scripts/enable_nginx_https.sh

Choose to enable HTTPS by entering 1:

Enter the prepared domain name:

5. Start using it

5.1 Access the admin console

text
https://example.com:9005/html/login.html

5.2 License activation

After registering on the DULI official website and completing enterprise verification, you can obtain a free License file.

After purchasing the Enterprise or VIP edition, use the machine code to obtain the License file and import it.

Importing a License requires online verification. Please ensure that the duliduli.com domain is accessible.

6. Client download

DULI supports Mac, Windows, iOS, and Android clients.

You can download installers from the official website. For Android and iOS, it is recommended to search for “嘟哩” in the app store.

  1. Copy the IP and port from 嘟哩管理地址.txt. If a public domain is configured, use the domain and port instead, then configure the client.

  1. Accept the agreement and click Log In. Accounts can be created in the admin console. If SMS services are already integrated, users can also register directly from the client.

You can start using DULI after logging in.

7. Common commands

7.1 View containers and images

bash
docker ps
docker images

7.2 Start and stop containers

bash
docker start ImagesName
# or
sh quick-install.sh start ImagesName
bash
docker stop ImagesName
# or
sh quick-install.sh stop ImagesName
bash
docker restart ImagesName
# or
sh quick-install.sh restart ImagesName

7.3 Reload service configuration

bash
. quick-install.sh
docker-compose -f compose/docker-compose-service.yml create ServerName
# or
sh quick-install.sh create ImagesName

7.4 Example of configuration change

bash
# 1. Enter the installation root
cd /opt/dldl-installer-v1.0.1

# 2. Load environment variables
. quick-install.sh

# 3. Edit the compose file
vim compose/docker-compose-service.yml

# 4. Add configuration items
# Example: add port mapping 9004:9004 for the proxy service

# 5. Reload the proxy service configuration
docker-compose -f compose/docker-compose-service.yml create DuliApache
# or
sh quick-install.sh create DuliApache

# 6. Restart the service
docker restart DuliApache
# or
sh quick-install.sh restart DuliApache

7.5 Enter common services

Enter HBase:

bash
. quick-install.sh
docker exec -it DuliHBase sh -c "hbase shell"

Enter Redis:

bash
. quick-install.sh
docker exec -it DuliRedis sh -c "redis-cli -h \"$RedisAddress\" -a \"$REDIS_PASSWORD\" -p 7001"

嘟哩帮助中心