redrock 在postgres 18.6发布后第一时间提供了安装包。
1.下载二进制包
访问 https://www.rockdata.net/zh-cn/download/
kylin@kylin-aaa:/data/i$ wget https://redrock-releases.oss-cn-beijing.aliyuncs.com/v4.2/redrock-18.6-1.linux.aarch64-binaries.tar.gz redrock-18.6-1.linu 100%[===================>] 38.58M 62.6MB/s in 0.6s 2026-08-14 08:10:38 (62.6 MB/s) - 已保存 “redrock-18.6-1.linux.aarch64-binaries.tar.gz” [40452376/40452376])按照官方文档 https://doc.rockdata.net/zh-cn/installation/ 的步骤安装
kylin@kylin-aaa:/data/i$ sudo docker start p13 [sudo] kylin 的密码: p13 kylin@kylin-aaa:/data/i$ sudo docker exec -it p13 bash root@kylin-aaa:/# cd /par/redrock root@kylin-aaa:/par/redrock# ls bin doc lib share root@kylin-aaa:/par/redrock# # groupadd postgres # useradd -g postgres -s /bin/bash -m postgres # passwd postgres root@kylin-aaa:/par/redrock# groupadd postgres root@kylin-aaa:/par/redrock# useradd -g postgres -s /bin/bash -m postgres root@kylin-aaa:/par/redrock# passwd postgres New password: Retype new password: passwd: password updated successfully root@kylin-aaa:/par/redrock# mkdir pgdata root@kylin-aaa:/par/redrock# chown postgres:postgres pgdata root@kylin-aaa:/par/redrock# su - postgres postgres@kylin-aaa:~$ export PGDATA=//par/redrock/pgdata postgres@kylin-aaa:~$ export PATH=/par/redrock/bin:$PATH postgres@kylin-aaa:~$ initdb The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale "C". The default database encoding has accordingly been set to "SQL_ASCII". The default text search configuration will be set to "english". Data page checksums are enabled. fixing permissions on existing directory /par/redrock/pgdata ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default "max_connections" ... 100 selecting default "shared_buffers" ... 128MB selecting default time zone ... Etc/UTC creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok initdb: warning: enabling "trust" authentication for local connections initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. Success. You can now start the database server using: pg_ctl -D //par/redrock/pgdata -l logfile start启动数据库出错
postgres@kylin-aaa:~$ pg_ctl start waiting for server to start....2026-08-14 00:17:08.979 UTC [48] LOG: starting PostgreSQL 18.6 - redrock 4.2 on aarch64-unknown-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit 2026-08-14 00:17:08.980 UTC [48] LOG: could not bind IPv4 address "127.0.0.1": Address already in use 2026-08-14 00:17:08.980 UTC [48] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2026-08-14 00:17:08.980 UTC [48] WARNING: could not create listen socket for "localhost" 2026-08-14 00:17:08.980 UTC [48] FATAL: could not create any TCP/IP sockets 2026-08-14 00:17:08.982 UTC [48] LOG: database system is shut down stopped waiting pg_ctl: could not start server Examine the log output. postgres@kylin-aaa:~$ pg_ctl -D //par/redrock/pgdata -l logfile start waiting for server to start.... stopped waiting pg_ctl: could not start server Examine the log output. postgres@kylin-aaa:~$因为5432端口已被占用,换用5555端口启动成功,然后psql登录成功
postgres@kylin-aaa:~$ pg_ctl start -o '-p 5555' waiting for server to start....2026-08-14 00:30:04.926 UTC [56] LOG: starting PostgreSQL 18.6 - redrock 4.2 on aarch64-unknown-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit 2026-08-14 00:30:04.926 UTC [56] LOG: listening on IPv4 address "127.0.0.1", port 5555 2026-08-14 00:30:04.933 UTC [56] LOG: listening on Unix socket "/tmp/.s.PGSQL.5555" 2026-08-14 00:30:04.942 UTC [62] LOG: database system was shut down at 2026-08-14 00:16:50 UTC 2026-08-14 00:30:04.949 UTC [56] LOG: database system is ready to accept connections done server started postgres@kylin-aaa:~$ psql -p 5555 psql (18.6 - redrock 4.2) Type "help" for help. Cannot read termcap database; using dumb terminal settings. postgres=# select version(); version ----------------------------------------------------------------------------------------------------------------------------- PostgreSQL 18.6 - redrock 4.2 on aarch64-unknown-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit (1 row)