Wednesday, September 11, 2019

Install Nginx, MariaDB, PHP (LEMP) and WordPress on GCP Free Tier Ubuntu/CentOS VM

I was using LAMP for my WordPress blog for quite a few years. Because of Google Cloud Platform free VM's limitation, I am always suffering the performance issue if put all of them into one machine. Since last year, I was keeping trying using a different type of technologies to help. I tried to use Docker, also I separated Mysql db into a different vm. All are working, but not a best solution for me until I find Nginx and MariaDB. This combination has less resource usage and also providing me a possibility to squeeze all components into one GCP free VM.

This post is used to record all steps and commands I used. You will find a YouTube video at the end of post to present the installation process. The whole steps will take 30 minutes to 45 minutes to complete.


Tuesday, September 10, 2019

Nginx Tips and Tricks - Load Balancer Configuration


1. Configure Nginx to do load balancer


If you have multiple sites, you can configure Nginx to load balance between multiple servers.
There are two files you will need to change:


Thursday, September 5, 2019

Monit - Linux Open Source System or Process Monitor Program

1. What is Monit?
Monit is a utility for managing and monitoring processes, programs, files, directories and file systems on a Unix like system. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations. E.g. Monit can start a process if it does not run, restart a process if it does not respond and stop a process if it uses too much resources. You can use Monit to monitor files, directories and file systems for changes, such as timestamps changes, checksum changes or size changes.

Monit is controlled via an easy to configure control file (/etc/monit/monitrc) based on a free-format, token-oriented syntax. Monit logs  to syslog or to its own log file (/var/log/monit.log) and notifies you about error conditions via customisable alert messages.

Wednesday, September 4, 2019

Gartner CASB (Cloud Access Security Brokers) Magic Quadrant



Cloud access security brokers have become an essential element of any cloud security strategy, helping organizations govern the use of cloud and protect sensitive data in the cloud. Security and risk management leaders concerned about their organizations’ cloud use should investigate CASBs.


2018

Monday, September 2, 2019

Linux Virtual Machine PHP Invoked OOM-killer (Out of Memory) Issue

One of my GCP VM is running at f1-Micro type which only has limited memory, 614MB. From syslog, I found it has a PHP invoked OOM killer messages. This usually means this server essentially ran out of memory and extra memory should add into this system, Based on some posts online, especially this 2010's  post :

"The Linux kernel likes to always allocate memory if applications asking for it. Per default it doesn’t really check if there is enough memory available. Given that behavior applications can allocate more memory as really is available. At some point it can definitely cause an out of memory situation. As result the OOM killer will be invoked and will kill that process:"

Friday, August 30, 2019

Ubuntu Basic System and Service Configuration Commands


1. Update / Upgrade Commands
  • sudo apt-get update : In a nutshell, apt-get update doesn't actually install new versions of software. Instead, it updates the package lists for upgrades for packages that need upgrading, as well as new packages that have just come to the repositories.
  • sudo apt-get upgrade : will fetch new versions of packages existing on the machine if APT knows about these new versions by way of apt-get update. An update must be performed first so that apt-get knows that new versions of packages are available.
  • sudo apt-get dist-upgrade: will do the same job which is done by apt-get upgrade, plus it will also intelligently handle the dependencies, so it might remove obsolete packages or add new ones. 

Note: we can combine commands with && signs, such as:
  • sudo apt-get update && sudo apt-get dist-upgrade

Wednesday, August 28, 2019

Install Portainer to Manage Containers - Nginx, MySQL, WordPress

Portainer is a lightweight management UI which allows you to easily manage your different Docker
environments (Docker hosts or Swarm clusters). It is meant to be as simple to deploy as it is to use. It consists of a single container that can run on any Docker engine (can be deployed as Linux container or a Windows native container). Portainer allows you to manage your Docker containers, images, volumes, networks and more !


1. Installation in CentOS / Ubuntu
1.1 CentOS 7/Debian 9

Here is an easiest way to install docker into your CentOS / Debian system. It is just one command:

sudo -i
yum -y update
curl -sSL https://get.docker.com/ | sh

Thursday, August 22, 2019

IBM Guardium Installation and Upgrade


Basic Installation 

The IBM Guardium V10.1 Software Appliance Technical Requirements can be found here: http://ibm.co/2gd5ZRq.  Additional installation detail can be found here: http://ibm.co/2h0exMw.