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

nat

Adapter 1 -> NAT Continue reading

Apricity OS : Disappointing Me

My Peppermint OS 5 seem to let me behind with latest trend. Even I can install Sigil but it’s not latest one because of LTS stuff (yes, Sigil requires Qt >= 5.4 available in Ubuntu 15.10). I also can not introduce Krita for my daughter (its installed but crash). Obviously a lot of fun things I got with Peppermint OS 5 like setting brightness, set Team viewer 10 for remote my wife laptop. Use Xampp for Phalcon PHP backup. Learn Corona SDK a bit before switch to Ionic.

While latest Ubuntu will be out this April I actually will ignore it till 2019  but I can’t 🙂 . This LTS (Xenial  Xerus) hard to refuse but I need it to follow latest trend). During waiting period I think I’ll use Elementary OS. I download and play with it  and I love it until my friend came and told me about his arch linux box. I already knew that name from long time ago while I still working with FreeBSD server but I have no idea until I see it myself.

Apricity OS

Being afraid of new challenge that I might see with arch linux I decide to look for beginner friendly distro that use arch linux as basis. Manjaro, Antergos are nice but I see other one called Apricity OS. Its GUI approach is really good and force me to end my waiting period for Ubuntu LTS after test it 2 days with virtualbox. Continue reading

How to fix mysql error can’t read dir on Peppermint OS

Suddenly my php stack can’t open phpmyadmin. Its getting timeout all the time. Due to health problem I let it as I think my computer might need rest too like me 🙂

Today I need to overcome the problem since my friend need to access mysql table structure and I use command line, the error appear in different format :

mysql -u root -p nkppt -e ‘show tables;’
Enter password:
ERROR 1018 (HY000) at line 1: Can’t read dir of ‘./nkppt/’ (errno: 24)

Wow, I think the error also serious and apt-get update in last run might be the cause of this problem.

After look around I got solution from here.

Edit security limits

$ cat /etc/security/limits.conf

……

………..

mysql soft nofile 24000
mysql hard nofile 32000

Modify mysql.conf

$ cat /etc/init/mysql.conf
# MySQL Service

description     “MySQL Server”
author          “Mario Limonciello <[email protected]>”

start on runlevel [2345]
stop on starting rc RUNLEVEL=[016]

respawn
respawn limit 2 5

env HOME=/etc/mysql
umask 007

# The default of 5 seconds is too low for mysql which needs to flush buffers
kill timeout 300

limit nofile 32000 32000
limit nproc 32000 32000

pre-start script
## Fetch a particular option from mysql’s invocation.
# Usage: void mysqld_get_param option

The lines in bold is solution for my problem.

Restart mysql service and my problem gone 🙂

How to install PHP7 ports on FreeBSD 10.2

My friend ask me about FreeBSD PHP7 ports and he already check if the ports not exist yet. He just feel more comfortable with ports than using git or source.

I search Google and found github repository of PHP 7 ports. I give it a try with my vps and it looks good.

Lets get start!

# freebsd-update update
# freebsd-update install
# pkg update
# portsnap fetch
# portsnap extract

Install git

# pkg install -y git

Clone

# git clone https://github.com/SentaLtd/freebsd-php7-ports.git
Cloning into ‘freebsd-php7-ports’…
remote: Counting objects: 210, done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 210 (delta 16), reused 13 (delta 13), pack-reused 184
Receiving objects: 100% (210/210), 40.52 KiB | 0 bytes/s, done.
Resolving deltas: 100% (68/68), done.
Checking connectivity… done.

Copying all files

# mv /root/freebsd-php7-ports/bsd.php.mk /usr/ports/Mk/

Lang

# mv /root/freebsd-php7-ports/lang/php7-extensions /usr/ports/lang/
# mv /root/freebsd-php7-ports/lang/php7-extensions /usr/ports/lang/

Archivers

# cd /root/freebsd-php7-ports/archivers/
# mv php7-* /usr/ports/archivers/

Converters

# cd /root/freebsd-php7-ports/converters/
# mv php7-* /usr/ports/converters/

Databases

# cd /root/freebsd-php7-ports/databases/
# mv php7-* /usr/ports/databases/

Continue to others 🙂

Install PHP7 ports

# cd /usr/ports/freebsd-php7-ports/lang/php7
# make install

php7_ports_freebsd10

Test

# php -v
PHP 7.0.2 (cli) (built: Jan 30 2016 07:50:43) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies

# php --ini
Configuration File (php.ini) Path: /usr/local/etc
Loaded Configuration File: (none)
Scan for additional .ini files in: /usr/local/etc/php
Additional .ini files parsed: (none)