|
synology群晖nas centos docker安装nodejs
安装nodejs 17
- curl -sL https://rpm.nodesource.com/setup_17.x | bash -
复制代码
报错
- Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
复制代码 解决方法
- sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*
- sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-*
复制代码 接下来
- yum -y install gcc-c++ make nodejs
复制代码 安装yarn
- curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | tee /etc/yum.repos.d/yarn.repo
- yum install yarn
复制代码 安装docker前先删旧版本- yum remove docker \
- docker-client \
- docker-client-latest \
- docker-common \
- docker-latest \
- docker-latest-logrotate \
- docker-logrotate \
- docker-engine
复制代码 安装
安装docker引擎
- yum install docker-ce docker-ce-cli containerd.io docker-compose-plugin
复制代码 list version
- <blockquote>yum list docker-ce --showduplicates | sort -r
复制代码 上面list版本放到下面的安装命令, 比如3:20.10.9-3.el8 这个版本, 从:后一位起复制到-前也就是20.10.9
- <pre class="highlight" style="box-sizing: border-box; overflow: auto; margin-bottom: 10px; line-height: 1.42857; border: 0px; border-radius: 4px; padding: 20.5px !important; word-break: normal !important;"><span style="box-sizing: border-box; overflow-x: auto; overflow-wrap: normal;">yum </span><span class="nb" style="box-sizing: border-box; border-radius: 0px; overflow-x: auto; overflow-wrap: normal;">install </span><span style="box-sizing: border-box; overflow-x: auto; overflow-wrap: normal;">docker-ce-<VERSION_STRING> docker-ce-cli-<VERSION_STRING> containerd.io docker-compose-plugin</span></pre>
复制代码
报错
- System has not been booted with systemd as init system (PID 1). Can't operate.
复制代码
|
|