Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
78 authored Sep 6, 2019
1 parent 336700d commit 3e307bb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,53 +7,62 @@

### 数据库 ###
1. 按照MongoDB

`
yum install mongodb mongodb-server
`

2. 运行MongoDB

`
service mongod start
`

### NodeJS ###
1. 按照nodejs10

`
curl -sL https://rpm.nodesource.com/setup_10.x | bash -
yum install nodejs
`

2. 安装pm2

`
npm install -g pm2
`

3. 运行环境

`
cd spider && npm install && cd ..
cd web && npm install && npm run build && cd ..
`

### 爬虫网站 ###
1. 启动爬虫

`
cd spider/ && pm2 start ecosystem.config.js && cd ..
`

2. 启动web

`
cd web && pm2 start ecosystem.config.js && cd ..
`

3. 配置web
配置nginx访问web页面。

`
yum install nginx
service nginx start
vim /etc/nginx/conf.d/ssbc.conf
`

加入以下配置。

`
server {
listen 80;
Expand All @@ -67,16 +76,19 @@ server {

### 搜索引擎 ###
1. 安装SphinxSearch

`
yum install http://sphinxsearch.com/files/sphinx-2.3.2-1.rhel7.x86_64.rpm
`

2. 创建目录

`
mkdir -p /data/bt/index/db /data/bt/index/binlog
`

3. 初始化索引

`
cd spider
indexer -c sphinx.conf hash
Expand Down

0 comments on commit 3e307bb

Please sign in to comment.