安装必须的软件
apt-get update -qq
静默升级
apt-get -y install apt-transport-https ca-certificates curl software-properties-common
软件包库
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg |apt-key add -
阿里云镜像的
add-apt-repository “deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs)stable”
apt 换成 阿里云的源,下载速度快。
curl -sL https://deb.nodesource.com/setup_14.x | bash -
添加 node 源
apt-get install -y nodejs
安装node
apt-get update -yqq && apt-get install -y python3-pip
libsqlite3-dev libssl-dev libreadline-dev zlib1g-dev libjemalloc-dev
gcc g++ make imagemagick git --fix-missing && apt-get autoremove
安装python3,以及python库
安装 rbenv
git clone git://github.com/rbenv/rbenv.git ~/.rbenv
获取rbenv
git clone git://github.com/rbenv/ruby-build.git
~/.rbenv/plugins/ruby-build
获取ruby的编译环境
git clone git://github.com/AndorChen/rbenv-china-mirror.git
~/.rbenv/plugins/rbenv-china-mirror
默认rbenv安装ruby的流程,改变源码获取地址
echo ‘export PATH=“ H O M E / . r b e n v / b i n : HOME/.rbenv/bin: HOME/.rbenv/bin:PATH”’ >> ~/.bashrc
编写环境
echo ‘eval “$(rbenv init -)”’ >> ~/.bashrc
每次启动终端时执行一下。
安装 ruby 和 bundler
. ~/.bashrc \ && RUBY_CONFIGURE_OPTS=–with-jemalloc rbenv
install 3.0.3 && rbenv global 3.0.3
安装ruby 3.03并设置全局版本3.03. ~/.bashrc && gem sources --add https://gems.ruby-china.com/
–remove https://rubygems.org/ \ && gem install bundler:2.2.33
安装gem
这些配置以后会用再docker,记录以下