独书先生 Menu

centos下安装 docker, git, node, python环境

1. git

yum install git

2. docker

centos下

curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun

或者参考docker-ce安装

3. node

1. install latest nvm

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

if no any response,try curl:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

v0.35.3 is latest version currently i use, change the version if you need.learn more aboutnvm

if you get error

curl: (7) Failed connect to raw.githubusercontent.com:443; Connection reset by peer

just try open the https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh in browser,download install.sh file manually, then upload to your server, tap sudo bash install.sh manually.

2. solve commond not found

source ~/.nvm/nvm.sh

3. install node v12.X latest version

nvm install 12

4. check node version

node -v

4. python 3

udo yum install yum-utils
sudo yum-builddep python
curl -O https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tgz
tar xf Python-3.8.3.tgz
cd Python-3.8.3
./configure
make
sudo make install
alias python='/usr/local/bin/python3.8' #edit python command python3