plasma_install.sh
Here we show how to build and install Plasma on an Ubuntu Natty system.
The script plasma_install.sh
is downloaded and run. There are a few
user interactions at the beginning of the script, but the lengthy rest
is done automatically.
The script is run as the user who will be the file owner of the installed files. There is no need to become root beforehand - however, have the root password at hand, because a section of the script is executed as root.
The current version of the script installs always the latest and greatest version of Plasma.
plasma_install.sh
~/tmp$ wget 'http://download.camlcity.org/download/plasma_install.sh'
--2012-01-17 22:59:29-- http://download.camlcity.org/download/plasma_install.s
h
Resolving download.camlcity.org... 88.198.0.245
Connecting to download.camlcity.org|88.198.0.245|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11796 (12K) [application/x-sh]
Saving to: `plasma_install.sh'
100%[=====================================>] 11,796 --.-K/s in 0.05s
2012-01-17 22:59:29 (253 KB/s) - `plasma_install.sh' saved [11796/11796]
Of course, you can use any other download method.
plasma_install.sh
We run here the script without arguments, which just selects defaults
for some behaviors. The possible options are displayed with -help
:
~/tmp$ sh plasma_install.sh -help
usage: plasma_install.sh [options]...
List of options:
-root <path> Install into this path (default: /opt/plasma)
-os (debian|redhat|suse) Assume this OS (default: auto-detected)
-su Use "su" to become root
-sudo Use "sudo" to become root
-ssh Use "ssh root@localhost" to become root
-noroot Skip root stuff
-namenode Only install packages for namenode
-datanode Only install packages for datanode
-build Build
As you see, you can especially change the prefix where plasma will be installed, and the method how to become root.
The switches -namenode
and -datanode
are discussed below. The
default is -build
.
Now, run it:
~/tmp$ sh plasma_install.sh
*******************************************************************
* Doing as root: installing packages, preparing /opt/plasma
*******************************************************************
Method to become root: sudo
(if this does not work for you, restart the script with the
right option: -su, -sudo, or -ssh)
[sudo] password for gerd:
It immediately enters the section where it needs the root password. This is done here to check and install OS packages that are required as prerequisites.
Here the package check is done for an Ubuntu system. It also works for Red Hat and SuSE systems (and some derived systems).
Reading package lists... 0%
Reading package lists... Done
Building dependency tree... 0%
Building dependency tree
Reading state information... 0%
Reading state information... Done
build-essential is already the newest version.
gzip is already the newest version.
libpcre3-dev is already the newest version.
m4 is already the newest version.
patch is already the newest version.
patch set to manually installed.
wget is already the newest version.
wget set to manually installed.
bzip2 is already the newest version.
The following package was automatically installed and is no longer required:
wine1.2-gecko
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libpq5
The following packages will be upgraded:
libpq-dev libpq5
2 upgraded, 0 newly installed, 0 to remove and 25 not upgraded.
Need to get 290 kB of archives.
After this operation, 4096 B of additional disk space will be used.
Do you want to continue [Y/n]? Y
The script has found that two OS packages are missing (libpq-dev and libpq5). Enter Y and press enter to continue.
[Connecting to de.archive.ubuntu.com
Get:1 http://de.archive.ubuntu.com/ubuntu/ natty-updates/main libpq-dev amd64 8.4.10-0ubuntu0.11.04.1 [202 kB]
Get:2 http://de.archive.ubuntu.com/ubuntu/ natty-updates/main libpq5 amd64 8.4.10-0ubuntu0.11.04.1 [87.9 kB]
Fetched 290 kB in 5s (49.8 kB/s)
(Reading database ... 188920 files and directories currently installed.)
Preparing to replace libpq-dev 8.4.9-0ubuntu0.11.04 (using .../libpq-dev_8.4.10-0ubuntu0.11.04.1_amd64.deb) ...
Unpacking replacement libpq-dev ...
Preparing to replace libpq5 8.4.9-0ubuntu0.11.04 (using .../libpq5_8.4.10-0ubuntu0.11.04.1_amd64.deb) ...
Unpacking replacement libpq5 ...
Processing triggers for man-db ...
Setting up libpq5 (8.4.10-0ubuntu0.11.04.1) ...
Setting up libpq-dev (8.4.10-0ubuntu0.11.04.1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
At this point the root section ends. There will no more user interactions.
Now the GODI system will be bootstrapped.
*******************************************************************
* Using /tmp/plasmainstall.24200 for bootstrapping GODI
*******************************************************************
--2012-01-17 23:00:25-- http://download.camlcity.org/download/godi-rocketboost
-20091222.tar.gz
Resolving download.camlcity.org... 88.198.0.245
Connecting to download.camlcity.org|88.198.0.245|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2402831 (2.3M) [application/x-tar]
Saving to: `godi-rocketboost-20091222.tar.gz'
2012-01-17 23:00:28 (686 KB/s) - `godi-rocketboost-20091222.tar.gz' saved [2402831/2402831]
*** Welcome to GODI, the O'Caml source distribution
*** RocketBoost bootstrap
GODI has been created by Gerd Stolpmann (mailto: gerd@gerd-stolpmann.de),
and is derived from the NetBSD pkgsrc system.
A number of packaging tools are now compiled and/or installed. Messages
are written to bootstrap.log.
Configuring make framework:
Looking up system commands...
/usr/bin/patch works fine
/usr/bin/patch can make backups with -V simple -b -z
/usr/bin/patch can remove empty files with -E
/usr/bin/patch can reject reverse patches with -N
/usr/bin/patch can be silent with -s
Selected release: 3.12
Installing into: /opt/plasma/.
Press [Return] to begin with the installation; press [CTRL-C] to abort.
> ===> Creating sample godi.conf
===> Building ocamlrun
===> Installing preliminary version of godi_console
===> Installing preliminary version of the make framework (godi-tools)
Bootstrap was successful!
Please remember to add
/opt/plasma/./bin
and
/opt/plasma/./sbin
to your PATH environment variable.
If necessary, please remember to add
/opt/plasma/./man
to your MANPATH environment variable.
An example godi.conf file has been created for you in the current
directory, and it has been installed in /opt/plasma/./etc.
Selected GODI section: 3.12
(to change this, edit /opt/plasma/./etc/godi.conf)
It is now recommended to start bootstrap_stage2 to download and
install a minimum set of packages. For more information, see the
file README.
2012-01-17 23:01:15 URL:http://www.ocaml-programming.de/godi-build/3.12/available.new [5922/5922] -> "/tmp/godi25936-0/0/available.new" [1]
Many messages like this will follow.
===> Updating build instructions of godi-ott-0.20.3
2012-01-17 23:02:35 URL:http://www.ocaml-programming.de/godi-build/3.12/godi-ott-0.20.3.build.tgz [2048/2048] -> "/tmp/godi25936-0/235/godi-ott-0.20.3.build.tgz" [1]
*** Starting with conf-pcre
### Fetching conf-pcre (if necessary)
### Building conf-pcre
===> Cleaning for conf-pcre-6
=> No checksum file.
===> Extracting for conf-pcre-6
/bin/mkdir -p /opt/plasma/build/conf/conf-pcre/work/pseudo
mkdir -p /opt/plasma/build/conf/conf-pcre/work/pseudo
cp files/configure files/Makefile /opt/plasma/build/conf/conf-pcre/work/pseudo
===> Patching for conf-pcre-6
===> Configuring for conf-pcre-6
Checking /usr...
*** Effective PCRE configuration:
*** Directory for include file (pcre.h): /usr/include
*** Libraries (-lpcre): /usr/lib
*** Needs RPATH: no
*** Additional dependencies: none
===> Building for conf-pcre-6
===> Installing for conf-pcre-6
mkdir -p /opt/plasma/./lib/godi
cp /opt/plasma/build/conf/conf-pcre/work/pseudo/conf-pcre.mk /opt/plasma/./lib/godi
===> Registering installation for conf-pcre-6
===> Packaging conf-pcre-6
===> Building binary package for conf-pcre-6
Wrote /opt/plasma/build/packages/All/conf-pcre-6.tgz
===> Cleaning for conf-pcre-6
*** Successful with conf-pcre
### Fetching godi-ocaml-src (if necessary)
=> ocaml-3.12.1.tar.gz doesn't seem to exist on this system.
=> Attempting to fetch ocaml-3.12.1.tar.gz from http://caml.inria.fr/distrib/ocaml-3.12/.
=> [3660473 bytes]
2012-01-17 23:03:12 URL:http://caml.inria.fr/distrib/ocaml-3.12/ocaml-3.12.1.tar.gz [3660473/3660473] -> "/tmp/godi26905-0/0/ocaml-3.12.1.tar.gz" [1]
A number of additional downloads will follow.
### Package godi-tools-0 cannot be removed, skipping
### Building godi-ocaml-src
===> Cleaning for godi-ocaml-src-3.12.1godi2
=> Checksum OK for ocaml-3.12.1.tar.gz.
===> Extracting for godi-ocaml-src-3.12.1godi2
/bin/mkdir -p /opt/plasma/build/godi/godi-ocaml-src/work/ocaml-3.12.1
===> Patching for godi-ocaml-src-3.12.1godi2
===> Applying pkgsrc patches for godi-ocaml-src-3.12.1godi2
===> Configuring for godi-ocaml-src-3.12.1godi2
/bin/cp files/Makefile.godi /opt/plasma/build/godi/godi-ocaml-src/work/ocaml-3.12.1
echo "DISTNAME=ocaml-3.12.1" >>/opt/plasma/build/godi/godi-ocaml-src/work/ocaml-3.12.1/Makefile.godi
echo "PREFIX=/opt/plasma/." >>/opt/plasma/build/godi/godi-ocaml-src/work/ocaml-3.12.1/Makefile.godi
echo "LOCALBASE=/opt/plasma/." >>/opt/plasma/build/godi/godi-ocaml-src/work/ocaml-3.12.1/Makefile.godi
At the point the build of the Ocaml compiler starts.
Configuring for a x86_64-unknown-linux-gnu ...
The C compiler is ANSI-compliant.
Checking the sizes of integers and pointers...
Wow! A 64 bit architecture!
Many many lines are output here.
cd "/opt/plasma/build/godi/godi-ocaml/work/stage" && /opt/plasma/./bin/godi_pax
-rw -pp . /opt/plasma/.
===> Registering installation for godi-ocaml-3.12.1godi2
Fixing symlink /opt/plasma/./etc/ld.conf
===> Packaging godi-ocaml-3.12.1godi2
===> Building binary package for godi-ocaml-3.12.1godi2
Wrote /opt/plasma/build/packages/All/godi-ocaml-3.12.1godi2.tgz
===> Cleaning for godi-ocaml-3.12.1godi2
Now a number of add-on software packages for Ocaml follow. We abbreviate here:
### Building godi-findlib
...
### Building godi-core-mk
...
### Building godi-cryptgps
...
### Building godi-ocamlmakefile
...
### Building godi-pcre
...
### Building godi-ocamlnet
...
### Building godi-tools
...
*** GODI bootstrap stage 2 has been successfully completed.
A very minimum set of packages has been installed.
You can now start the tool godi_console to build further
packages. This tools has a curses-based user interface, and
is self-explanatory (type 'h' to get the help screen).
To get at least the libraries coming with the official
O'Caml distribution, just install godi-ocaml-all.
Thank you for using GODI.
Ok, these are the prerequisites. Now there is Plasma itself.
*******************************************************************
* Installing Plasma
*******************************************************************
...
===> Registering installation for godi-plasma-0.5.2
===> Packaging godi-plasma-0.5.2
===> Building binary package for godi-plasma-0.5.2
Wrote /opt/plasma/build/packages/All/godi-plasma-0.5.2.tgz
===> Cleaning for godi-plasma-0.5.2
*******************************************************************
* Done with Plasma build
* Plasma root: /opt/plasma
*******************************************************************
plasma_install.sh
with -namenode
and -datanode
These two options change the effect of the script: Instead of building the Plasma software, only the required OS packages are installed that should exist on a PlasmaFS namenode or datanode, respectively. So you should run this script on all such nodes.
In case of the namenode, this especially means the PostgreSQL database system is installed. The script checks also some aspects of the configuration:
postgresql.conf
should include a line for
max_prepared_transactions
with a value of at least 5.