- Node
- MongoDB
- ElasticSearch (including the corresponding plugin)
# Tips: recommend centos 7, cause you might encounter some mistakes installing or running mongodb and elasticsearch on centos 6
yum install epel-release
# install stable 8.x nodejs
yum install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_8.x | bash -
yum install nodejs
# optional: install pm2 and bittorrent-tracker
npm install pm2 -g
npm install -g bittorrent-tracker
# install elasticsearch
yum install java
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.4.rpm
rpm -ivh elasticsearch-5.6.4.rpm
# set elasticsearch
# for 1G memory server, the recommended setting is:
# -Xms128m
# -Xmx256m
vim /etc/elasticsearch/jvm.options
# install elasticsearch plugin
/usr/share/elasticsearch/bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v5.6.4/elasticsearch-analysis-ik-5.6.4.zip
$ git clone [email protected]:qqdaiyu55/YanQi.git
$ cd YanQi
$ npm install
# For development
$ npm run dev
# For production
$ npm run build
Before run the app, make sure you have started mongoDB and elasticsearch services.
$ npm run start