提前准备好:
0.1:安装好python2.7(在linux终端输入:
wget https://www.python.org/ftp/python/2.7.14/Python-2.7.14.tgz)
0.2:安装好jdk1.8(本人另外一篇jdk1.8安装教程https://blog.csdn.net/weixin_37200373/article/details/102835413)
1.1下载
http://www.openkg.cn/tool/cn-deepdive
1.2 安装
1.2.1:安装前打开解压后CNdeepdive里的install.sh文件,搜索找到tar xzvf替换为tar xvf如下图:
1.2.2:
1.2.2.1:cd 桌面
1.2.2.2:cd CNdeepdive
1.2.2.3:./install.sh
出现了问题
lumy@lumy-virtual-machine:~/桌面/CNdeepdive$ ./install.sh
DeepDive installer for Ubuntu
curl: (7) Failed to connect to raw.githubusercontent.com port 443: 拒绝连接
检验git是否没有安装:
1.2.2.3.1 :git(没有的话)
1.2.2.3.2:sudo apt install git
出现bug:不想遇到了没有可用的软件包git,但是它被它的软件包引用了。。。。
解决办法:sudo apt-get update
出现以下问题不用管的,进行下一步;
:sudo apt-get install git
正在读取软件包列表… 完成
E: Problem executing scripts APT::Update::Post-Invoke-Success ‘if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi’
E: Sub-process returned an error code
出现E: Sub-process returned an error code情况的解决办法如下:
1.2.2.3.2.1:sudo pkill -KILL appstreamcli
1.2.2.3.2.2:
wget -P /tmp https://launchpad.net/ubuntu/+archive/primary/+files/appstream_0.9.4-1ubuntu1_amd64.deb https://launchpad.net/ubuntu/+archive/primary/+files/libappstream3_0.9.4-1ubuntu1_amd64.deb
1.2.2.3.2.3:sudo dpkg -i /tmp/appstream_0.9.4-1ubuntu1_amd64.deb /tmp/libappstream3_0.9.4-1ubuntu1_amd64.deb
解决以上出现的问题再到终端重新操作deepdive安装步骤:
1.1: cd /home/lumy/桌面
1.2:cd CNdeepdive
1.3:./install.sh
看到两个Finished表示阶段性的成功,如图所示!!!
1.3 配置环境:
1.3.1在linux终端输入:gedit ~/.bashrc
1.3.2添加:export PATH="~/local/bin:$PATH"
1.3.3在运行下:source ~/.bashrc(让环境变量生效)
又一个阶段性的小胜利完成啦,哈哈哈😄
休息下下。。。。。
1.4 安装postgresql
1.4.1运行:bash <(curl -fsSL git.io/getdeepdive) postgres
安装完毕后配置postgresql(postgres DeepDive使用PostgreSQL的最近的版本。 然而,9.3 +推荐使用所有功能。)的url地址和创建一个数据库存数据并关联:
echo “postgresql://lumy@localhost:5432/transaction” > db.url
psql postgres
psql -U lumy -d transaction -h 127.0.0.1 -p 5432**
如图安装成功!!!
再输入:echo “postgresql://lumy@localhost:5432/transaction” > db.url
postgresql搞定!!!
1.5 安装nlp环境
1.5.1:cd /home/lumy/桌面
1.5.2:cd CNdeepdive
1.5.3:./nlp_setup.sh
1.6 项目框架搭建:
1.6.1:在CNdeepdive文件夹下创建project文件夹
1.6.2:在project文件夹下创建如图所示的input、udf、app.ddlog、deepdive.conf四个文件;
最后再输入:echo “postgresql://lumy@localhost:5432/transaction” > db.url
这样就ok啦哈哈哈😄!!!