1、安装virtualbox

终端输入:sudo apt-get install virtualbox(事实从来都不是一番风顺的.......)

正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
virtualbox-5.0:i386 已经是最新的版本了。
您可能需要运行“apt-get -f install”来纠正下列错误:
下列软件包有未满足的依赖关系:
virtualbox-5.0:i386 : 依赖: libcurl3:i386 (>= 7.16.) 但是它将不会被安装
依赖: libdevmapper1.02.1:i386 (>= :1.02.) 但是它将不会被安装
依赖: libpython2.:i386 (>= 2.7) 但是它将不会被安装
依赖: libsdl1.2debian:i386 (>= 1.2.) 但是它将不会被安装
依赖: libxmu6:i386 但是它将不会被安装
依赖: psmisc:i386 但是它将不会被安装
推荐: libsdl-ttf2.-:i386 但是它将不会被安装
推荐: dkms:i386 但无法安装它
推荐: linux-headers:i386
推荐: gcc:i386 但是它将不会被安装
推荐: binutils:i386 但是它将不会被安装
推荐: pdf-viewer:i386
E: 有未能满足的依赖关系。请尝试不指明软件包的名字来运行“apt-get -f install”(也可以指定一个解决办法)。

为解决这个问题,按照提示做,终端输入:sudo apt-get -f install(事实通常是一波三折的........)

W: 无法下载 bzip2:/var/lib/apt/lists/partial/mirrors.ustc.edu.cn_ubuntu_dists_quantal-updates_main_binary-i386_Packages Hash 校验和不符
W: 无法下载 bzip2:/var/lib/apt/lists/partial/mirrors.ustc.edu.cn_ubuntu_dists_quantal-updates_universe_binary-i386_Packages Hash 校验和不符
W: 无法下载 bzip2:/var/lib/apt/lists/partial/mirrors.ustc.edu.cn_ubuntu_dists_quantal-security_main_binary-i386_Packages Hash 校验和不符
W: 无法下载 bzip2:/var/lib/apt/lists/partial/mirrors.ustc.edu.cn_ubuntu_dists_quantal-security_universe_binary-i386_Packages Hash 校验和不符
E: Some index files failed to download. They have been ignored, or old ones used instead.

什么鬼......,百度了一下,终于找到了解决办法,终端输入:

sudo mv /var/lib/apt/lists /var/lib/apt/lists.bak

sudo mkdir /var/lib/apt/lists
然后继续:sudo apt-get -f install(成功)
终于修复了依赖关系
再试一遍:sudo apt-get install virtualbox(成功)
将会同时安装下列软件:
dkms libgsoap8 libqt5x11extras5 libsdl1.2debian libvncserver1
virtualbox-dkms virtualbox-qt
建议安装:
vde2 virtualbox-guest-additions-iso
下列软件包将被【卸载】:
virtualbox-5.2:i386
下列【新】软件包将被安装:
dkms libgsoap8 libqt5x11extras5 libsdl1.2debian libvncserver1 virtualbox
virtualbox-dkms virtualbox-qt
升级了 个软件包,新安装了 个软件包,要卸载 个软件包,有 个软件包未被升级。
需要下载 24.3 MB/24.7 MB 的归档。
解压缩后将会空出 77.8 MB 的空间。
您希望继续执行吗? [Y/n] y
获取: http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 libsdl1.2debian amd64 1.2.15+dfsg1-3 [168 kB]
获取: http://cn.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 virtualbox-dkms all 5.1.38-dfsg-0ubuntu1.16.04.1 [650 kB]
获取: http://cn.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 virtualbox amd64 5.1.38-dfsg-0ubuntu1.16.04.1 [15.9 MB]
获取: http://cn.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 virtualbox-qt amd64 5.1.38-dfsg-0ubuntu1.16.04.1 [7,503 kB]
已下载 24.3 MB,耗时 2分 46秒 ( kB/s)
(正在读取数据库 ... 系统当前共安装有 个文件和目录。)
正在卸载 virtualbox-5.2:i386 (5.2.-~Ubuntu~xenial) ...
正在处理用于 libc-bin (2.23-0ubuntu10) 的触发器 ...
正在处理用于 gnome-menus (3.13.-6ubuntu3.) 的触发器 ...
正在处理用于 desktop-file-utils (0.22-1ubuntu5.) 的触发器 ...
正在处理用于 bamfdaemon (0.5.~bzr0+16.04.-0ubuntu1) 的触发器 ...
Rebuilding /usr/share/applications/bamf-.index...
正在处理用于 mime-support (.59ubuntu1) 的触发器 ...
正在处理用于 shared-mime-info (1.5-2ubuntu0.) 的触发器 ...
正在处理用于 hicolor-icon-theme (0.15-0ubuntu1) 的触发器 ...
正在选中未选择的软件包 dkms。
(正在读取数据库 ... 系统当前共安装有 个文件和目录。)
正准备解包 .../dkms_2.2.0.-2ubuntu11.5_all.deb ...
正在解包 dkms (2.2.0.3-2ubuntu11.) ...
正在选中未选择的软件包 libgsoap8:amd64。
正准备解包 .../libgsoap8_2.8.28-1_amd64.deb ...
正在解包 libgsoap8:amd64 (2.8.-) ...
正在选中未选择的软件包 libqt5x11extras5:amd64。
正准备解包 .../libqt5x11extras5_5.5.1-3build1_amd64.deb ...
正在解包 libqt5x11extras5:amd64 (5.5.-3build1) ...
正在选中未选择的软件包 libsdl1.2debian:amd64。
正准备解包 .../libsdl1.2debian_1.2.15+dfsg1-3_amd64.deb ...
正在解包 libsdl1.2debian:amd64 (1.2.+dfsg1-) ...
正在选中未选择的软件包 libvncserver1:amd64。
正准备解包 .../libvncserver1_0.9.10+dfsg-3ubuntu0.16.04.2_amd64.deb ...
正在解包 libvncserver1:amd64 (0.9.+dfsg-3ubuntu0.16.04.) ...
正在选中未选择的软件包 virtualbox-dkms。
正准备解包 .../virtualbox-dkms_5.1.38-dfsg-0ubuntu1.16.04.1_all.deb ...
正在解包 virtualbox-dkms (5.1.-dfsg-0ubuntu1.16.04.) ...
正在选中未选择的软件包 virtualbox。
正准备解包 .../virtualbox_5.1.38-dfsg-0ubuntu1.16.04.1_amd64.deb ...
正在解包 virtualbox (5.1.-dfsg-0ubuntu1.16.04.) ...
正在选中未选择的软件包 virtualbox-qt。
正准备解包 .../virtualbox-qt_5.1.38-dfsg-0ubuntu1.16.04.1_amd64.deb ...
正在解包 virtualbox-qt (5.1.-dfsg-0ubuntu1.16.04.) ...
正在处理用于 man-db (2.7.-) 的触发器 ...
正在处理用于 libc-bin (2.23-0ubuntu10) 的触发器 ...
正在处理用于 systemd (-4ubuntu21.) 的触发器 ...
正在处理用于 ureadahead (0.100.-) 的触发器 ...
正在处理用于 hicolor-icon-theme (0.15-0ubuntu1) 的触发器 ...
正在处理用于 gnome-menus (3.13.-6ubuntu3.) 的触发器 ...
正在处理用于 desktop-file-utils (0.22-1ubuntu5.) 的触发器 ...
正在处理用于 bamfdaemon (0.5.~bzr0+16.04.-0ubuntu1) 的触发器 ...
Rebuilding /usr/share/applications/bamf-.index...
正在处理用于 mime-support (.59ubuntu1) 的触发器 ...
正在处理用于 shared-mime-info (1.5-2ubuntu0.) 的触发器 ...
正在设置 dkms (2.2.0.3-2ubuntu11.) ...
正在设置 libgsoap8:amd64 (2.8.-) ...
正在设置 libqt5x11extras5:amd64 (5.5.-3build1) ...
正在设置 libsdl1.2debian:amd64 (1.2.+dfsg1-) ...
正在设置 libvncserver1:amd64 (0.9.+dfsg-3ubuntu0.16.04.) ...
正在设置 virtualbox-dkms (5.1.-dfsg-0ubuntu1.16.04.) ...
Loading new virtualbox-5.1. DKMS files...
First Installation: checking all kernels...
Building only for 4.15.--generic
Building initial module for 4.15.--generic
Done. vboxdrv:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.15.--generic/updates/dkms/ vboxnetadp.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.15.--generic/updates/dkms/ vboxnetflt.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.15.--generic/updates/dkms/ vboxpci.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.15.--generic/updates/dkms/ depmod.... DKMS: install completed.
正在设置 virtualbox (5.1.-dfsg-0ubuntu1.16.04.) ...
vboxweb.service is a disabled or a static unit, not starting it.
正在设置 virtualbox-qt (5.1.-dfsg-0ubuntu1.16.04.) ...
正在处理用于 libc-bin (2.23-0ubuntu10) 的触发器 ...
正在处理用于 systemd (-4ubuntu21.) 的触发器 ...
正在处理用于 ureadahead (0.100.-) 的触发器 ...

验证一下virtualbox是否安装成功:virtualbox –help(会谈出虚拟窗口)

2  vagrant是ruby开发的,所有安装ruby相关的东西
  sudo apt-get -y install ruby rubygems

3.安装vagrant

sudo apt-get install vagrant

正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:
gcc--base:i386 libasn1--heimdal:i386 libasyncns0:i386 libbsd0:i386
libcaca0:i386 libcurl3:i386 libdrm-amdgpu1:i386 libdrm-intel1:i386
libdrm-nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386 libedit2:i386
libelf1:i386 libffi6:i386 libflac8:i386 libgl1-mesa-dri:i386
libgl1-mesa-glx:i386 libglapi-mesa:i386 libglib2.-:i386 libgmp10:i386
libgnutls30:i386 libgssapi-krb5-:i386 libgssapi3-heimdal:i386
libhcrypto4-heimdal:i386 libheimbase1-heimdal:i386 libheimntlm0-heimdal:i386
libhogweed4:i386 libhx509--heimdal:i386 libicu55:i386 libidn11:i386
libjson-c2:i386 libk5crypto3:i386 libkeyutils1:i386 libkrb5--heimdal:i386
libkrb5-:i386 libkrb5support0:i386 libldap-2.4-:i386 libllvm6.:i386
libnettle6:i386 libogg0:i386 libopus0:i386 libp11-kit0:i386
.............................................
............................................
使用'sudo apt autoremove'来卸载它(它们)。
将会同时安装下列软件:
bsdtar bundler curl libgmp-dev libgmpxx4ldbl ruby-bundler ruby-childprocess
ruby-dev ruby-domain-name ruby-erubis ruby-ffi ruby-http-cookie ruby-i18n
ruby-listen ruby-log4r ruby-mime-types ruby-molinillo
ruby-net-http-persistent ruby-net-scp ruby-net-sftp ruby-net-ssh ruby-netrc
ruby-nokogiri ruby-rb-inotify ruby-rest-client ruby-sqlite3 ruby-thor
ruby-unf ruby-unf-ext ruby2.-dev sqlite3
建议安装:
bsdcpio gmp-doc libgmp10-doc libmpfr-dev publicsuffix sqlite3-doc
下列【新】软件包将被安装:
bsdtar bundler curl libgmp-dev libgmpxx4ldbl ruby-bundler ruby-childprocess
ruby-dev ruby-domain-name ruby-erubis ruby-ffi ruby-http-cookie ruby-i18n
ruby-listen ruby-log4r ruby-mime-types ruby-molinillo
ruby-net-http-persistent ruby-net-scp ruby-net-sftp ruby-net-ssh ruby-netrc
ruby-nokogiri ruby-rb-inotify ruby-rest-client ruby-sqlite3 ruby-thor
ruby-unf ruby-unf-ext ruby2.-dev sqlite3 vagrant
升级了 个软件包,新安装了 个软件包,要卸载 个软件包,有 个软件包未被升级。
需要下载 , kB 的归档。
解压缩后会消耗 18.4 MB 的额外空间。
您希望继续执行吗? [Y/n] y
获取: http://cn.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 bsdtar amd64 3.1.2-11ubuntu0.16.04.3 [47.9 kB]
获取: http://cn.archive.ubuntu.com/ubuntu xenial/universe amd64 ruby-molinillo all 0.4.3-1 [12.1 kB]
获取: http://cn.archive.ubuntu.com/ubuntu xenial/universe amd64 ruby-net-http-persistent all 2.9.4-1 [15.9 kB]
获取: http://cn.archive.ubuntu.com/ubuntu xenial/universe amd64 ruby-thor all 0.19.1-2 [43.7 kB]
获取: http://cn.archive.ubuntu.com/ubuntu xenial/universe amd64 ruby-bundler all 1.11.2-1 [122 kB]
获取: http://cn.archive.ubuntu.com/ubuntu xenial/universe amd64 bundler all 1.11.2-1 [4,796 B]
获取: http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 curl amd64 7.47.0-1ubuntu2.8 [139 kB]
获取: http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 libgmpxx4ldbl amd64 2:6.1.0+dfsg-2 [8,948 B]
获取: http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 libgmp-dev amd64 2:6.1.0+dfsg-2 [314 kB]
.............................................
..............................................
正在选中未选择的软件包 curl。
正准备解包 .../curl_7.47.0-1ubuntu2.8_amd64.deb ...
正在解包 curl (7.47.-1ubuntu2.) ...
正在选中未选择的软件包 libgmpxx4ldbl:amd64。
正准备解包 .../libgmpxx4ldbl_2%3a6.1.0+dfsg-2_amd64.deb ...
正在解包 libgmpxx4ldbl:amd64 (:6.1.+dfsg-) ...
正在选中未选择的软件包 libgmp-dev:amd64。
正准备解包 .../libgmp-dev_2%3a6.1.0+dfsg-2_amd64.deb ...
正在解包 libgmp-dev:amd64 (:6.1.+dfsg-) ...
正在选中未选择的软件包 ruby-ffi。
正准备解包 .../ruby-ffi_1..10debian-1build2_amd64.deb ...
正在解包 ruby-ffi (1.9.10debian-1build2) ...
正在选中未选择的软件包 ruby-childprocess。
正准备解包 .../ruby-childprocess_0.5.9-1ubuntu1_all.deb ...
正在解包 ruby-childprocess (0.5.-1ubuntu1) ...
正在选中未选择的软件包 ruby2.-dev:amd64。
正准备解包 .../ruby2.-dev_2.3.1-~16.04.10_amd64.deb ...
正在解包 ruby2.-dev:amd64 (2.3.-~16.04.) ...
正在选中未选择的软件包 ruby-dev:amd64。
正准备解包 .../ruby-dev_1%3a2.3.0+1_amd64.deb ...
正在解包 ruby-dev:amd64 (:2.3.+) ...
正在选中未选择的软件包 ruby-unf-ext。
正准备解包 .../ruby-unf-ext_0.0.7.-1build2_amd64.deb ...
正在解包 ruby-unf-ext (0.0.7.2-1build2) ...
正在选中未选择的软件包 ruby-unf。
正准备解包 .../ruby-unf_0.1.4-1_all.deb ...
正在解包 ruby-unf (0.1.-) ...
正在选中未选择的软件包 ruby-domain-name。
正准备解包 .../ruby-domain-name_0.5.20160216-2_all.deb ...
正在解包 ruby-domain-name (0.5.-) ...
正在选中未选择的软件包 ruby-erubis。
正准备解包 .../ruby-erubis_2.7.0-3_all.deb ...
正在解包 ruby-erubis (2.7.-) ...
正在选中
正在设置 ruby-erubis (2.7.-) ...
正在设置 ruby-http-cookie (1.0.-) ...
正在设置 ruby-i18n (0.7.-) ...
正在设置 ruby-rb-inotify (0.9.-) ...
正在设置 ruby-listen (3.0.-) ...
正在设置 ruby-log4r (1.1.-) ...
正在设置 ruby-mime-types (2.6.-) ...
正在设置 ruby-net-ssh (:3.0.-) ...
正在设置 ruby-net-scp (1.2.-) ...
正在设置 ruby-net-sftp (:2.1.-) ...
正在设置 ruby-netrc (0.10.-) ...
正在设置 ruby-nokogiri (1.6.7.2-3build1) ...
正在设置 ruby-rest-client (1.8.-2ubuntu1) ...
正在设置 ruby-sqlite3 (1.3.-2build1) ...
正在设置 sqlite3 (3.11.-1ubuntu1) ...
正在设置 vagrant (1.8.+dfsg-1ubuntu0.) ...
正在处理用于 libc-bin (2.23-0ubuntu10) 的触发器 ...

vagrant安装成功

下面来配置虚拟环境

创建一个开发目录:并且初始化

tan@tan-Precision-Tower-:~$ mkdir env
tan@tan-Precision-Tower-:~$ cd env
tan@tan-Precision-Tower-:~/env$ vagrant centos/
Usage: vagrant [options] <command> [<args>] -v, --version Print the version and exit.
-h, --help Print this help. Common commands:
box manages boxes: installation, removal, etc.
destroy stops and deletes all traces of the vagrant machine
global-status outputs status Vagrant environments for this user
halt stops the vagrant machine
help shows the help for a subcommand
init initializes a new Vagrant environment by creating a Vagrantfile
login log in to HashiCorp's Vagrant Cloud
package packages a running vagrant environment into a box
plugin manages plugins: install, uninstall, update, etc.
port displays information about guest port mappings
powershell connects to machine via powershell remoting
provision provisions the vagrant machine
push deploys code in this environment to a configured destination
rdp connects to machine via RDP
reload restarts vagrant machine, loads new Vagrantfile configuration
resume resume a suspended vagrant machine
snapshot manages snapshots: saving, restoring, etc.
ssh connects to machine via SSH
ssh-config outputs OpenSSH valid configuration to connect to the machine
status outputs status of the vagrant machine
suspend suspends the machine
up starts and provisions the vagrant environment
version prints current and latest Vagrant version For help on any individual command run `vagrant COMMAND -h` Additional subcommands are available, but are either more advanced
or not commonly used. To see all subcommands, run the command
`vagrant list-commands`. tan@tan-Precision-Tower-:~/env$ vagrant init centos/
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
tan@tan-Precision-Tower-:~/env$ ls
Vagrantfile

env中的vagrantfile就是虚拟环境的配置文件

这里配置的系统是centos/7

开启虚拟机:

由于仅仅配置了系统是centos/7,并未实际安装, 第一次开启时,找不到centos/7

tan@tan-Precision-Tower-:~/env$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'centos/7' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >=
==> default: Loading metadata for box 'centos/7'
default: URL: https://vagrantcloud.com/centos/7
==> default: Adding box 'centos/7' (v1804.) for provider: virtualbox
default: Downloading: https://vagrantcloud.com/centos/boxes/7/versions/1804.02/providers/virtualbox.box
default: Progress: 16%

所以现场下载安装.......

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'centos/7' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >=
==> default: Loading metadata for box 'centos/7'
default: URL: https://vagrantcloud.com/centos/7
==> default: Adding box 'centos/7' (v1804.) for provider: virtualbox
default: Downloading: https://vagrantcloud.com/centos/boxes/7/versions/1804.02/providers/virtualbox.box
==> default: Successfully added box 'centos/7' (v1804.) for 'virtualbox'!
==> default: Importing base box 'centos/7'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'centos/7' is up to date...
==> default: Setting the name of the VM: env_default_1532934316119_87902
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter : nat
==> default: Forwarding ports...
default: (guest) => (host) (adapter )
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:
default: SSH username: vagrant
default: SSH auth method: private key
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: No guest additions were detected on the base box for this VM! Guest
default: additions are required for forwarded ports, shared folders, host only
default: networking, and more. If SSH fails on this machine, please install
default: the guest additions and repackage the box to continue.
default:
default: This is not an error message; everything may continue to work properly,
default: in which case you may ignore this message.
==> default: Rsyncing folder: /home/tan/env/ => /vagrant

安装完成

登录虚拟机......并更新.....

tan@tan-Precision-Tower-:~/env$ vagrant ssh
[vagrant@bogon ~]$ ls
[vagrant@bogon ~]$ sudo yum update
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: mirrors..com
* extras: mirrors.huaweicloud.com
* updates: mirrors.huaweicloud.com
base | 3.6 kB ::
extras | 3.4 kB ::
updates | 3.4 kB ::
(/): extras//x86_64/primary_db | kB ::
(/): base//x86_64/group_gz | kB ::
(/): updates//x86_64/primary_db | 4.3 MB ::
(/): base//x86_64/primary_db | 5.9 MB ::
Resolving Dependencies
--> Running transaction check
---> Package NetworkManager.x86_64 :1.10.-.el7 will be updated
---> Package NetworkManager.x86_64 :1.10.-.el7_5 will be an update
.....................................................................
....................................................

接下来安装jdk1.8

[vagrant@bogon ~]$ sudo yum install java-1.8.-openjdk
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors..com
* extras: mirrors.huaweicloud.com
* updates: mirrors.huaweicloud.com
Resolving Dependencies
--> Running transaction check
---> Package java-1.8.-openjdk.x86_64 :1.8.0.181-.b13.el7_5 will be installed
--> Processing Dependency: java-1.8.-openjdk-headless(x86-) = :1.8.0.181-.b13.el7_5 for package: :java-1.8.-openjdk-1.8.0.181-.b13.el7_5.x86_64
............................................................................................................................................
........................................

安装spark(opt是新建的文件夹,存放下载的东西)

https://archive.apache.org/dist/spark/spark-2.1.1/spark-2.1.1-bin-hadoop2.7.tgz 是官网上spark压缩包的链接地址
[vagrant@bogon ~]$ cd opt
[vagrant@bogon opt]$ curl -O https://archive.apache.org/dist/spark/spark-2.1.1/spark-2.1.1-bin-hadoop2.7.tgz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
191M 191M 129k :: :: --:--:-- 963k

下载完成后解压

[vagrant@bogon opt]$ tar zxvf spark-2.1.-bin-hadoop2..tgz
spark-2.1.-bin-hadoop2./
spark-2.1.-bin-hadoop2./NOTICE
spark-2.1.-bin-hadoop2./jars/
spark-2.1.-bin-hadoop2./jars/bonecp-0.8..RELEASE.jar
spark-2.1.-bin-hadoop2./jars/commons-net-2.2.jar
spark-2.1.-bin-hadoop2./jars/javax.servlet-api-3.1..jar
spark-2.1.-bin-hadoop2./jars/hadoop-annotations-2.7..jar
spark-2.1.-bin-hadoop2./jars/hadoop-hdfs-2.7..jar
spark-2.1.-bin-hadoop2./jars/oro-2.0..jar
...........................................
.........................................
 进入解压的后的文件夹,安装spark
[vagrant@bogon opt]$ cd spark-2.1.-bin-hadoop2./
[vagrant@bogon spark-2.1.-bin-hadoop2.]$ ls
LICENSE NOTICE R README.md RELEASE bin conf data examples jars licenses python sbin yarn
[vagrant@bogon spark-2.1.-bin-hadoop2.]$ bin/pyspark
Python 2.7. (default, Jul , ::)
[GCC 4.8. (Red Hat 4.8.-)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).
// :: WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
// :: WARN ObjectStore: Version information not found in metastore. hive.metastore.schema.verification is not enabled so recording the schema version 1.2.
// :: WARN ObjectStore: Failed to get database default, returning NoSuchObjectException
// :: WARN ObjectStore: Failed to get database global_temp, returning NoSuchObjectException
Welcome to
____ __
/ __/__ ___ _____/ /__
_\ \/ _ \/ _ `/ __/ '_/
/__ / .__/\_,_/_/ /_/\_\ version 2.1.
/_/ Using Python version 2.7. (default, Jul ::)
SparkSession available as 'spark'.
>>>

pyspark安装成功

待续........

 

ubuntu下用vagrant搭建集群环境的更多相关文章

  1. Ubuntu下hadoop2.4搭建集群(单机模式)

    一  .新建用户和用户组 注明:(这个步骤事实上能够不用的.只是单独使用一个不同的用户好一些) 1.新建用户组 sudo addgroup hadoop 2.新建用户 sudo adduser -in ...

  2. linux 下使用 VirtualBox 搭建集群环境

    参考文章: https://www.nakivo.com/blog/virtualbox-network-setting-guide/ https://help.ubuntu.com/lts/serv ...

  3. Linux下Hadoop2.7.3集群环境的搭建

    Linux下Hadoop2.7.3集群环境的搭建 本文旨在提供最基本的,可以用于在生产环境进行Hadoop.HDFS分布式环境的搭建,对自己是个总结和整理,也能方便新人学习使用. 基础环境 JDK的安 ...

  4. Hadoop化繁为简-从安装Linux到搭建集群环境

    简介与环境准备 hadoop的核心是分布式文件系统HDFS以及批处理计算MapReduce.近年,随着大数据.云计算.物联网的兴起,也极大的吸引了我的兴趣,看了网上很多文章,感觉还是云里雾里,很多不必 ...

  5. Hadoop化繁为简(一)-从安装Linux到搭建集群环境

    简介与环境准备 hadoop的核心是分布式文件系统HDFS以及批处理计算MapReduce.近年,随着大数据.云计算.物联网的兴起,也极大的吸引了我的兴趣,看了网上很多文章,感觉还是云里雾里,很多不必 ...

  6. centos6.5环境下zookeeper-3.4.6集群环境部署及单机部署详解

    centos6.5环境下Zookeeper-3.4.6集群环境部署 [系统]Centos 6.5 集群部署 [软件]准备好jdk环境,此次我们的环境是open_jdk1.8.0_101 zookeep ...

  7. (2)虚拟机下hadoop1.1.2集群环境搭建

    hadoop集群环境的搭建和单机版的搭建差点儿相同,就是多了一些文件的配置操作. 一.3台主机的hostname改动和IP地址绑定 注意:以下的操作我都是使用root权限进行! (1)3太主机的基本网 ...

  8. linux下安装 zookeeper-3.4.9并搭建集群环境

    本文主要记录作者在实践过程中实现在centos7环境下安装zookeeper并搭建集群的详细步骤,关于zookeeper本文将不做详细介绍,安装步骤详情如下: 前提准备:3台linux服务器(因为zo ...

  9. CentOS下RabbitMq高可用集群环境搭建

    准备工作 1,准备两台或多台安装有rabbitmq-server服务的服务器 我这里准备了两台,分别如下: 192.168.40.130 rabbitmq01192.168.40.131 rabbit ...

随机推荐

  1. Alyona and a tree CodeForces - 739B (线段树合并)

    大意: 给定有根树, 每个点$x$有权值$a_x$, 对于每个点$x$, 求出$x$子树内所有点$y$, 需要满足$dist(x,y)<=a_y$. 刚开始想错了, 直接打线段树合并了..... ...

  2. SQL SERVER 一组数据按规律横着放置,少则补空,如人员按一进一出的规律,进出为一组,缺少的补null

    假设一组数据:人员进出刷卡数据表[SwingCard] ID MenID Door 1 1 In 2 1 In 3 1 Out 4 1 In 5 1 Out 6 1 Out 想要变成如下:一进一出为一 ...

  3. 【IDEA】【4】遇到的问题

    前言: 1,jar包未导入到项目中 2,报错 cannot resolve symbol 3,左边栏只能看到文件看不到项目结构 4,报错 No valid Maven installation fou ...

  4. React文档(四)渲染元素

    元素是React应用的最小单位. 一个React元素描述了你在屏幕上所看到的东西: const element = <h1>Hello, world</h1>; 和浏览器页面中 ...

  5. UI基础一:简单的BOL查询

    利用标准的BOL编辑工具,添加BOL对象,重写查询方法,实现简答的BOL查询 1.SE11创建查询对象结构: 2.SE11创建查询结果对象: 3.SE24新建处理类: 重写查询结果方法: METHOD ...

  6. vs 2017 Integrated Security 为sspi 含义

    关于sql连接语句中的Integrated Security=SSPI解决方法:即:Security Support Provider Interface设置Integrated Security为 ...

  7. 码云插件Gitee:Couldn't get the list of Gitee repositories

    20:02 Couldn't get the list of Gitee repositories Can't get available repositories Not Found

  8. Redis开发规范

    1.冷热数据分离,不要将所有数据全部都放到Redis中 虽然Redis支持持久化,但是Redis的数据存储全部都是在内存中的,成本昂贵.建议根据业务只将高频热数据存储到Redis中[QPS大于5000 ...

  9. Cppcheck - A tool for static C/C++ code analysis

    cppcheck是一个个检测源码的工具,对编译工具的一个补充,mark Cppcheck - A tool for static C/C++ code analysis Syntax: cppchec ...

  10. 剑指 offer 面试题31 连续子数组的最大和(动态规划)

    求连续子数组的最大和 题目描述 给定一个整形数组,有正数也有负数,数组中连续一个或多个组成一个子数组,求所有子数组的和的最大值,要求时间复杂度为O(n); 测试用例 给定数组 {1,-2,3,10,- ...