Skip to content

Instantly share code, notes, and snippets.

@justinschuldt
Created December 2, 2019 06:29
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 justinschuldt/7c7dd7e1f486a5aabf5d3da96fce3187 to your computer and use it in GitHub Desktop.
Save justinschuldt/7c7dd7e1f486a5aabf5d3da96fce3187 to your computer and use it in GitHub Desktop.
CentOS7 dev-environment setup with pyenv, docker

pyenv

curl https://pyenv.run | bash sudo vi ~/.bashrc

add:

export PATH="/home/justin/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

vscode

sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'

yum check-update sudo yum install code

keyboard navigation

sudo vi /usr/share/X11/xkb/symbols/us

add:

    # begin custom keybindings
    # replace Caps with AltGr
    key <CAPS> { [ ISO_Level3_Shift            ] };
    # Add vim cursor keys to be accessed with AltGr
    key <AB02> { [ x, X, Delete, Delete        ] };
    key <AC02> { [ s, S, KP_Enter, KP_Enter    ] };
    key <AC03> { [ d, D, Next, Next            ] };
    key <AC04> { [ f, F, BackSpace, BackSpace  ] };
    key <AC06> { [ h, H , Left, Left           ] };
    key <AC07> { [ j, J, Down, Down            ] };
    key <AC08> { [ k, K, Up, Up                ] };
    key <AC09> { [ l, L, Right, Right          ] };
    key <AD07> { [ u, U, Prior, Prior          ] };
    key <AE03> { [ 3, section, Home, Home      ] };
    key <AE04> { [ 4, dollar, End, End         ] };
    key <AC05> { [ g, G, Escape, Escape        ] };
    # end custom keybinding

then clear xkb cache, reboot

sudo rm -rf /var/lib/xkb/* sudo reboot

ssh key

ssh-keygen -t rsa -b 4096 -C "user@example.com" eval $(ssh-agent -s) ssh-add

xclip

sudo yum install xclip

copy public key

xclip -sel clip < ~/.ssh/id_rsa.pub

git config

git config --global user.name "First Last" git config --global user.email user@example.com

docker-compose setup

sudo curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose

docker engine setup

sudo yum install -y yum-utils device-mapper-persistent-data lvm2 sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo sudo yum install docker-ce docker-ce-cli containerd.io

Docker is installed but not started. The docker group is created, but no users are added to the group.

start docker engine

sudo systemctl start docker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment