1.安装nodejs
wget http://nodejs.org/dist/v13.4.0/node-v13.4.0-linux-x64.tar.gz
tar -zxvf node-v13.4.0-linux-x64.tar.gz
mv node-v13.4.0 nodejs
vi ~/.bash_profile
PATH=$PATH:$HOME/.local/bin:$HOME/bin:${HOME}/nodejs/bin
source ~/.bash_profile
2.安装mongodb
vi /etc/yum.repos.d/mongodb-org.repo
[mongodb-org]
name=MongoDB Repository
baseurl=http://mirrors.aliyun.com/mongodb/yum/redhat/7Server/mongodb-org/3.2/x86_64/
gpgcheck=0
enabled=1
yum install -y mongodb-org
vi /etc/mongod.conf
# bindIp: 127.0.0.1 # Listen to local interface only, comment to listen on all interfaces.
service mongod start
chkconfig mongod on
3.安装Yapi
npm install -g yapi-cli --registry https://registry.npm.taobao.org
yapi server //开启图形化安装
nohup node vendors/server/app.js & //启动