Install Android Studio 2 on Apricity Linux

I want to reinstall android studio on my apricity linux box and as always I need to write the process for my future reference.

Android Studio 2

I use yaourt :

yaourt -S android-studio

note : same command also work for upgrade Android Studio to newer version

Java in Apricity

By default android studio will install openjdk 7 so I ended with 3 version of Java after install Oracle JDK :

yaourt -S jdk

ls /usr/lib/jvm

default  default-runtime  java-7-openjdk  java-8-jdk  java-8-openjdk

Make Oracle JDK for Android Studio as it always give me warning :


“System Health
OpenJDK shows intermittent performance and UI issues. We recommend using the Oracle JRE/JDK.”

Set environment :

sudo nano /etc/environment

and this line :


save. For more detail explanation of switching you can refer to this.

Update :

Java Compiler aka javac

I just realized that javac command return an error :

javac -version

zsh: command not found: javac

Woot 🙂

ls -al /usr/bin | grep javac

lrwxrwxrwx 1 root root 30 Nov 2 2014 javac -> /usr/lib/jvm/default/bin/javac

quick resolv :

sudo rm /usr/bin/javac

sudo ln -s /usr/lib/jvm/java-8-jdk/bin/javac /usr/bin/javac

Testing javac version

javac -version

javac 1.8.0_102

Fix Java Version error message

For this error message :

Error:Buildtools 24.0.1 requires Java 1.8 or above.  Current JDK version is 1.7.

Open File -> Project Structure -> Locate for JDK 8 and hit OK button


Tuning Android Studio Memory Usage

I have 8 GB memory but still need to optimize performance of Android Studio

Click Help -> Edit Custom VM options, click Yes.


I change my minimum and maximum memory into these numbers :


Setting New PHP Development with Apricity OS & VirtualBox : Part 4 – Connecting Shared Folder, Setting PHP-FPM and Nginx


Host Activities

Create document root folder

In last post I already write about PHP installation in Ubuntu 14.04 LTS server 32 bit. All those PHP must have their own place and I already create the folders in VirtualBox Host (Apricity OS) within public_html folder :

php52; for location of testing on php 5.2.17

php53; for location of testing on php 5.3.29

php54; for location of testing on php 5.4.33

php55; for location of testing on php 5.5.34

php56; location of testing on php 5.6.20

php70; location of testing on php 7.0.5

Each folder already has file info.php with this code :




Continue reading

Setting New PHP Development with Apricity OS & VirtualBox : Part 3 – Install PHP 5.2, 5.3, 5.4, 5.5, 5.6 and 7.0 on single Ubuntu Server 14.04 LTS 32 bit

The application sholud be work on PHP 5 is no longer relevant term for my team. Client use more precision term like PHP 5.2.17, PHP 5.3.3 etc. Its insane to support checking all those claim. The only ‘fair’ play assumption is testing it with more common version. Like PHP 5.2 I decide to use latest version of 5.2 family like 5.2.17.

In this post I try to retry available post that already use same approach but using Ubuntu Server 16.04 LTS that use 64 bit architecture while I use 32 bit Ubuntu 14.04 server for this case.

The Plan

List of Supported PHP version in this post including from  museum are :

5.2 -> 5.2.17

5.3 -> 5.3.29

5.4 -> 5.4.33

5.5 -> 5.5.34

5.6 -> 5.6.20

7.0 -> 7.0.5

Those PHP version will be install in single VM that tun Ubuntu 14.04 server with memory 1GB. In case the memory not fit the process then I can add it easily 🙂


Install base package and friends

sudo apt-get install -y nginx git autoconf lynx wget build-essential libxml2-dev libssl-dev libbz2-dev libcurl4-openssl-dev  libpng12-dev libfreetype6-dev libxpm-dev libmcrypt-dev libmhash-dev libmysqlclient-dev libjpeg62-dev freetds-dev libjson-c-dev re2c

Setting Local Environment on Ubuntu 14.04 Server

sudo nano /etc/environment

Add these lines :


save. Continue reading

Setting New PHP Development with Apricity OS & VirtualBox : Part 2 – Install and Configure Ubuntu Server 14.04 LTS Guest

In last section I already write about setting VirtualBox for initial preparation. This time I’ll continue with Ubuntu Server 14.04 LTS install.

In this section nothing new beside next and next. One thing I need to use in install the server is only use OpenSSH server when server prompt available package during install.

For Part 1, click here.

Configuration Ubuntu Server 14.04 LTS

To continue with configuration step I prefer to do it from terminal. Open terminal from Apricity OS and type :

ssh [email protected] -p 2222

note : ubuntu is username that I use for my installation and server 123456.

Port 2222 is port that I use for port forwarding.

Like this one.

ssh [email protected] -p 2222

[email protected]’s password:
Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 4.2.0-27-generic i686) Continue reading

Setting New PHP Development with Apricity OS & VirtualBox : Part 1 – Setting VirtualBox

My latest post was about Apricity OS. This OS continue to surprise me with its ‘archlinux’ blood 🙂 . Getting new update every day is good for my general requirement but not suitable for my job in programming. I need php environment that stable and also support all old php version that our team ever made (I can share it to my team easily).

In short I need mutiple php support with these requirements :

  1. Minimum dependency
  2. Using Ubuntu or CentOS
  3. I can code in Apricity OS and see the result in other machine (point 2).

All those factors fit with Virtualbox. I just need to install Virtualbox (I use version 5.0.16) in Apricity (host) and install Ubuntu LTS (14.04 or 16.04) as guest.

Setting VirtualBox Guest in Apricity OS

VirtualBox already installed in last post. The plan for VirtualBox new guest :

  1. Set 2 card for NAT and Host Only
  2. Create fix hard disk with VDI type (50GB)
  3. Use Ubuntu server 14.04 LTS (32 bit for lower resource).
  4. 1 GB memory assignment

Picture of 2 card on VirtualBox


Adapter 1 -> NAT Continue reading