Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
使用CentOS7操作系统。

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

```
yum install mongodb mongodb-server
```
如有安装问题,查询官网步骤即可.

2. 运行MongoDB

Expand Down Expand Up @@ -39,6 +40,8 @@ cd spider && npm install && cd ..
cd web && npm install && npm run build && cd ..
```

如果出现npm iconv安装失败,可能需要安装gcc/g++ 编译工具.

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

Expand All @@ -57,22 +60,25 @@ cd web && pm2 start ecosystem.config.js && cd ..

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

加入以下配置
加入proxy_pass的配置

```
server {
listen 80;
server_name www.xxx.com;
...
location / {
proxy_pass http://localhost:3001;
}
...
}
```

启动nginx.
```
service nginx start
```

### 搜索引擎 ###
1. 安装SphinxSearch
Expand All @@ -89,11 +95,11 @@ mkdir -p /data/bt/index/db /data/bt/index/binlog

3. 初始化索引

``
```
cd spider
indexer -c sphinx.conf hash
searchd -c sphinx.conf
``
```


## 网站说明
Expand Down