Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Commit

Permalink
add centos_install.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wsjsw committed Jun 7, 2018
1 parent 7390ccd commit 7cc0e99
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions docs/centos_install.md
@@ -0,0 +1,50 @@
## 说明

#### 1.安装依赖文件

```
# pip install -r srcpm/requirement.txt --user
```

#### 2. 创建数据库表

```
$ mysql -h 127.0.0.1 -P 6606 -u root -p
Enter password:root
mysql> CREATE DATABASE IF NOT EXISTS vuldb DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
mysql> grant all on vuldb.* to vuluser@'%' identified by 'vulpassword';
mysql> flush privileges;
mysql> quit
```

#### 3.导入sql文件

```
$ mysql -h127.0.0.1 -P3306 -uroot -p vuldb < srcpm/vuldb_init.sql
Enter password:root
```

### 4.添加本地环境变量

```
$ export DEV_DATABASE_URL=mysql://vuluser:vulpassword@localhost:3306/vuldb
```

#### 5. 启动应用

```
# python manage.py runserver -h 0.0.0.0
```

#### 6. 登录主页

```
http://127.0.0.1:5000/srcpm/
```

0 comments on commit 7cc0e99

Please sign in to comment.