DEV Community

Michael
Michael

Posted on

Can You Install GBase 8a Under a Chinese-Named Directory?

Linux handles non-ASCII directory names without complaint: internally everything is just bytes, and the characters exist only for human eyes. The catch is encoding — the same Chinese text produces different bytes under different encodings. In principle GBase 8a, the China-domestically developed MPP analytical database from GBASE, installs and runs fine under a Chinese-named path in a gbase cluster, but the gbase installer adds a check to shield users from encoding trouble. That check can be disabled by hand — at your own risk.

Everything here uses UTF-8, including the remote Linux session and the ssh client.

Create the Directory

[gbase@gbase_rh7_003 gcinstall]$ echo $LANG
en_US.UTF-8
[root@gbase_rh7_003 ~]# mkdir /opt/南大通用
[root@gbase_rh7_003 ~]# chown gbase:gbase /opt/南大通用
Enter fullscreen mode Exit fullscreen mode

Configure the Installer

installPrefix in demo.options is set to the Chinese path:

installPrefix= /opt/南大通用
coordinateHost = 10.0.2.103,10.0.2.104
coordinateHostNodeID = 234,235,237
dataHost = 10.0.2.103,10.0.2.104
gcwareHost = 10.0.2.103,10.0.2.104
gcwareHostNodeID = 234,235,237
dbaUser = gbase
dbaGroup = gbase
dbaPwd = 'gbase1234'
rootPwd = ''
sshPort = 2222
Enter fullscreen mode Exit fullscreen mode

A Direct Install Fails

The installer only accepts digits, letters, and a short list of symbols:

[gbase@gbase_rh7_003 gcinstall]$ ./gcinstall.py --silent=demo.options -a
Error: gcinstall.py(line 3898) -- installPrefix can only include digit,alpha,and character in [_,-,/],                     input installPrefix /opt/南大通用 include illegal character ▒
Enter fullscreen mode Exit fullscreen mode

Disable the Check

Edit gcinstall.py, search for the error text installPrefix can only include digit, and comment out the whole validation block:

#    for c in Options.installPrefix:
#        if (not c.isalnum()) and (c not in ["-","_"," ","/"]):
#            raise InstallError("installPrefix can only include digit,alpha,and character in [_,-,/], \
#                    input installPrefix %s include illegal character %c" % (Options.installPrefix,c))
Enter fullscreen mode Exit fullscreen mode

Install Again and Verify

With the check disabled, the install completes:

10.0.2.104              install gcware and cluster on host 10.0.2.104 successfully.
10.0.2.103              install gcware and cluster on host 10.0.2.103 successfully.
Starting all gcluster nodes ...
adding new datanodes to gcware ...
InstallCluster Successfully
Enter fullscreen mode Exit fullscreen mode

gcadmin reports CLUSTER STATE: ACTIVE, with 2 coordinator nodes, 2 free data nodes, and 0 virtual clusters. Four follow-up checks all pass:

  • Initialization: gcadmin distribution gcChangeInfo.xml p 1 d 1 generates the distribution, and initnodedatamap succeeds in gccli.
  • DDL and queries: create database testdb, create table td as select now() d from dual, and select * from td return 2025-04-01 13:22:11.
  • Service restart: gcluster_services all stop/start and gcware_services all stop/start all return [ OK ]; gcadmin after the restart is still ACTIVE with VIRTUAL CLUSTER MODE: NORMAL.
  • Client build: GBase client 9.5.3.28.18.r1_patch.8cdf32c2.

Going forward, treat this check as a guardrail rather than a hard limit. If you do deploy under a Chinese path, keep the client, text editor, remote terminal, and everything else touching the install directory on the same UTF-8 encoding — a mismatch there is far harder to diagnose than the error the installer throws on gbase.

Top comments (0)