Thursday, May 4, 2017

Windows: Install/deploy XAMP 7.1.1

We would like to test our application on PHP 7.1. To do that, we need to install/deploy XAMPP 7.1.1.
You can download installer or portable XAMPP 7.1.1 packages at https://www.apachefriends.org/download.html or https://sourceforge.net/projects/xampp/files/ (non installer). I prefered to use portable XAMPP 7.1.1 package, xampp-portable-win32-7.1.1-0-VC14.7z.
XAMPP 7.1.1 required Microsoft Visual C++2015 Runtime. You can download it from Microsoft Visual C++ 2015 Redistributable Update 3 (latest when this article written). Choose your Windows platform that you used, 32 bit or 64 bit. Download and install it.
Extract xampp-portable-win32-7.1.1-0-VC14.7z, into your drive for example C:. It will create folder C:\xampp.
Before you use it, do this to avoid some problems:
  1. Edit file C:\xampp\mysql\bin\my.ini
    change key_buffer to key_buffer_size for example:
    ...
    key_buffer to key_buffer_size = 16M
    ...
  2. Create folder C:\xampp\mysql\lib\plugin
You may start or stop your apache 
  1. Using XAMPP Control "xampp-control.exe"
  2. Running on cmd "apache_start.bat" to start and "apache_stop.bat" to stop (I prefere this).
You may start or stop your mysql (MariaDB)
  1. Using XAMPP Control "xampp-control.exe"
  2. Running on cmd "mysql_start.bat" to start and "mysql_stop.bat" to stop (I prefere this).
Note:
  1. XAMPP folder required directly under drive for example C:\xampp, D:\xampp, etc, it may fail to start.
  2. Do not rename xampp folder, it may fail to start.
.

Tuesday, May 2, 2017

Centos 6: csf blocking whois

symptom:
# whois google.com
[Querying whois.verisign-grs.com]
[Unable to connect to remote host]
To solve this problem, edit /etc/csf/csf.conf, make sure outgoing to port 43 and 53 are allowed.
# vi /etc/csf/csf.conf
...
# Allow outgoing TCP ports
TCP_OUT = "20,21,22,25,43,53,80,110,113,443,587,993,995"
...
# Allow outgoing UDP ports
# To allow outgoing traceroute add 33434:33523 to this list
UDP_OUT = "20,21,43,53,113,123"
...
Restart your csf
# csf -r
Done!

Friday, April 7, 2017

Centos 6/7: using needs-restarting after yum update

Install yum utility
# yum install yum-utils

Some update require system to restart or some services to restart. To determine system needs to restart or some services need to restart, run needs-restarting:

# needs-restarting
1512 : /usr/sbin/sshd
609 : /usr/sbin/NetworkManager --no-daemon
615 : /usr/lib/polkit-1/polkitd --no-debug

Tested on Centos 6.9 and Centos 7.3

References:

Thursday, April 6, 2017

Bignox App Player: upgrade without losing application and data

Nox App Player/NoxPlayer 3.8.1.1  has been release on March 31, 2017. It is based on Android 4.4.2. The upgrade will overwrite any installation on your PC. To prevent any lost your application and data, you need to backup your current Nox.
  1. Use Nox Multi-Drive to backup your application and data. For detail see How to backup and restore your data in Nox App Player. Wait until backup perform successful. It may takes some minutes.
  2. Download latest Nox App Player from bignox.com
  3. Exit any Nox App Player programs, and start installation. 
  4. Installation ask you to overwrite existing installation and choose continue.
  5. At the end of installation, there is a text "restore" (can be click), click it. 
  6. Choose your backup file to restore it into new Nox App Player. 
  7. Wait until finish, it may takes some minutes.
References:

cli: Difference between >> and > operators

Just to refresh and for personal note.
This is apply to all L/Unix.
  • Operator >> will append text to a file.
  • Operator > will overwrite the data in file.

References: