1安装nodejs
安装nvm用来切换nodejs版本 nvm ll查看nvm
https://github.com/creationix/nvm
跳转到连接复制
复制并且需要写进 ~/.zshrc
vi .zshrc
export NVM_DIR="${XDG_CONFIG_HOME/:-$HOME/.}nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
下载nvm安装包
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
使用nvm安装并且设置默认版本
nvm install v10.15.0 && nvm use v10.15.0 &&nvm alias default v10.15.0
2安装 ejs koa koa-views pug
npm i ejs -S --registry=https://registry.npm.taobao.org
npm i koa -S --registry=https://registry.npm.taobao.org
npm i koa-views -S --registry=https://registry.npm.taobao.org
npm i pug -S --registry=https://registry.npm.taobao.org
3安装pupperteer
npm i puppeteer -S --registry=https://registry.npm.taobao.org
yum install pango.x86_64 libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXtst.x86_64 cups-libs.x86_64 libXScrnSaver.x86_64 libXrandr.x86_64 GConf2.x86_64 alsa-lib.x86_64 atk.x86_64 gtk3.x86_64 -y
yum install ipa-gothic-fonts xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc -y
4安装 七牛
npm i qiniu nanoid -S --registry=https://registry.npm.taobao.org
5安装 mongodb mongoose
vi /etc/yum.repos.d/mongodb-org-3.4.repo
[mongodb-org-3.4]
name=MongoDB Repository
baseurl=https://mirrors.aliyun.com/mongodb/yum/redhat/7/mongodb-org/3.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
sudo yum install -y mongodb-org
sudo service mongod start
npm i mongoose -S