Basics of Virtual Box & Linux
VirtualBox
VirtualBox
is a cross-platform virtualization application. What does that mean? For one
thing, it installs on your existing Intel or AMD-based computers, whether they
are running Windows, Mac, Linux or Solaris operating systems. Secondly, it
extends the capabilities of your existing computer so that it can run multiple
operating systems (inside multiple virtual machines) at the same time. So, for
example, you can run Windows and Linux on your Mac, run Windows Server 2008 on
your Linux server, run Linux on your Windows PC, and so on, all alongside your
existing applications. You can install and run as many virtual machines as you
like -- the only practical limits are disk space and memory.
VirtualBox
is deceptively simple yet also very powerful. It can run everywhere from small
embedded systems or desktop class machines all the way up to datacenter
deployments and even Cloud environments.
Install Virtual Box
Download
VirtualBox. VirtualBox from Oracle
is available for free from the developer's website. Make sure that you download
the correct version for your operating system.
There are multiple choices for Linux
versions. Choose the package that matches your Linux distribution, or use the
"All distributions" option if your Linux distribution is not listed
Install the
VirtualBox program. If
you are using Windows, double-click the setup file and follow the prompts to
install. If you are using a Mac, open the DMG file that you downloaded and drag
the VirtualBox file to your Applications folder.
During the Windows installation,
keep all of the options set to their default.
Start the program. VirtualBox allows you to manage your various virtual
machines, and easily create new ones. You can run VirtualBox directly from the
installation program, or you can start it from the desktop icon.
Because
that's what it was developed on and there are many places in the code (at
least, until recently) that assumed it was running on Linux (specifically,
RHEL/CentOS). Furthermore, that's what all of the leading
vendor distributions support.
Bottom line is that from a production standpoint, it mind-bogglingly stupid to try and use an unsupported operating system for any critical piece of infrastructure. Managing a Hadoop cluster gives you enough headaches without intentionally inflicting additional pain upon yourself. Running a different OS has a huge amount of risk for virtually zero reward.
Why Linux?
One of the most confusing things for
the newcomer to Linux is how many distributions, or versions, of the operating
system there are. Ubuntu is the one most people have heard of, but there are
hundreds of others as well, each offering some variant on the basic Linux
theme.
Choosing the distribution--or
"distro"--that's right for your business will depend in large part
on five key factors, as I've already described. It's also helpful,
however, to have a basic understanding of how the major Linux distros differ.
Different flavors of Linux
What follows, then, is a roundup of
sorts of the top 10 Linux distributions today.
1. Ubuntu
Yes, Ubuntu has become the poster
child for Linux these days, and no wonder--it's the most popular distro by far,
garnering more than 2,200 hits per day on the Distrowatch site alone, compared
with some 1,400 for Fedora, the No. 2 contender.
Ubuntu is actually a relatively late
arrival on the Linux scene, having been announced in just 2004, but it's more
than made up for that shorter history. Founded by South African millionaire
Mark Shuttleworth, Canonical--the company behind Ubuntu--for many years shipped
Ubuntu CDs to interested users for free, thus speeding its market penetration.
Ubuntu is based on Debian (see
below) and includes well-known apps such as Firefox and OpenOffice.org.
It has a predictable, six-month release schedule, with occasional Long Term
Support (LTS) versions that are supported with security updates for three to
five years.
Ubuntu is also
notable for its ease of use and its inclusion of a migration assistant for
Windows users and support for the latest technologies. Version 10.10 of
Ubuntu--also known as Maverick Meerkat--will include a multitouch and gesture stack. The
final iteration of that version is due out next month.
It's also worth understanding that
Ubuntu is available in various remixes and spin-off sub-distros targeted at
specific niches, such as Kubuntu, Xubuntu and Lubuntu. Most of these differ
primarily by offering a desktop environment other than Ubuntu's standard GNOME.
2. Fedora
Fedora is the free version of Red
Hat, whose RHEL (Red Hat Enterprise Linux) has been a commercial product
since 2003. Because of that close connection, Fedora is particularly strong on
enterprise features, and it often offers them before RHEL does.
Fedora also offers a six-month
release schedule, and its security features are excellent.
While some have viewed it as a cutting-edge distro for the Linux
"hobbyist," I think improvements over the years and widespread
popularity have combined to make it a good choice for newer Linux users as
well.
3. Linux Mint
Currently in Distrowatch's third
spot in popularity, Linux Mint is an Ubuntu-based distro that was just launched
in 2006. The operating system adds to Ubuntu with its own, distinct desktop
theme and a different set of applications; also unique to the distro are a
variety of graphical tools for enhanced usability, such as mintDesktop
for configuring the desktop environment, mintInstall for easier software
installation and mintMenu for easier navigation.
Mint enjoys a well-deserved
reputation for ease of use, so it's another good one for beginning users. It
also includes some proprietary multimedia codecs that are often absent from
larger distributions, thereby enhancing its hardware compatibility. Mint
doesn't have a fixed release schedule, but typically a new version comes out
shortly after each stable Ubuntu release.
4. openSUSE
With some 1,200 hits per day on
Distrowatch, openSUSE holds the No. 4 spot in popularity on the site and is
also the foundation for Novell's SUSE Linux Enterprise Desktop and SUSE Linux
Enterprise Server products.
The package's administration
utility, YaST, is widely acknowledged as one of the best, and its boxed edition
comes with some of the best printed documentation you'll find for any distro.
I'd say openSUSE rates a "medium" on difficulty level.
5. PCLinuxOS
Rather than GNOME, PCLinuxOS uses
the KDE desktop
environment and is essentially a lighter-weight version of Mandriva (see
below). With good support for graphics drivers, browser plugins and media
codecs, PCLinuxOS can be a good choice for beginners. Its release cycle can be
erratic, though, and there is also no 64-bit version of the software.
6. Debian
Dating back to 1993, Debian is
currently known as one of the most well-tested and bug-free distros available
today. Though it serves as the foundation for Ubuntu, most view Debian as a
distro best-suited for those experienced with Linux. The distro uses all
open-source components, which is a good thing, but means it can be more
difficult to achieve compatibility with proprietary code such as wireless
network drivers. Debian also has a relatively slow release cycle, with stable
ones coming out every one to three years.
7. Mandriva
Formerly known as Mandrake, Mandriva
is notable for its cutting-edge software, excellent administration suite and
64-bit edition. It was also the first major distribution to jump on the netbook
bandwagon with out-of-the box support. Nevertheless, Mandriva has been
struggling lately as a result of some controversial decisions made by its
French maker. It recently restructured, with the result that some view the
future of its community version as uncertain.
8. Sabayon/Gentoo
Italian Sabayon is essentially a
LiveCD version of Gentoo, which is known for allowing users to individually
optimize each component. Both are considered advanced Linux distributions aimed
primarily at experienced users.
9. Arch Linux... plus Slackware
Arch is another package aimed
primarily at experienced users interested in tweaking and optimizing their
systems. Though not in the top 10 currently, Slackware is similarly oriented
toward Linux gurus.
10. Puppy Linux... plus DSL
Last on Distrowatch's top 10
currently is Puppy Linux, a compact distro that's ideal for older hardware and
situations where computing resources are minimal. (Damn Small Linux,
incidentally, is similar.) Though it has a small footprint, Puppy is still
full-featured and includes a variety of configuration and application installation
wizards. The whole OS is small enough to run directly from system RAM, so
applications start quickly and respond to user input instantly.
Unity Shell (Ubuntu UI)
Unity is a graphical shell for the GNOME desktop environment developed by Canonical Ltd. for its Ubuntu operating system. Unity debuted
in the netbook edition of Ubuntu
10.10. It was initially designed to make more efficient use of space given the
limited screen size of netbooks,
including, for example, a vertical application switcher called the launcher, and a space-saving
horizontal multipurpose top
menu bar.
Unlike GNOME, KDE Software Compilation, Xfce, or LXDE, Unity is not a collection of
applications but is designed to use existing programs.
Unity is part of the
Ayatana project, an initiative with the stated intention of improving the user
experience within Ubuntu. In
addition to Unity, there are Application Indicators and other projects such as
MeMenu, the notification system and the application NotifyOSD
gathered.
The Unity user interface consists of several components:
·
Top menu bar –
a multipurpose top bar, saving space, and containing: (1) the menubar of the
currently active application, (2) the capture bar of the main window of the
currently active application including the maximize, minimize and exit buttons,
(3) the session menu including the global system settings, logout, shut
down and similar basic controls, and (4) the diverse global notification
indicators including the time, weather, and the state of the underlying system.
·
Launcher –
a dock that also serves as a window switcher. Multiple instances of
an application are grouped under the same dock icon, with a number of
indicators to the side of the icon showing how many instances are open. The
user has a choice whether or not to lock an application to the launcher. If it
is not locked, an application may be started using the Dash or via a separately
installed menu.
·
Quicklist –
the accessible menu of launcher items.
·
Dash –
an overlay that allows the user to search quickly for information both locally
(installed applications, recent files, bookmarks, etc.) and remotely (Twitter,
Google Docs, etc.) and displays previews of results. The Dash search
feature was the subject of the privacy controversy.
·
Head-up display (HUD) –
introduced with Ubuntu 12.04. It allows hotkey searching
for top menu bar items from the keyboard, without the need for using the mouse,
by pressing and releasing the Alt key.
·
Indicators –
a notification area (similar to an OS X menu extra),
containing displays for the clock, network and battery status, sound volume
etc.
Basic Linux Commands
(enough to get started with Hadoop)
Command
|
Description
|
cat [filename]
|
Display file’s contents to the
standard output device
(usually your monitor). |
cd /directorypath
|
Change to directory.
|
chmod [options] mode filename
|
Change a file’s permissions.
|
chown [options] filename
|
Change who owns a file.
|
clear
|
Clear a command line screen/window
for a fresh start.
|
cp [options] source destination
|
Copy files and directories.
|
date [options]
|
Display or set the system date and
time.
|
df [options]
|
Display used and available disk
space.
|
du [options]
|
Show how much space each file
takes up.
|
file [options] filename
|
Determine what type of data is
within a file.
|
find [pathname] [expression]
|
Search for files matching a
provided pattern.
|
grep [options] pattern [filesname]
|
Search files or output for a particular
pattern.
|
kill [options] pid
|
Stop a process. If the process
refuses to stop, use kill -9 pid.
|
less [options] [filename]
|
View the contents of a file one
page at a time.
|
ln [options] source [destination]
|
Create a shortcut.
|
locate filename
|
Search a copy of your filesystem
for the specified
filename. |
lpr [options]
|
Send a print job.
|
ls [options]
|
List directory contents.
|
man [command]
|
Display the help information for
the specified command.
|
mkdir [options] directory
|
Create a new directory.
|
mv [options] source destination
|
Rename or move file(s) or
directories.
|
passwd [name [password]]
|
Change the password or allow (for
the system administrator) to
change any password. |
ps [options]
|
Display a snapshot of the
currently running processes.
|
pwd
|
Display the pathname for the
current directory.
|
rm [options] directory
|
Remove (delete) file(s) and/or
directories.
|
rmdir [options] directory
|
Delete empty directories.
|
ssh [options] user@machine
|
Remotely log in to another Linux
machine, over the network.
Leave an ssh session by typing exit. |
su [options] [user [arguments]]
|
Switch to another user account.
|
tail [options] [filename]
|
Display the last n lines
of a file (the default is
10). |
tar [options] filename
|
Store and extract files from a
tarfile (.tar) or tarball (.tar.gz or .tgz).
|
top
|
Displays the resources being used
on your system. Press q to
exit. |
touch filename
|
Create an empty file with the
specified name.
|
who [options]
|
Display who is logged on.
|
Comments
Post a Comment