怎么在虚拟机下安装ubuntu这里就不多说了
ubuntu怎么安装静态ip可以参考:https://www.cnblogs.com/braveym/p/8640563.html
ubuntu安装jdk可以参考:https://www.cnblogs.com/braveym/p/6143356.html
1.XSB安装
我已经把两个安装包都上传到虚拟机了
接下来就是解压
root@hadoop:/opt/moudles# tar -zxf XSB.tar.gz root@hadoop:/opt/moudles# ls jdk1.8.0_60 mulval_1_1.tar.gz XSB XSB.tar.gz root@hadoop:/opt/moudles# rm XSB.tar.gz root@hadoop:/opt/moudles# ls jdk1.8.0_60 mulval_1_1.tar.gz XSB root@hadoop:/opt/moudles#
执行安装命令
XSB环境变量设置
加上这么一句
export PATH=/opt/moudles/XSB/bin:$PATH
2.安装graphviz工具
先更新一下
root@hadoop:~# sudo apt-get update Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB] Hit:2 http://cn.archive.ubuntu.com/ubuntu xenial InRelease Get:3 http://cn.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB] Get:4 http://cn.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB] Fetched 323 kB in 9s (33.0 kB/s) Reading package lists... Done root@hadoop:~#
root@hadoop:/home/hadoop# sudo apt-get install graphviz Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libcdt5 libcgraph6 libgvc6 libgvpr2 libpathplan4 Suggested packages: graphviz-doc The following NEW packages will be installed: graphviz libcdt5 libcgraph6 libgvc6 libgvpr2 libpathplan4 0 upgraded, 6 newly installed, 0 to remove and 672 not upgraded. Need to get 1,535 kB of archives. After this operation, 12.4 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcdt5 amd64 2.38.0-12ubuntu2.1 [23.4 kB] Get:2 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcgraph6 amd64 2.38.0-12ubuntu2.1 [43.6 kB] Get:3 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpathplan4 amd64 2.38.0-12ubuntu2.1 [26.6 kB] Get:4 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgvc6 amd64 2.38.0-12ubuntu2.1 [591 kB] Get:5 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgvpr2 amd64 2.38.0-12ubuntu2.1 [170 kB] Get:6 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 graphviz amd64 2.38.0-12ubuntu2.1 [680 kB] Fetched 1,535 kB in 13s (114 kB/s) Selecting previously unselected package libcdt5. (Reading database ... 174411 files and directories currently installed.) Preparing to unpack .../libcdt5_2.38.0-12ubuntu2.1_amd64.deb ... Unpacking libcdt5 (2.38.0-12ubuntu2.1) ... Selecting previously unselected package libcgraph6. Preparing to unpack .../libcgraph6_2.38.0-12ubuntu2.1_amd64.deb ... Unpacking libcgraph6 (2.38.0-12ubuntu2.1) ... Selecting previously unselected package libpathplan4. Preparing to unpack .../libpathplan4_2.38.0-12ubuntu2.1_amd64.deb ... Unpacking libpathplan4 (2.38.0-12ubuntu2.1) ... Selecting previously unselected package libgvc6. Preparing to unpack .../libgvc6_2.38.0-12ubuntu2.1_amd64.deb ... Unpacking libgvc6 (2.38.0-12ubuntu2.1) ... Selecting previously unselected package libgvpr2. Preparing to unpack .../libgvpr2_2.38.0-12ubuntu2.1_amd64.deb ... Unpacking libgvpr2 (2.38.0-12ubuntu2.1) ... Selecting previously unselected package graphviz. Preparing to unpack .../graphviz_2.38.0-12ubuntu2.1_amd64.deb ... Unpacking graphviz (2.38.0-12ubuntu2.1) ... Processing triggers for libc-bin (2.23-0ubuntu3) ... Processing triggers for man-db (2.7.5-1) ... Setting up libcdt5 (2.38.0-12ubuntu2.1) ... Setting up libcgraph6 (2.38.0-12ubuntu2.1) ... Setting up libpathplan4 (2.38.0-12ubuntu2.1) ... Setting up libgvc6 (2.38.0-12ubuntu2.1) ... Setting up libgvpr2 (2.38.0-12ubuntu2.1) ... Setting up graphviz (2.38.0-12ubuntu2.1) ... Processing triggers for libc-bin (2.23-0ubuntu3) ... root@hadoop:/home/hadoop#
root@hadoop:/home/hadoop# sudo apt-get install graphviz-doc Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: graphviz-doc 0 upgraded, 1 newly installed, 0 to remove and 672 not upgraded. Need to get 2,922 kB of archives. After this operation, 4,642 kB of additional disk space will be used. Get:1 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 graphviz-doc all 2.38.0-12ubuntu2.1 [2,922 kB] Fetched 2,922 kB in 17s (171 kB/s) Selecting previously unselected package graphviz-doc. (Reading database ... 174552 files and directories currently installed.) Preparing to unpack .../graphviz-doc_2.38.0-12ubuntu2.1_all.deb ... Unpacking graphviz-doc (2.38.0-12ubuntu2.1) ... Processing triggers for doc-base (0.10.7) ... Processing 1 added doc-base file... Setting up graphviz-doc (2.38.0-12ubuntu2.1) ...
3.安装MYSQL
sudo apt-get install mysql-server mysql-client
我们给root用户设置一个密码
再输入一次密码
root@hadoop:/home/hadoop# sudo apt-get install mysql-server mysql-client Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libaio1 libevent-core-2.0-5 libhtml-template-perl mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-5.7 mysql-server-core-5.7 Suggested packages: libipc-sharedcache-perl mailx tinyca The following NEW packages will be installed: libaio1 libevent-core-2.0-5 libhtml-template-perl mysql-client mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server mysql-server-5.7 mysql-server-core-5.7 0 upgraded, 10 newly installed, 0 to remove and 672 not upgraded. Need to get 18.4 MB of archives. After this operation, 161 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-common all 5.7.24-0ubuntu0.16.04.1 [15.3 kB] Get:2 http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 libaio1 amd64 0.3.110-2 [6,356 B] Get:3 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-client-core-5.7 amd64 5.7.24-0ubuntu0.16.04.1 [6,030 kB] Get:4 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-client-5.7 amd64 5.7.24-0ubuntu0.16.04.1 [1,720 kB] Get:5 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-server-core-5.7 amd64 5.7.24-0ubuntu0.16.04.1 [7,757 kB] Get:6 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libevent-core-2.0-5 amd64 2.0.21-stable-2ubuntu0.16.04.1 [70.6 kB] Get:7 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-server-5.7 amd64 5.7.24-0ubuntu0.16.04.1 [2,726 kB] Get:8 http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 libhtml-template-perl all 2.95-2 [60.4 kB] Get:9 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-client all 5.7.24-0ubuntu0.16.04.1 [10.1 kB] Get:10 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-server all 5.7.24-0ubuntu0.16.04.1 [10.8 kB] Fetched 18.4 MB in 2min 33s (120 kB/s) Preconfiguring packages ... Selecting previously unselected package mysql-common. (Reading database ... 174912 files and directories currently installed.) Preparing to unpack .../mysql-common_5.7.24-0ubuntu0.16.04.1_all.deb ... Unpacking mysql-common (5.7.24-0ubuntu0.16.04.1) ... Selecting previously unselected package libaio1:amd64. Preparing to unpack .../libaio1_0.3.110-2_amd64.deb ... Unpacking libaio1:amd64 (0.3.110-2) ... Selecting previously unselected package mysql-client-core-5.7. Preparing to unpack .../mysql-client-core-5.7_5.7.24-0ubuntu0.16.04.1_amd64.deb ... Unpacking mysql-client-core-5.7 (5.7.24-0ubuntu0.16.04.1) ... Selecting previously unselected package mysql-client-5.7. Preparing to unpack .../mysql-client-5.7_5.7.24-0ubuntu0.16.04.1_amd64.deb ... Unpacking mysql-client-5.7 (5.7.24-0ubuntu0.16.04.1) ... Selecting previously unselected package mysql-server-core-5.7. Preparing to unpack .../mysql-server-core-5.7_5.7.24-0ubuntu0.16.04.1_amd64.deb ... Unpacking mysql-server-core-5.7 (5.7.24-0ubuntu0.16.04.1) ... Selecting previously unselected package libevent-core-2.0-5:amd64. Preparing to unpack .../libevent-core-2.0-5_2.0.21-stable-2ubuntu0.16.04.1_amd64.deb ... Unpacking libevent-core-2.0-5:amd64 (2.0.21-stable-2ubuntu0.16.04.1) ... Processing triggers for libc-bin (2.23-0ubuntu3) ... Processing triggers for man-db (2.7.5-1) ... Setting up mysql-common (5.7.24-0ubuntu0.16.04.1) ... update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode Selecting previously unselected package mysql-server-5.7. (Reading database ... 175080 files and directories currently installed.) Preparing to unpack .../mysql-server-5.7_5.7.24-0ubuntu0.16.04.1_amd64.deb ... Unpacking mysql-server-5.7 (5.7.24-0ubuntu0.16.04.1) ... Selecting previously unselected package libhtml-template-perl. Preparing to unpack .../libhtml-template-perl_2.95-2_all.deb ... Unpacking libhtml-template-perl (2.95-2) ... Selecting previously unselected package mysql-client. Preparing to unpack .../mysql-client_5.7.24-0ubuntu0.16.04.1_all.deb ... Unpacking mysql-client (5.7.24-0ubuntu0.16.04.1) ... Selecting previously unselected package mysql-server. Preparing to unpack .../mysql-server_5.7.24-0ubuntu0.16.04.1_all.deb ... Unpacking mysql-server (5.7.24-0ubuntu0.16.04.1) ... Processing triggers for ureadahead (0.100.0-19) ... Processing triggers for systemd (229-4ubuntu7) ... Processing triggers for man-db (2.7.5-1) ... Setting up libaio1:amd64 (0.3.110-2) ... Setting up mysql-client-core-5.7 (5.7.24-0ubuntu0.16.04.1) ... Setting up mysql-client-5.7 (5.7.24-0ubuntu0.16.04.1) ... Setting up mysql-server-core-5.7 (5.7.24-0ubuntu0.16.04.1) ... Setting up libevent-core-2.0-5:amd64 (2.0.21-stable-2ubuntu0.16.04.1) ... Setting up mysql-server-5.7 (5.7.24-0ubuntu0.16.04.1) ... update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode Renaming removed key_buffer and myisam-recover options (if present) Setting up libhtml-template-perl (2.95-2) ... Setting up mysql-client (5.7.24-0ubuntu0.16.04.1) ... Setting up mysql-server (5.7.24-0ubuntu0.16.04.1) ... Processing triggers for libc-bin (2.23-0ubuntu3) ... Processing triggers for systemd (229-4ubuntu7) ... Processing triggers for ureadahead (0.100.0-19) ... root@hadoop:/home/hadoop#
4.安装mulval工具
先解压之前下载的mulval.tar.gz,将你的路径加入到环境变量。
解压
在环境变量加上这两句
export MULVALROOT=/opt/moudles/mulval
export PATH=$MULVALROOT/bin:$MULVALROOT/utils:$PATH
apt-get install flex
apt-get install bison
执行make命令