Wednesday 17 September 2014

How to configure Linux for DataStax Enterpise


   This article is about configuration Ubuntu (Linux) for DataStax Enetrpise. DataStax Enterprise is a big data platform built on Apache Cassandra that manages real-time, analytics, and enterprise search data. DataStax Enterprise leverages Cassandra, Apache Hadoop, and Apache Solr to shift focus from the data infrastructure to using data strategically.
   For a Ubuntu (Linux) configuration for DataStax Enetrpise we need to install: OpenSSH server, Java, JCE, curl. Also, we should set static IP address and hostname, making it easier to identify resources on a network. The following section will explain how to properly configure system for name resolution using DNS, static hostname records and install the necessary software.

   

1.        SSH server installation

   SSH is a method of securely communicating with another computer via connection encrypted. This means if a third party tries to intercept the information being transferred, it would appear scrambled and unreadable.

1.1   Install OpenSSH server:

$sudo apt-get update
$sudo apt-get install openssh-server

1.2   First, make a backup of your sshd_config file by copying it to your home directory, or by making a read-only copy in /etc/ssh by doing:

$ sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.factory-defaults
$ sudo chmod a-w /etc/ssh/sshd_config.factory-defaults

1.3   Restart ssh:

$ sudo restart ssh

       More information: ssh installation

2.        Java installation

       Java is a technology originally developed by Sun Microsystems, and acquired by Oracle. Oracle Java is the proprietary, reference implementation for Java.

2.1   Before you install it, remove OpenJDK, if you have it installed:

$ sudo apt-get purge openjdk* 

2.2   Add the PPA:

$ sudo add-apt-repository ppa:webupd8team/java

2.3   Update the repo index:

$ sudo apt-get update

2.4   Install Java:

$ sudo apt-get install oracle-java7-installer  

     
More information: Installation Java

3.        JCE installation

The Java Cryptography Extension (JCE) is an officially released Standard Extension to the Java Platform. JCE provides a framework and implementation for encryption, key generation and key agreement, and Message Authentication Code (MAC) algorithms. JCE supplements the Java platform, which already includes interfaces and implementations of message digests and digital signatures.

3.1   Go to the Oracle Java SE download page http://www.oracle.com/technetwork/java/javase/downloads/index.html
3.2   After scrolling down, under "Additional Resources" section you will find "Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy File"
3.3   Download the version that matches your installed JVM E.g. UnlimitedJCEPolicyJDK7.zip
3.4   Unzip the downloaded zip
3.5   Copy local_policy.jar and US_export_policy.jar to the $JAVA_HOME/jre/lib/security (Note: these jars will be already there so you have to overwrite them)
3.6   Then restart your application to get rid of this exception.

        More Information: how to install java cryptography

4.        Curl installation

Curl is a command line tool for transferring data with URL syntax.

4.1   Install curl:

$sudo apt-get update
$sudo apt-get install curl

5.        Set hostname 

5.1   Change hostname:

$ sudo hostname your-new-name

For example we are using:

$ sudo hostname LinuxCCM

5.2   Edit file etc/hosts

$ sudo gedit /etc/hosts

and write down your hostname to the appropriate line:

127.0.1.1 your-old-hostname

Confirm settings:

sudo /etc/init.d/hostname.sh start

6.        Configure network settings 

6.1   If you want set static address on ubuntu go to:

         System -> Preferences -> Network Connections -> select Auto eth0 -> Edit -> select IPv4 Settings tab -> select Method: Manual -> Add (we using Adress:192.168.1.1 Netmask:255.255.255.0 Gateway: 0.0.0.0 DNS server 192.168.1.200 Search domains: cognet.local)


If you have Ubuntu 12.04 or later:
a.       Edit the interfaces file:

sudo /etc/init.d/hostname.sh start
$sudo nano /etc/network/interfaces

1 Example /etc/network/interfaces file

b.  Remove the /etc/resolv.conf

$sudo rm –r /etc/resolv.conf

c.  Create a new /etc/resolv.conf fil

$sudo nano /etc/resolv.conf


 2 Example /etc/resolv.conf file

$sudo chattr +i /etc/resolv.conf

   with this +i flag, even the root can't touch this file. But if you want to change the nameserver, this can be done by changing:

sudo chattr -i /etc/resolv.conf

    then add your new nameserver.

6.2   If you use virtual machine

6.2.1   Set Network Adapter on Bridged (as in the image below)

3 Virtual machine settings

6.2.2   Set static IP on adapter VM:

       Control Panel -> Network and Internet -> Network and Sharing Center -> select Connections: for example: VMvare Network adapter VMnet1 -> Properties -> TCP/IPv4 -> Properties -> select “Use the following IP address: (we using: IP address: 192.168.1.100 subnetmask:255.255.255.0)

4 Network settings

6.3   Check the correctness of the settings (using program nslookup)

 6.3.1   Run command line (ctrl + alt + T)
 6.3.2   Type nslookup name_server (for example: nslookup cogserver02)

5 result nslookup






Cognitum cooperates with Microsoft under prestigious Azure Circle program, where technology partners are invited with experience in Windows Azure. It provides IT solutions in the area of Cloud and BigData for customers both in Poland and abroad.
Cognitum is also a partner of DataStax, a major Cassandra vendor that provides worldwide training for Cassandra and Enterprise level appliances: DataStax Enterprise combining Cassandra, Hadoop, Hive, Solr into single solution. 

1 comment:

  1. Success at the workplace is a key concern for workers in an organization. tunnel rush

    ReplyDelete