This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
apt-get update && apt-get upgrade | |
apt install -y dialog | |
# ------------------------ | |
# INITIAL | |
# ------------------------ | |
# see https://gist.github.com/coder4web/5fe1bb155d8957558911 | |
dpkg-reconfigure locales |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:'SET PASSWORD | |
sudo -i -u postgres | |
psql | |
\password postgres | |
' | |
# RHEL / CentOS 8 | |
# https://www.postgresql.org/download/linux/redhat/ | |
# https://www.postgresql.org/docs/current/runtime.html | |
dnf list installed |grep postgresql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Private key | |
openssl ecparam -genkey -name secp384r1 -out nginx.ec.key | |
openssl ec -in nginx.ec.key -text -noout | |
# CSR | |
openssl req -new -sha256 -key nginx.ec.key -subj "/CN=devops/C=BM/ST=Bermudian/L=Bermudian/O=Org/OU=IT" -out nginx.ec.csr | |
#openssl req -in nginx.ec.csr -text -noout | |
openssl req -in nginx.ec.csr -text -noout | grep -i "Signature.*SHA256" && echo "All is well" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.pgbouncer.org/install.html | |
# sudo dnf install pgbouncer | |
# Problem: package pgbouncer requires python-psycopg2, but none of the providers can be installed | |
# https://www.pgbouncer.org/install.html#building | |
sudo dnf install libevent libevent-devel | |
# https://www.pgbouncer.org/downloads/ | |
wget -c https://www.pgbouncer.org/downloads/files/1.12.0/pgbouncer-1.12.0.tar.gz | |
tar xvfz pgbouncer-1.12.0.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- logs | |
SET log_statement = 'all'; | |
-- list database(s) | |
\l+ [database] | |
-- list schema(s) | |
\dn | |
-- list tables in all schemas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on next manuals: | |
# Ubuntu 18.04 LTS: https://switch2osm.org/manually-building-a-tile-server-18-04-lts/ | |
# CentOS 7 - https://www.hyperlearning.ai/en/knowledgebase/blog/centos-7-open-street-map-tile-server | |
# Updated to latest CentOS / deps packages | |
# Dependencies | |
sudo yum install git gdal sqlite geos boost curl libcurl libicu bzip2-devel zlib-devel libxml2-devel python-setuptools proj-devel proj proj-epsg proj-nad libicu-devel gdal-devel sqlite-devel libcurl-devel geos-devel protobuf-devel protobuf-c-devel lua-devel cmake proj boost-thread proj-devel autoconf automake libtool pkgconfig ragel gtk-doc glib2 glib2-devel libtool-ltdl-devel python-devel boost-devel cabextract xorg-x11-font-utils fontconfig perl-DBD-Pg mesa-libGLU-devel | |
sudo yum install cairo pycairo cairo-devel pycairo-devel freetype freetype-devel harfbuzz harfbuzz-devel harfbuzz-icu libjpeg libjpeg-devel libpng libpng-devel libtiff libtiff-devel libwebp libwebp-devel | |
sudo mkdir -p /usr/local/src/osm_tile_server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------ | |
# SSH: | |
# ------------------------ | |
#http://wiki.centos.org/HowTos/Network/SecuringSSH | |
#https://www.linode.com/docs/security/securing-your-server/ | |
sudo nano /etc/ssh/sshd_config | |
Port 20202 | |
PermitRootLogin no | |
#PermitRootLogin without-password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/openssl/openssl/blob/master/INSTALL.md | |
# https://github.com/openssl/openssl/blob/master/NOTES.UNIX | |
# https://www.openssl.org/docs/man1.1.1/ | |
# reqs | |
#sudo yum groupinstall "Development Tools" | |
#sudo apt-get install build-essential cmake gcc libssl-dev | |
cd /usr/local/src | |
wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @see https://www.tecmint.com/install-upgrade-kernel-version-in-centos-7/ | |
uname -sr | |
# Linux 3.10.0-1062.12.1.el7.x86_64 | |
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org | |
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-4.el7.elrepo.noarch.rpm | |
yum --disablerepo="*" --enablerepo="elrepo-kernel" list available | |
yum --enablerepo=elrepo-kernel install kernel-ml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# df - report file system disk space usage | |
df -h | |
df -i | |
df -hl | |
df -hl | sort -n | |
# du - disk used - estimate file space usage | |
alias du1='du . -hs' | |
alias du10='du . -k | sort -n -r | head -n 10' |
NewerOlder