一、搭建准备
openGauss开发需要使用linux环境,先下载远程连接工具Xshell/MobaXterm 。
1. 使用工具连接远程linux服务器,使用root账号远程登录,创建个人账号。
useradd -d /home/xxx -m xxx
2. 设置密码。
passwd xxx
3. 切换到个人账号,以后连接也使用个人账号进行登录。
su - xxx
二、编译openGauss-server
编译openGauss-server需要用到openGauss-server源码和其依赖的第三方软件仓库openGauss-third_party。
在根目录/data/下创建一个自己名字命名的文件夹作为工作目录,进入文件夹,拉取openGauss-server最新源码,建议先fork到自己的gitee仓库,再进行代码拉取,方便后续社区开发代码合入流程,修改代码,提交PR。
mkdir xxx
cd xxx
git clone https://gitee.com/opengauss/openGauss-server.git
openGauss的编译,需要提前把所依赖的开源第三方软件进行编译和构建。
第三方软件工具两种获取方式
1. 源码编译
这些开源的第三方软件存放在仓库openGauss-third_party中,用户拉取代码后可进行编译,通常只用编译一次。若开源软件版本更新,则需要重新构建。
git clone https://gitee.com/opengauss/openGauss-third_party.git
cd openGauss-third_party/build
sh build_all.sh
2.直接使用编译构建好的文件
由于开源软件编译构建耗时较长,社区提供了三个平台编译好的二进制文件给用户下载
● openEuler_arm: https://opengauss.obs.cn-south-1.myhuaweicloud.com/5.0.0/binarylibs/openGauss-third_party_binarylibs_openEuler_arm.tar.gz
● openEuler_x86: https://opengauss.obs.cn-south-1.myhuaweicloud.com/5.0.0/binarylibs/openGauss-third_party_binarylibs_openEuler_x86_64.tar.gz