HHVM Segfault since latest update (3.13.0) switch to LTS 3.12.1

Today is March 31, 2016.
Just upgrade the HHVM to latest update 3.13.0.

Then my blog start to crash, restart the HHVM service several times, No help.
Check the log and debug into No help.

HHVM’s Github support also reporting similar issue:
https://github.com/facebook/hhvm/issues/6950

So I switch to the latest LTS which is 3.12.1 at this moment.
https://docs.hhvm.com/hhvm/installation/linux

First I backup my own HHVM config file:

Then clean up the 3.13.0 package:

Put new apt config file: /etc/apt/sources.list.d/hhvm.list

Install the latest LTS HHVM:

Recover my backup config file:

Start the service:

And I am back.

I love hhvm, but you better stay on LTS for production level service or system.

Have a nice day!

Update April 4th, 2016:

My HHVM 3.12.1 just crash, but a restart service make it stable for next few days.

It seems there are 2 tweaks you can try:

1.Maybe usefull: When the daemon is started via systemctl it dies after some requests. It will runs if run by:

2.Changing /etc/hhvm/php.ini using hhvm.log.level = Error

Reference: https://github.com/facebook/hhvm/issues/6950

I also add these line in my /etc/hhvm/php.ini

etckeeper Debian Jessie howto

etckeeper is another great tool for keep a recorder of /etc configuration files changes on your Linux box.

First install etckeeper, it is simple on Debian Jessie:

Generate the key for git server:

Setup Git:

Hook it up with my Git server:

Add auto push:

Try to push:

You will got warning:

Run these 2 command to push:

You should have output like this:

Debian Jessie install latest stable HAproxy

Debian did a great job to keep update the latest update from software like HAproxy.

To set up the latest stable HAproxy on Debian Jessie, just head to http://haproxy.debian.net/

Debian_Jessie_HAproxy_2016-03-23

And follow the Instructions below.
It’s safe and clean.

Instructions for latest release

You need to enable the backports repository :

Then, use the following commands:

You will get the latest release of HAProxy 1.6.

Redmine 3.2.1 bare server running on Debian Jessie

Need Upgrade Redmine to the latest stable 3.2.1.

Download the latest stable package:

Copy the configure file and SQLite database file:

Perform upgrade:

Testing Run:

And to start Redmine automatic on boot:

My latest service script /etc/init.d/redmine:

Don’t forgot active the service in Debian Jessie:

Please notice my local Redmine server IP is: [192.168.1.33].
You will replace it with your own IP address.

check_mk OMD apt plugin

Thanks for the great work from [Karsten Schoeke, Stefan Schlesinger]
https://github.com/lgbff/lgb_check_mk_plugins/tree/master/aptng

This plugin can check for available updates via apt-get on Debian or Ubuntu.

It won’t pull the apt data automaticly, to do so.
I add a cron job to apt-get update to trigger the new data every day:

Reference: http://www.planet4.se/upgrade-check_mk-omd-and-install-mkp-files/

Please notice [milliondollarserver_monitor] is my local OMD project, you will have to replace it by your own project name.

Debian Jessie PHP access SQL Server Database

Use FreeTDS and unixODBC for this task.

  1. Installation of the freetds packages with apt-get
  2. Add configuration into /etc/freetds/freetds.conf

Debian Jessie turn off IPv6

Append ipv6.disable=1 to the GRUB_CMDLINE_LINUX variable in /etc/default/grub.

Run update-grub and reboot.
or better,

edit /etc/sysctl.conf and add those parameters to kernel. Also be sure to add extra lines for other network interfaces you want to disable IPv6.

After editing sysctl.conf, you should run sysctl -p to activate changes or reboot system.

Reference:
https://wiki.debian.org/DebianIPv6

Debian Jessie PHP access Oracle Database

Need Setup a PHP Web Server can access to Oracle Database.

      Configuring PHP with OCI8

    1. First Install Apache and PHP

    1. Then download 2 packages from Oracle:

Oracle Instant Client Downloads for Linux x86-64
Instant Client Package – Basic Lite: Smaller version of the Basic package, with only English error messages and Unicode, ASCII, and Western European character set support
Download instantclient-basiclite-linux.x64-12.1.0.2.0.zip (31,302,454 bytes) (cksum – 3592144768)

Instant Client Package – SDK: Additional header files and an example makefile for developing Oracle applications with Instant Client
Download instantclient-sdk-linux.x64-12.1.0.2.0.zip (667,174 bytes) (cksum – 1047596065)

Oracle_Instant_Client

 

    1. Upload these 2 packages to server, uncompress them put it under same folder:

Link libclntsh.so.12.1 libclntsh.so

Make sure the sdk/ folder and files also under same directory:

ls -alt /usr/lib/oracle/12.1/client64/lib/

Optional add it into LD_LIBRARY by create file: /etc/ld.so.conf.d/x86_64-oracle.conf

run ldconfig to apply the changes.

    1. Installing OCI8 from PECL

http://pecl.php.net/package/oci8

Use the OCI8 extension to access Oracle Database. PHP OCI8 2.1 builds with PHP 7.
Use ‘pecl install oci8-2.0.10’ to install OCI8 for PHP 5.2 – PHP 5.6.
Use ‘pecl install oci8-1.4.10’ to install PHP OCI8 1.4 for PHP 4.3.9 – PHP 5.1.

Debian Jessi comes with PHP 5.6, when it ask the path for library give it the directory where the library located:

Create oci8.ini file for php: /etc/php5/mods-available/oci8.ini

References:
http://php.net/manual/en/oci8.installation.php
http://www.oracle.com/technetwork/articles/technote-php-instant-084410.html

In case you got error message when start Apache:

# cat error.log
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php5/20131226/oci8.so’ – libaio.so.1: cannot open shared object file: No such file or directory in Unknown on line 0
[Mon Oct 17 16:06:28.407599 2016] [mpm_prefork:notice] [pid 21276] AH00163: Apache/2.4.10 (Debian) configured — resuming normal operations
[Mon Oct 17 16:06:28.407640 2016] [core:notice] [pid 21276] AH00094: Command line: ‘/usr/sbin/apache2’

Make sure the oci8.so file exist:
# ls /usr/lib/php5/20131226/oci8.so

And Install the Libaio:
# apt-get install libaio1

Intel H97 motherboard can find SATA hard drive under VMware vSphere ESXi 6

I am building an new EXSi server at home by using Asus H97I-Pulus ITX motherboard.

I loaded the ESXi 6 on USB and boot from it, then choice install into another SanDisk Fit USB drive.

I noticed there is no SATA Hard Drive during the installation.

After reboot login in ESXi client still could not found my 2 STAT hard disk:

  1. M.2 Samsung 128 GB SSD
  2. SATA WesterDigital Red 2 TB

After ssh login to ESXi host, I did more looking up:

Looking up the PCI device:

Specific the SATA Controller:

Install http://vibsdepot.v-front.de sata-xahci vib package:

Please notice this will took several minutes to install.

You have to reboot to apply the changes.

After reboot, all the SATA storage device is back, and you can create new Datastores now.

This packages also works on almost all the SATA Controllers ESXi does not support out of box.

Great works from VMware Front Experience!

For references:
https://www.v-front.de/2013/11/how-to-make-your-unsupported-sata-ahci.html
https://vibsdepot.v-front.de/wiki/index.php/Sata-xahci