Skip to content

Instantly share code, notes, and snippets.

@idimopoulos
Last active May 16, 2017 19:17
Show Gist options
  • Save idimopoulos/a0a465f1e7ab52d4239826797ff50a3d to your computer and use it in GitHub Desktop.
Save idimopoulos/a0a465f1e7ab52d4239826797ff50a3d to your computer and use it in GitHub Desktop.
# Instructions to setup Hortonworks hadoop server and rstudio.
## Login as su
```
sudo su
```
## Setup java
```
add-apt-repository ppa:webupd8team/java
apt update
apt install oracle-java8-installer
apt install oracle-java8-set-default
javac -version
```
### Set java home (optional)
Run `sudo update-alternatives --config java` to find java home.
Edit `/etc/environment` and add the following line to the end of the file:
```
JAVA_HOME="path-to-java-home"
```
Alternatively run
```
echo 'JAVA_HOME="path-to-java-home" > /etc/environment
```
e.g. `echo 'JAVA_HOME="/usr/lib/jvm/java-8-oracle/jre/bin/java" > /etc/environment`
### Passwordless commands
For automatic installation through the Ambari service, the
user needs to run sudo commands without password request.
Edit `/etc/sudoers` and add the following line in the end
of the file:
```
ALL ALL=(ALL) NOPASSWD: ALL
```
This will allow all sudoers to run sudo without the request of passwords.
In case you want only your user to have this ability, change
the first 'ALL' with the user name.
For testing environments it can be fine to put this until all setup
are done.
### Disable hugepages
```
apt install -y hugepages
hugeadm --thp-never
```
### Setup chrony
Chrony is the corresponding ntpd service for Ubuntu 16.
It is needed for time synchronization between multiple nodes.
To install chrony, simply run
```
apt install chrony
```
### Setup Ambari
Ambari is a management service by Apache to enable easy deploy
of a hadoop cluster.
Add the repository.
```
wget --output-document=/etc/apt/sources.list.d/ambari.list http://public-repo-1.hortonworks.com/ambari/ubuntu16/2.x/updates/2.5.0.3/ambari.list
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com B9733A7A07513CAD
apt update
apt install ambari-server
```
Run `ambari-server setup` to setup basic settings. Most possibly you will not
need to change anything.
Finally, to start ambari-server, run
```
ambari-server start
```
To access Ambari, go to `http://{ambari-server-hostname}:8080`
Default credentials are
```
Username: admin
Password: admin
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment