Vrituoso安装经验总结

来源:互联网 发布:女友长得像刘亦菲 知乎 编辑:程序博客网 时间:2024/05/22 04:53

参考:https://tw.rpi.edu//web/node/3625/

一、安装:

目标:将Virtuoso安装到/home/目录下(默认安装在/usr/local/)

Building from Upstream Source


1. Installing the required build dependencies:

      sudo aptitude install dpkg-dev build-essential      sudo apt-get install autoconf automake libtool flex bison gperf gawk m4 make

2. 下载源码(例如从sourceforge下载Vrituoso7.2.2)

Downloading the source code at http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VOSDownload. After downloading the archived package(virtuoso- opensource-6.1.7.tar.gz), unzip it to the directory you want to have virtuoso installed. Here we set /usr/local/ as the default directory.

3. 将源码解压到当前目录(即源码下载目录):

 tar -xvzf virtuoso-opensource-.6.1.7.tar.gz
并拷贝到即将安装的目录下:

(注意,这里一定要将解压后的文件夹移动到Virtuoso待安装目录下,例如此处为/home/,通常教程上是/usr/local/,否则make install的时候会报error1)

      sudo mv virtuoso-opensource-6.1.7/ /home/      cd /home/virtuoso-opensource-6.1.7/

4. Check the presence and version of required packages. In the command line, run:

      ./autogen.sh
5. Set the compiler flags according to the hardware processor and OS of your machine.

    • For a typical 32-bit Linux machine, we set the compiler flag to:
      CC=cc      CFLAGS=”-O”      export CFLAGS CC

    • For a 64bit linux machine, we set the compiler flag to:
      export CFLAGS=”-O2”

(我是64位 Linux系统,因此进行如下设置:

      export CFLAGS="-10"

6. Configuring:

      ./configure
By default, the target installation directions are under /usr/local/, but you can specify your desired directory using:
      ./configure –prefix=/path/to/dir    
(这里因为希望安装到/home/目录下,因此要设置prefix参数,用如下命令,目标文件夹+Virtuoso安装目录的名字(名字自己随便设,这里设成virtuoso-7.2.2):

     sudo ./configure –prefix=/home/virtuoso-7.2.2/    
可以看到以下输出,给出了即将进行的安装过程中,virtuoso安装路径各文件夹的路径:

7. Run make:

     sudo make
8. (这一步可以不做)

Optionally, you can run make check to run the test-suite. It takes some hours and multiple gigabytes of disk-space.

      make check
9. Installing it to the directory-structure chosen above:
      sudo make install

     You can also specify desired target directory using:

      sudo make install prefix==/path/to/dir
(注意,这里不需要再设置prefix参数了,直接 sudo make install就可以)


可以看到/home/下生成了目录Virtuoso-7.2.2目录,其下的文件夹情况和前面输出的Installation path相同;


二、卸载:

1、卸载通过build开源代码安装的Virtuoso:直接删除相关目录即可

(尝试的过程中,多次装错目录,例如configure的时候把prefix参数设置为/home/,导致lib,bin,share等目录直接生成在home文件夹下,又或者忘了设置prefix参数导致安装到了默认的/usr/local/目录)

①用 find . -name virtuoso* 命令找virtuoso相关目录;

②删除装错的virtuoso安装目录:

rm -rf 待删除的virtuoso目录


2. 卸载通过apt-get方式安装的Virtuoso6.1

http://installion.co.uk/ubuntu/vivid/universe/v/virtuoso-vad-isparql/uninstall/index.html

Uninstall just virtuoso-vad-isparql

sudo apt-get remove virtuoso-vad-isparql

This will remove just the virtuoso-vad-isparql package itself.

Uninstall virtuoso-vad-isparql and it's dependencies

sudo apt-get remove --auto-remove virtuoso-vad-isparql

This will remove the virtuoso-vad-isparql package and any other dependant packages which are no longer needed.

Purging your config/data too

If you also want to delete your local/config files for virtuoso-vad-isparql then this will work.

 Caution! Purged config/data can not be restored by reinstalling the package.
sudo apt-get purge virtuoso-vad-isparql

Or similarly, like this virtuoso-vad-isparql

sudo apt-get purge --auto-remove virtuoso-vad-isparql

其他有用的链接:

https://tw.rpi.edu//web/inside/endpoints/installing-virtuoso

Although virtuoso-t -f & will get you up and running (per VOSMake), we recommend copying the virtuoso.ini file to a project-specific location, tailoring it to project-specific paths/ports/passwords/etc., and starting the virtuoso server withvirtuoso-t -f -c /path/to/project/config/triple-store/virtuoso/virtuoso.ini &. This way, multiple projects can use the same virtuoso server executables without conflict.

http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VOSUbuntuNotes


使用过程中遇到的错误:

1. 无法正常启动Virtuoso:

现象:导入一个大文件,突然想暂停,利用命令暂停后,又重启Virtuoso(用sudo /home/virtuoso-7.2.2/bin/virtuoso-t -d &命令),发现通过浏览器无法连接上Virtuoso客户端,而ps aux | grep virtuoso命令又显示有Virtuoso进程正在执行,并且无法用kill命令关掉;


解决方案:重启电脑,删除(或者移到别的地方)virtuoso安装目录下var/lib/virtuoso/db/virtuoso.lck文件,重新启动virtuoso即可;









0 0
原创粉丝点击