Building and Testing PHP 7 under DragonFlyBSD 4.0.5

DragonFlyBSD 4.0.5 is waiting for me to test it :-) . I love it for several factors :

  • Size; its iso file is light in size (only 200MB + in bz2 form)
  • Learning curve; no need to learn much as I’m familiar with FreeBSD :-)

As I already try PHP7 in FreeBSD before :

  1. Install PHP 7 akan phpng on FreeBSD 10
  2. Using PHP 7 with lighttpd on FreeBSD 10

I want to test it in DragonFly BSD with nginx as web server. This time  I use virtualbox and I try Hammer File system (make sure to have minimum 50 GB in disk size to usse Hammer File System in DragonFly BSD).


With 60 GB in disk size and 2GB memory allocated to this virtual machine I’ll try PHP 7.


Installation step is no different like before.



DHCP for sure :-)


Reboot it and change boot order to get start with next steps :

Login via ssh

$ ssh alam@ -p 2222
The authenticity of host ‘[]:2222 ([]:2222)’ can’t be established.
ECDSA key fingerprint is bd:e0:2a:f5:44:86:8d:5a:cd:2a:56:26:6a:f1:08:ce.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘[]:2222’ (ECDSA) to the list of known hosts.
Permission denied (publickey).

Ups, I forgot to configure ssh server first after as post installation step in DragonFly BSD.

Retry login

$ ssh alam@ -p 2222
alam@’s password:
Last login: Fri Jun 12 11:29:12 2015
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
The Regents of the University of California. All rights reserved.

DragonFly v4.0.5-RELEASE (X86_64_GENERIC) #29: Sun Mar 22 17:42:50 PDT 2015

Welcome to DragonFly!

Need to see the calendar for this month? Simply type “cal”. To see the
whole year, type “cal -y”.
— Dru <>

Looking around for hammer

# ps ax | grep hammer
-1 ?? B0L 0:00.00 (hammer-S3)
-1 ?? B0L 0:00.00 (hammer-S2)
-1 ?? B0L 0:00.01 (hammer-S1)
-1 ?? B0L 0:00.01 (hammer-S0)
-1 ?? B0L 0:00.01 (hammer-M)

# cat /etc/fstab
# Device Mountpoint FStype Options Dump Pass#
/dev/serno/VBb247cd88-d6dc6e95.s1a /boot ufs rw 1 1
/dev/serno/VBb247cd88-d6dc6e95.s1b none swap sw 0 0
/dev/serno/VBb247cd88-d6dc6e95.s1d / hammer rw 1 1
/pfs/var /var null rw 0 0
/pfs/tmp /tmp null rw 0 0
/pfs/usr /usr null rw 0 0
/pfs/home /home null rw 0 0
/pfs/usr.obj /usr/obj null rw 0 0
/pfs/var.crash /var/crash null rw 0 0
/pfs/var.tmp /var/tmp null rw 0 0
proc /proc procfs rw 0 0

Well. Everything is on the right place :-)

Lets get start install PHP 7 on DragonFly BSD :

# pkg update
Updating Avalon repository catalogue…
pkg: No address record
pkg: repository Avalon has no meta file, using default settings
pkg: No address record
pkg: Unable to update repository Avalon

Ups, looks like Avalon is not available at the moment.

My bad, I find out that nameserver is not work. Add Google public dns server.

# cat /etc/resolv.conf

Retry pkg update :

# pkg update
Updating Avalon repository catalogue…
Fetching meta.txz: 100% 264 B 0.3kB/s 00:01
Fetching packagesite.txz: 100% 4 MiB 138.8kB/s 00:34
Processing entries: 100%
Avalon repository update completed. 22075 packages processed

read more »

How to Permanently adjust screen brightness in Peppermint OS 5

My Dell laptop that running Peppermint OS 5 getting better each day. It can detect my wifi card and purge old one and that feature brought my brother in after frustrated for days with his Windows.

Another thing that I realize still need some work is brightness level. I must adjust brightness every time I restart my computer.

My current setting

$ cat /sys/class/backlight/acpi_video0/max_brightness
$ cat /sys/class/backlight/acpi_video0/actual_brightness

Yes, 6 is my preference level.

After look around I got the solution :

sudo add-apt-repository ppa:nrbrtx/sysvinit-backlight
sudo apt-get update
sudo apt-get install sysvinit-backlight

To check current brightness level using this script :

$ sudo service sysvinit-backlight status
Current brightness level for acpi_video0 = 6
Current brightness level for intel_backlight = 55

Well, good guess :-)

Permanently save setting :

$ sudo service sysvinit-backlight stop
Saving acpi_video0 = 6
Saving intel_backlight = 55


Try restart my computer and it work perfectly :-)

How to configure ssh access to virtualbox guest under NAT mode

Just quick note for my own :-)

I need to ssh to my CentOS 6.6 box that run under Virtualbox with these steps :

1. NAT

Virtualbox will create private network using these address ( Just set eth0 configuration to DHCP and everything will be set.


2.  Port forwarding setup to port 2222

Click Setting -> Network -> Port Forwarding



3. Test ssh connection

ssh root@ -p 2222
The authenticity of host ‘[]:2222 ([]:2222)’ can’t be established.
RSA key fingerprint is ee:81:d0:da:7e:b4:fe:bc:cd:d7:93:e0:fc:c3:63:80.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘[]:2222’ (RSA) to the list of known hosts.

root@’s password:
Last login: Tue Jun 2 10:57:58 2015
[root@localhost ~]#

[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:1F:5E:0D
inet addr: Bcast: Mask:
inet6 addr: fe80::a00:27ff:fe1f:5e0d/64 Scope:Link
RX packets:6410 errors:0 dropped:0 overruns:0 frame:0
TX packets:4175 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9148159 (8.7 MiB) TX bytes:234084 (228.5 KiB)

lo Link encap:Local Loopback
inet addr: Mask:
inet6 addr: ::1/128 Scope:Host
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:600 (600.0 b) TX bytes:600 (600.0 b)

Of course the connection work on ‘temporary’ ip address. To make it permanent, editing /etc/sysconfig/ifcfg-eth0 needed to set ip address static.

Install minimal CentOS 6.6 with latest PHP and Percona Server 5.6

Being FreeBSD user for years make lazy to try something new :-) . CentOS and Ubuntu server are two distros that brought my attention via distrowatch. Today I have time to try latest CentOS 6 release (6.6) in my virtualbox and I love minimal installation and for that reason I choose CentOS 6.6 minimal iso (CentOS-6.6-x86_64-minimal.iso).

For target installation I choose LAMP and try to use latest component (PHP 5.6, MariaDB 10 or Percona server 5.6 and stock Apache (2.2) ).

Lets get start!

1. Install CentOS 6.6

Let default installation till finished.

2. Configure network

Everything located in /etc/sysconfig/network-scripts/ and every lan card installed in server you see using “ip a” command (remove ” sign).

In most case just change these properties :

  • ONBOOT -> yes

  • BOOTPROTO -> static (change to dhcp for dynamic address)

  • IPADDR -> enter ipv4 address

  • NETMASK -> enter subnet mask

  • GATEWAY -> enter ip4 address of your gateway

If you use vps, all these information available from control panel or check your email from provider.

# service network start

To restart network

3. Install basic stuff

# yum install nano bc wget lynx

4. Update yum

# yum update

5. Install Database

For MariaDB

# cd /etc/yum.repos.d/
# nano MariaDB.repo

Enter these lines :

# MariaDB 10.0 CentOS repository list – created 2015-04-14 06:56 UTC
name = MariaDB
baseurl =

save the file.

# yum install MariaDB-server MariaDB-client

For Percona Server

# yum install

# yum install Percona-Server-client-56 Percona-Server-server-56

6. Install PHP 5.6

# rpm -Uvh
# yum install php56w php56w-opcache php56w-mysql

7. Configuration

# chkconfig httpd --add
# chkconfig httpd on --level 235
# chkconfig mysql --add
# chkconfig mysql on --level 235

# iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT
# service iptables save

8. Run the service

# service httpd start
# service mysql start

Done. Basic LAMP server is successfully installed.

9. Create phpinfo page

# cd /var/www/html/
# echo "<?php echo phpinfo();?>" > info.php

10. Test

# lynx localhost/info.php

PHP logo

PHP Version 5.6.7

System Linux localhost.localdomain 2.6.32-504.el6.x86_64 #1 SMP Wed Oct 15 04:27:16 UTC 2014 x86_64
Build Date Mar 21 2015 20:29:45
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc
Loaded Configuration File /etc/php.ini
Scan this dir for additional .ini files /etc/php.d
Additional .ini files parsed /etc/php.d/bz2.ini, /etc/php.d/calendar.ini, /etc/php.d/ctype.ini, /etc/php.d/curl.ini, /etc/php.d/exif.ini,
/etc/php.d/fileinfo.ini, /etc/php.d/ftp.ini, /etc/php.d/gettext.ini, /etc/php.d/gmp.ini, /etc/php.d/iconv.ini, /etc/php.d/json.ini, /etc/php.d/mysql.ini,
/etc/php.d/mysqli.ini, /etc/php.d/opcache.ini, /etc/php.d/pdo.ini, /etc/php.d/pdo_mysql.ini, /etc/php.d/pdo_sqlite.ini, /etc/php.d/phar.ini,
/etc/php.d/shmop.ini, /etc/php.d/simplexml.ini, /etc/php.d/sockets.ini, /etc/php.d/sqlite3.ini, /etc/php.d/tokenizer.ini, /etc/php.d/xml.ini,
PHP API 20131106
PHP Extension 20131226
Zend Extension 220131226
Zend Extension Build API220131226,NTS
PHP Extension Build API20131226,NTS
Debug Build no
Thread Safety disabled
Zend Signal Handling disabled
Zend Memory Manager enabled
Zend Multibyte Support disabled
IPv6 Support enabled
DTrace Support enabled
Registered PHP Streams https, ftps, compress.zlib, php, file, glob, data, http, ftp, compress.bzip2, phar, zip
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls, tlsv1.0, tlsv1.1, tlsv1.2
Registered Stream Filters zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, bzip2.*, convert.iconv.*
Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies

11. Test Percona Server

# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.23-72.1 Percona Server (GPL), Release 72.1, Revision 0503478

Copyright (c) 2009-2015 Percona LLC and/or its affiliates
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> show engines;

| Engine | Support | Comment | Transactions | XA | Savepoints |
| InnoDB | DEFAULT | Percona-XtraDB, Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
| CSV | YES | CSV storage engine | NO | NO | NO |
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |
| ARCHIVE | YES | Archive storage engine | NO | NO | NO |
| MyISAM | YES | MyISAM storage engine | NO | NO | NO |
| FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL |
9 rows in set (0,00 sec)


Reference : (for more tuning Database and Apache setting)

  1. Percona Tools Wizard
  2. MySQL Tuner
  3. ApacheBuddy
  4. MySQL Tuning Primer

Install Latest Corona SDK on Linux Peppermint OS 5

I want to learn create game for my daughter since she like to play game in her Acer Tablet. I don’t know much about programming for mobile phone nor tablet but I’ll learn.

After dig for internet I decide to use Corona SDK but the problem came since I use Peppermint OS 5 that not supported.

I try Wine way and document the process here for my own reference. Might be useful for others.

Wine version

$ wine --version

Checking cmd command from wine

$ wine cmd
Wine CMD Version 5.1.2600 (1.6.2)


Volume in drive C has no label.
Volume Serial Number is 0000-0000

Directory of C:\

10/02/2015 12:03 <DIR> Program Files
14/01/2015 15:17 <DIR> Program Files (x86)
23/02/2015 15:17 <DIR> server
12/12/2014 20:40 <DIR> users
12/12/2014 20:40 <DIR> windows
0 files 0 bytes
5 directories 411,322,195,968 bytes free

Great. Wine working fine.

Corona SDK

Download latest version for Windows

I got corona sdk 2014.2511


Install it

$ wine start CoronaSDK-2014.2511.msi

I got error message :

fixme:exec:SHELL_execute flags ignored: 0x00000100
fixme:storage:create_storagefile Storage share mode not implemented.
fixme:msi:ITERATE_CreateShortcuts poorly handled shortcut format, advertised shortcut

but I ignore it.

Follow the screen to get corona sdk installed.

Run Corona SDK

Menu -> Programs -> Corona SDK -> Corona Simulator


Try to compile (build for Android)

Got error message


Well, time for JDK.

Java Development Kit

According this docs I need JDK 7


Install this version also not work.


I skip this JDK problem as I still able to code and see it from simulator.

Well, time for continue learning :-)

Update :

I use ZeroBrane Studio

$ wget -c 

$ chmod +x

$ ./
Verifying archive integrity… All good.
Uncompressing ZeroBraneStudio with EduPack 1.00………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………..
Installing ZeroBrane Studio 1.00…
[sudo] password for alamsyah:

To uninstall ZeroBrane Studio at a later time, run: