How-to Install Erlang on Ubuntu 14.04

how-to Install Erlang on Ubuntu 14.04

What is Erlang

In this tutorial we’ll learn how-to Install Erlang on Ubuntu 14.04. Erlang is a programming language used to build massively scalabe soft real-time systems with requirements on high availability.

Erlang is being used on telecoms and banking, lately it’s also being used on e-commerce, computer telephony and instant messaging service.

Erlang’s runtime system has built-in support for concurrency, distribution and fault tolerance.

One of the startup that [http://highscalability.com/blog/2014/2/26/the-whatsapp-architecture-facebook-bought-for-19-billion.html](use Erlang on its backend) is WhatsApp. Facebook also [https://www.facebook.com/notes/facebook-engineering/facebook-chat/14218138919/](use erlang on Facebook Chat).

You can learn more about Erlang from http://www.erlang.org/
Continue reading

How-to Install and Use pip on Ubuntu 14.04

How-to install and use pip on Ubuntu 14.04

What is pip?

Pip is package management system for Python programming languages. We can use pip to manage software packages written in python. We can search, install, remove many packages that can be found in [https://pypi.python.org/pypi](Python Package Index) (PyPI). In this tutorial we’ll learn how-to install and use pip on Ubuntu 14.04.

Python 2.7.9 or later and Python 3.4 and later already include pip by default. The name pip itself is recursive acronym of pip installs packages or pip install Python.

There are two installation method that we can use, we can install pip from Ubuntu repository or from PyPI.

After installing pip, we’ll learn how-to use pip. By the end of this tutorial you should be able to use pip as part of your daily tools.

Continue reading

How-to Install Apache, MySQL, PHP (LAMP) Stack On Ubuntu 15.04

how-to-install-apache-mysql-php-stack-on-ubuntu-15.04-1

LAMP Stack Overview

LAMP stack is one of the most used application stack that power the web. It consist of Linux as operating systems, Apache as web server, MySQL as Database Server and PHP as the programming language that run the web application.

MySQL can be replaced with MariaDB or PerconaDB, PHP can be repalaced with Perl or Python. Apache itself can be replaced by lighttpd, nginx, or Openlitespeed. But for now we’ll focus on creating LAMP Stack on Ubuntu 15.04.

Continue reading

How-to Install Oracle JDK 7 On Ubuntu 15.04

how-to-install-oracle-jdk-7-on-ubuntu-15.04-1

Overview

Previously we already learn How-to install Oracle JDK 8 on Ubuntu 15.04. Sometimes your application might need older Java version like Java 7.

In this tutorial we’ll learn how to install Java Development Kit version 7 on Ubuntu 15.04

Install Java Development Kit (JDK) 7

We will install Oracle JDK 7 from Webupd8 PPA.

First let’s add webupd8 team PPA repository.

$ sudo add-apt-repository ppa:webupd8team/java
...
Press [ENTER] to continue or ctrl-c to cancel adding it

...
OK

You need to press enter to continue adding the webupd8team PPA repository. I truncate the output above to show you only the most important part.

Next, we’ll update local metadata to include webupd8 repository.

$ sudo apt-get update

Now, we can install Oracle JDK 7.

$ sudo apt-get -y install oracle-java7-installer

Package configuration. Choose OK.

how-to-install-oracle-jdk-7-on-ubuntu-15.04-2

Accepting Oracle Binary Code Lisence Terms. Choose Yes

how-to-install-oracle-jdk-7-on-ubuntu-15.04-3

After installing Java 7, you can check the current java version by running command below :

$ java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

We confirmed that we already have JDK 7 installed.

Setting Up JAVA_HOME

Let’s check first where java installed

$ sudo update-alternatives --config java
There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-7-oracle/jre/bin/java
Nothing to configure.

from the output above we can see that the JAVA_HOME that we need is /usr/lib/jvm/java-7-oracle/jre/

On /etc/environment, add JAVA_HOME on the last line :

JAVA_HOME="/usr/lib/jvm/java-7-oracle/jre/"

Trying Java 7

Create a new file with name HelloWorld.java with contents below :

class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello World From Oracle JDK 7 !");
    }
}

From terminal, run :

$ javac HelloWorld.java

If no error, javac should produce HelloWorld.class. To run this file you can use java

$ java HelloWorld 
Hello World From Oracle JDK 7 !

Summary

We learned how to install Oracle JDK 7 on Ubuntu 15.04, setting up JAVA_HOME environment variable that usually needed by Java based application. We also learned how to compile simple Java app and run it.

How-to Install JDK 8 On Ubuntu 15.04

Oracle JDK 8 on Ubuntu 15.04

Overview

Java comes with two different version, JDK or Java Development Kit where you can develop Java app using these compilation of tools. Another version is JRE or Java Runtime Environment, if you only need to run Java application, you can use this. In this tutorial we’ll learn how to install Java Development Kit version 8 on Ubuntu 15.04.

Install Java Development Kit 8 (JDK 8)

We will install JDK 8 from Webupd8 PPA.

First let’s add webupd8 team PPA repository.

$ sudo add-apt-repository ppa:webupd8team/java
...
Press [ENTER] to continue or ctrl-c to cancel adding it

...
OK

You need to press enter to continue adding the webupd8team PPA repository. I truncate the output above to show you only the most important part.

Next, we’ll update local metadata to include webupd8 repository.

$ sudo apt-get update

Now, we can install Oracle JDK 8.

$ sudo apt-get -y install oracle-java8-installer

Package configuration. Choose OK
how-to-install-jdk-8-on-ubuntu-14.04-1

Accepting Oracle Binary Code Lisence Terms. Choose Yes

how-to-install-jdk-8-on-ubuntu-14.04-2

After installing Java 8, you can check the current java version by running command below :

$ java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

We confirmed that we already have JDK 8 installed.

Setting Up JAVA_HOME

Let’s check first where java installed

sudo update-alternatives --config java
There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-8-oracle/jre/bin/java
Nothing to configure.

from the output above we can see that the JAVA_HOME that we need is /usr/lib/jvm/java-8-oracle/jre/

On /etc/environment, add JAVA_HOME on the last line :

JAVA_HOME="/usr/lib/jvm/java-8-oracle/jre/"

Trying Java

Create a new file with name HelloWorld.java with contents below :

class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

From terminal, run :

$ javac HelloWorld.java

If no error, javac should produce HelloWorld.class. To run this file you can use java

$ java HelloWorld

Summary

We learned how to install JDK 8 on Ubuntu 15.04, setting up JAVA_HOME environment variable that usually needed by Java based application. We also learned how to compile simple Java app and run it.

10 Sites To Check Your DNS Health

Why DNS Health?

Domain Name System or DNS is a global hierarchical distributed naming system for computer and or services. This service translate domain name to IP Address. For example, google.com to 74.125.68.102.

DNS plays a really important part of our internet precense. When people cannot resolve our domain they cannot view our website and send email to our domain. Not only this but most service is actually depend on domain name for user to access. All of the service will fail if the domain name server is not healthy. It doesn’t mean that the other service is down but users cannot access it normally since it cannot resolve the domain correctly

DNS change is a simple process that actually need planning, for example when you move your website to new server with different IP address you have to change the A record for your website. Before you make the changes, you have to make sure that the time to live (TTL) is as low as possible. In this article we’ll see 10 DNS health checker alternatives that we can use. Their service is mostly similar but some of them provide unique service related to DNS checking

Continue reading

Check Your Site Performance Online

What is Site Performance?

Site performance is a method to measure how fast your site load on desktop and mobile device. Most of the techniques are similar both some are specific to mobile. This method also known as Web Performance Optimization or Website optimization.

Steve Souders coined web performance term around 2004. Long before people optimize website by optimizing the backend apps, optimizing hardware, look for packet loss etc. Web Performace techniques try a different approach where it try to make the site load faster and displayed faster so it will give better experience to user.

Continue reading

The HeartBleed Bug

What is Heartbleed Bug

heartbleed-bugTwo days ago new OpenSSL Security Advisory was released title TLS heartbeat read overrun (CVE-2014-0160) OpenSSL 1.0.1 to 1.0.1f and 1.0.2beta1 are affected. Old version like 0.98 is not affected by this bug. This bug is also known as Heartbleed bug.

Heartbleed bug occur on OpenSSL implementation of the TLS/DTLS (Transport Layer Security Protocol) Heatbeat extension (RFC6520), when exploited it leads to leak of the memory contents from the server to the client and from client to server. The content of this memory could be your private key or any content on your memory including password or another sensitive information.

Security community says this is catastrophic bug because it is worse than not having SSL at all. People can get your SSL keys without a trace of intrusion was happened.

How-to Check for Heartbleed bug

If you have service, website, mail server etc that use SSL you should check. For website, the easiest way is using Online checker by Filippo.io. You can also use the command line version but you’ll need go to use this command line tool.

For IDS you can also use Suricata to check Heartbleed, Bro IDS, Snort (and updated ruleset)

What To Do If My Server Affected By this Bug

  • Update your server OpenSSL package, most operating system shipped with affected OpenSSL version already releae an update. Of course it is a good idea to update all package installed on your server but make sure the update won’t break your application
  • After doing update you should change your SSL Certificate. Reissue SSL certificate might be free or involve some fee, please check your SSL providers. Remember to also change your private key and not only your certificate
  • If you have password on the application, change it, assume that it already been breached

References :

Free eBook: Stopping Zero Day Exploits for Dummies

FREE-DOWNLOAD-Stopping-Zero-Day-Exploits-for-Dummies

Need more reading on Security, this book is for you. Stopping Zero Day Exploits for Dummies :

Zero-day malware attacks and advanced persistent threats (APTs) are growing, serious threats to organizations. Cybercriminal organizations seem to be more motivated (and more skilled) every day. Malware’s advanced evasion techniques are making detection solutions ineffective for preventing infections. Advanced information-stealing malware utilizes ever-advancing techniques for exploiting application vulnerabilities, infecting targeted endpoints, and stealing information.

Most security experts today agree that threat detection is no longer the answer. Traditional detection systems are declining in effectiveness. Anti-malware programs block only a minority of malware. Despite improvements in endpoint deployment tools and patch management processes, most organizations still take weeks or longer to deploy critical security patches. And cybercriminals continually develop new methods for bypassing detection rules.

This book discusses zero-day exploits and additional threats that are used to compromise enterprise endpoints and enable APTs and targeted attacks. It describes a promising new technology called Stateful Application Control, which provides effective yet transparent protection to enterprise endpoints.

Download the ebook here

How-to Configure VMware ESXi 5 SNMP Service

vmware-logo-blogYou might want to monitor your ESXi server host from a monitoring application and need SNMP for it. By default SNMP on VMware ESXi is not enabled and you need to use VMware CLI to enable and configure VMware ESXi5 SNMP. First of all download and install VMware vSphere CLI 5.0

 

 

After installing VMware vSphere CLI you can go to bin directory :

cd "C:\Program Files (x86)\VMware\VMware vSphere CLI\bin\"

You can show current configuration with

vicfg-snmp.pl --server [hostname or ip address] --username [username] --password [password] --show

Things inside square braces is the one thay you have to change like hostname or ipaddress, username and password. if you don’t want to show password there just omit the –password. It will prompt you for password everytime you execute a command. For example for command above you can use

vicfg-snmp.pl --server [hostname or ip address] --username [username] --show

Now let’s create community name for VMware ESXi 5 SNMP:

vicfg-snmp.pl --server [hostname] --username [username] --password [password] -c [communityName]

Now create trap to our monitoring server. The command below, we send trap from ESXi host.example.com to monitoring host target.example.com using port 162 on monitoring server and using secretCommunity as communityName

vicfg-snmp.pl --server [host.example.com] --username root --password password -t [[email protected]/secretCommunity]

Don’t forget to enable snmp service on the host. The hostname here is ESXi host not monitoring server.

vicfg-snmp.pl --server [hostname] --username [username] --enable

You can verify your configuration using

vicfg-snmp.pl --server [hostname or ip address] --username [username] --password [password] --show

To test sending trap you can use

vicfg-snmp.pl --server [hostname or ip address] --username [username] --password [password] --test

You can find further information regarding VMware ESXi 5 SNMP configuration on KB 1008065. Hope this help. See ya!

[Infographic] The Evolution of iPhone

Via : audiencebloom

How-to remove languages on simpleSAMLphp

simplesamlphp-s

By default simpleSAMLphp show all language available on web interface, simple but cluttering the web interface, at least that’s what I think. To show only several language, you can use method below.

  • open config.php on config folder. If your simplesamlphp apps located on /var/simplesamlphp then the config file will be on /var/simplesamlphp/config/config.php.

  • find lines below :

'language.available'  => array('en', 'no', 'nn', 'se', 'da', 'de', 'sv', 'fi', 'es', 'fr', 'it', 'nl', 'lb', 'cs', 'sl', 'lt', 'hr', 'hu', 'pl', 'pt', 'pt-br', 'tr', 'ja', 'zh', 'zh-tw', 'ru', 'et', 'he', 'id'),
'language.rtl'                => array('ar','dv','fa','ur','he'),

Lines above is to configure what languages available and what right-to-left(rtl) language available. For example, I only want to display English and Indonesian language, so I edit the ‘language.available’ line to contain only en and id, I also comment the ‘language.rtl’ line so that these languages won’t be showed.

'language.available' => array('en','id'),
//'language.rtl'                => array('ar','dv','fa','ur','he'),

References

Hope this help. Cheers