Tag: Linux

Install certbot certificate

SSH to server

Add Certbot PPA

sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update

Install Certbot

sudo apt-get install certbot python-certbot-apache 

Get and install certificate

sudo certbot --apache

Test automatic renewal

sudo certbot renew --dry-run

Confirm that Certbot worked

Visit https://lbn.in.ua


export PS1='\[\e[0;34m\][\@]\[\e[m\] \[\e[0;36m\]\u@\h: \[\e[m\]\w $ '

alias chgrp='chgrp --preserve-root'
alias chmod='chmod --preserve-root'
alias chown='chown --preserve-root'

alias grep='grep --color=auto'

alias ll='ls -l'
alias ls='ls --color=auto'

alias h='history | grep'

# Show open ports
alias ports='netstat -tulanp'

# Lookup for process
alias psx='ps auxw | grep'

# History settings
export HISTFILESIZE=20000
export HISTSIZE=10000
shopt -s histappend

# Combine multiline commands into one in history
shopt -s cmdhist

# Ignore duplicates, and some commands
export HISTIGNORE="&:ls:ll:cd:[bf]g:exit"
export HISTTIMEFORMAT='[%F %T] '

for d in ~/apps/*/bin; do PATH="$PATH:$d"; done
export PATH

export GREP_OPTIONS='-n -I --exclude-dir=.git --exclude-dir=.idea'
export JAVA_HOME=/usr/lib/jvm/java-8-oracle