Skip to content

Instantly share code, notes, and snippets.

@zhjwpku
Last active March 24, 2023 01:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhjwpku/a8c95655d9f7c5c14a9adc538948a17d to your computer and use it in GitHub Desktop.
Save zhjwpku/a8c95655d9f7c5c14a9adc538948a17d to your computer and use it in GitHub Desktop.
Setup a dev enviroment for gpdb.
sudo apt update
sudo apt upgrade
sudo apt install -y zsh neovim
## set ecs-user / hellogpdb
sudo passwd ecs-user
## make ecs can access github
sudo bash -c bash
echo "140.82.114.4 github.com" >> /etc/hosts
echo "185.199.108.133 raw.githubusercontent.com" >> /etc/hosts
exit
## install oh-my-zsh
git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
chsh -s $(which zsh)
## install zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# add to plugins
```
plugins=(
# other plugins...
zsh-autosuggestions
)
```
## install Oh my tmux
cd
git clone https://github.com/gpakosz/.tmux.git
ln -s -f .tmux/.tmux.conf
cp .tmux/.tmux.conf.local .
## edit ~/.tmux.conf to comment out C-a prefix
## make a fakeroot dir
mkdir -p ~/fakeroot
## enable localhost login
ssh-keygen
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
## clone gpdb repo
git clone https://github.com/zhjwpku/gpdb.git
cd gpdb
## install dependencies
sudo ./README.Ubuntu.bash
## build the codebase and install the binaries to fakeroot
git submodule update --init
./configure --with-perl --with-python --with-libxml --with-gssapi --enable-debug --enable-debug-extensions --prefix=/home/ecs-user/fakeroot/gpdb
make -j8
make -j8 install
## bring in greenplum environment into running shell
source ~/fakeroot/gpdb/greenplum_path.sh
## start demo cluster
gpAux/gpdemo
make cluster
source gpdemo-env.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment