lsb_release -d # get Linux distro and version
cat /etc/centos-release
# ubuntu
sudo /etc/init.d/bind9 {start | stop | restart}
sudo -u bind rndc status
| ############################################################################### | |
| ## Monit control file | |
| ############################################################################### | |
| ## | |
| ## Comments begin with a '#' and extend through the end of the line. Keywords | |
| ## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'. | |
| ## | |
| ## Below you will find examples of some frequently used statements. For | |
| ## information about the control file, a complete list of statements and | |
| ## options please have a look in the monit manual. |
| set alert usera@example.com | |
| set mailserver smtp.gmail.com port 587 | |
| username "user@gmail.com" | |
| password "password" | |
| using TLSV1 | |
| with timeout 30 seconds | |
| set mail-format { | |
| from: monit@server.example.com |
Reference: https://docs.docker.com/compose/compose-file/#compose-file-structure-and-examples
Collection of a few docker-compose examples which I use regularly
# docker-compsoe version to be used must be mentioned at the top
version: '3'
services:
Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.
| #Dig HowTo [https://www.madboa.com/geek/dig/] | |
| # get the address(es) for yahoo.com | |
| dig yahoo.com A +noall +answer | |
| # get a list of yahoo's mail servers | |
| dig yahoo.com MX +noall +answer | |
| # get a list of DNS servers authoritative for yahoo.com | |
| dig yahoo.com NS +noall +answer |
| ZSH=$HOME/.oh-my-zsh | |
| plugins=(git ruby rails sublime web-search) | |
| ZSH=$HOME/.oh-my-zsh | |
| source $ZSH/oh-my-zsh.sh | |
| # Customize to your needs... |
| # FreeAgent puts the powerline style in zsh ! | |
| if [ "$POWERLINE_DATE_FORMAT" = "" ]; then | |
| POWERLINE_DATE_FORMAT=%D{%Y-%m-%d} | |
| fi | |
| if [ "$POWERLINE_RIGHT_B" = "" ]; then | |
| POWERLINE_RIGHT_B=%D{%H:%M:%S} | |
| elif [ "$POWERLINE_RIGHT_B" = "none" ]; then | |
| POWERLINE_RIGHT_B="" |
| function get_os { | |
| base=`uname` | |
| if [ $base == 'Darwin' ]; then | |
| brew install zsh zsh-completions; | |
| elif [ $base == 'Linux' ]; then | |
| os=`lsb_release -i | cut -f 2-` | |
| if [ $os == 'Ubuntu' ]; then | |
| sudo apt install zsh -y; | |
| elif [ $os == 'Fedora' ]; then | |
| sudo dnf install zsh -y; |