1、从GitHub上下载文件,使用vscode或者webstorm打开
2、选择vue.config.js文件,将proxy中target修改后端部署的服务器的地址和端口号
3、执行npm run build:prod命令将文件打包到dist文件夹
4、我们将这个文件夹放进要部署的服务器中,在服务器中,我们需要使用nginx来处理跨域问题
5、修改nginx中nginx.conf文件,将其中的location / 中root修改为我们刚刚dist文件的路径
6、在添加一个location /api/,其proxy_pass修改为后端部署的端口号和路径
7、可以访问部署的IP地址和端口号
将下载的文件放入服务器的某一文件夹,再确认是否有这些环境
| Library | Version |
|---|---|
| g++ | 8.4.1, -std=c++17 |
| boost | 1.68 |
| curl | 7.61.1 |
| metis | 5.1.0 |
| antlr | 3.4 |
metis可执行文件和antlr库已安装在项目中。如果无法使用,请自行安装。
创建名为build的新文件夹,进入这个文件夹,使用cmake进行编译
xxxxxxxxxxmkdir buildcd buildcmake ..make
编辑 conf/servers.json
xxxxxxxxxx{"sites": [{"ip": "site's ipv4","user": "Linux user name","port": "gStore http port","dbuser": "root","dbpasswd": "123456","rootPath": "/opt/gStore"}]}
在sites,增加sites的属性:
注意:为了保证程序的正常运行,PEG需要在没有密码的情况下登录到上面配置的站点,并且gStore http服务已经启动。要启动gStore http服务,首先进入gStore根路径,然后运行/bin/ghttp端口号。
在项目文件夹下:
# 开启web服务[root@localhost gStoreDemo]$ ./build/PEG_Server# 创建一个新的数据库[root@localhost gStoreDemo]$ ./build/PEG_Load db_name /path/to/nt/file# 查询[root@localhost gStoreDemo]$ ./build/PEG_Query db_name /path/to/SPARQL/file# 删除[root@localhost gStoreDemo]$ ./build/PEG_Delete db_name