Installing openEuler 22.03
Creating the Virtual Machine
Configure the following settings when creating your VM:
- Select Custom installation
- Choose your ISO file as the boot media
- Set guest operating system to Linux, version Other Linux 5.x kernel 64-bit
- Assign a name to your virtual machine
- Processor configuration: 1 processor with 4 cores
- Allocate 8GB RAM to the VM
- Use NAT network mode
- Select LSI Logic for the I/O controller
- Set disk type to SCSI
- Choose Create a new virtual disk
- Configure disk capacity according to your needs and proceed with defaults
Installing openEuler
-
Select Chinese language during installation
-
Choose Automatic partitioning at installation destination
-
Set the root password
-
In software selection, choose Server workload and include:
- openGauss database
- Hardware monitoring tools
- Performance tools
- Linux remote management
- Windows file servers
- Development tools
- Terminal system management tools
- Traditional UNIX compatibility
- Security tools
- System tools
Important: Avoid minimal installation, otherwise essential utilities like
ifconfigandtarwill be unavailable. -
Click Install and wait for completion
Configuring Network Environment
Step 1: Identify NAT Gateway
In VMware, select VMnet8 and click NAT Settings. Record the Gateway IP address displayed.
Step 2: Configure Network in VM
Edit the network configuration file:
vi /etc/sysconfig/network-scripts/ifcfg-ens33
Apply these modifications:
BOOTPROTO=static
GATEWAY=192.168.137.2
IPADDR=192.168.137.100
DNS1=114.114.114.114
Verify the configuration:
ifconfig
Step 3: Configure Windows Host Adapter
In Windows, access VMnet8 adapter properties and set IPv4 to match the gateway configuration from Step 1.
Step 4: Disable Firewall on Windows
- Open Windows Defender Firewall → Advanced Settings
- Check the Public Profile column — all profiles must show green checkmarks
- Verify Inbound Rules allow necessary traffic
Step 5: Disable Firewall on Linux
systemctl stop firewalld.service
systemctl disable firewalld.service
systemctl status firewalld.service
Step 6: Disable SELinux Permanently
vim /etc/sysconfig/selinux
Change the line to:
SELINUX=disabled
Step 7: Verify Connectivity
Test ping between host and VM to confirm network configuration is working.
Installing openGauss
Since openGauss was included during system installation, the opengauss user account should already exist.
Configuring openGauss
Step 1: Switch too openGauss User
su - opengauss
Step 2: Modify postgresql.conf
vim /var/lib/opengauss/data/postgresql.conf
Update these parameters:
listen_addresses = '*'
local_bind_address = '192.168.137.100'
port = 5432
password_encryption_type = 0
Step 3: Update pg_hba.conf
vim /var/lib/opengauss/data/pg_hba.conf
Add the following line at the end:
host all all 0.0.0.0/0 md5
Step 4: Restart openGauss
/usr/local/opengauss/bin/gs_ctl restart
Creating Database Users
Step 1: Connect to openGauss
gsql -d postgres -p 5432
Step 2: Update openGauss User Password
ALTER USER opengauss IDENTIFIED BY "SecurePassword123";
Step 3: Create Test User
The default opengauss user does not support remote connections. Create a new user instead:
CREATE USER testuser IDENTIFIED BY 'TestPassword456';
Step 4: Grant Administrator Privileges
ALTER USER testuser SYSADMIN;
Step 5: Exit
\q
Connecting via Navicat
- Click Connection → select PostgreSQL
- Enter the following connection details:
- Connection Name: Customize as needed
- Host: VM IP address (e.g.,
192.168.137.100) - Port:
5432 - Username:
testuser - Password:
TestPassword456
- Click Test Connection — a successful connection should complete instantly
Note: Ensure the openGauss service is running before attempting to connect.