Install kubectl: $ sudo apt update $ sudo apt install apt-transport-https $ curl -sSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add – $ echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list $ sudo apt update $ sudo apt install kubectl… Read More
How to do a basic install of Prometheus on Ubuntu?
Machine requirement I will assume your machine is Ubuntu >= 16.04. Please make sure only ports 80 and 443 are open. I assume there are two DNS entries to your machine, such as prometheus.blablabla.com and grafana.blablabla.com (replace as appropriate throughout… Read More
How to programmatically know your external IP address?
You are probably used to type “what is my ip” in google to know this, but how can you do that in a shell script? Here it is: $ curl ifconfig.co Simple! I work as a freelancer, so if you… Read More
How to install Docker on Ubuntu
Follow the steps to install Docker Community Edition: $ sudo apt install curl software-properties-common $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add – $ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" $ sudo apt update $ sudo apt install… Read More
How to enable and analyse the slow query log on MySQL?
Set the following variables in your MySQL config file: slow_query_log = 1 (means true) long_query_time = 0 (means 0 seconds) log_queries_not_using_indexes = 1 (means true) log_output = FILE (default is TABLE) Setting long_query_time to 0 will instruct MySQL to log… Read More