Skip to content

Instantly share code, notes, and snippets.

View latuminggi's full-sized avatar

Aprillio Latuminggi latuminggi

View GitHub Profile
@latuminggi
latuminggi / COMPILE PHP 7.2 UBUNTU 14.04 LTS
Created March 11, 2020 03:48
COMPILE PHP 7.2 UBUNTU 14.04 LTS
### COMPILE PHP 7.2 UBUNTU 14.04 LTS ###
## https://www.howtoforge.com/tutorial/how-to-compile-and-install-php-7.4-on-ubuntu-18-04
## https://www.fastnetserv.com/how-to-install-php-7-2-on-ubuntu-14-04-ispconfig-3-1
## https://www.php.net/manual/en/imap.requirements.php
cd /tmp
## clone imap src
git clone https://github.com/uw-imap/imap.git
cd /tmp/imap
@latuminggi
latuminggi / COMPILE PHP 7.2 UBUNTU 14.04 LTS extending fastnetserv
Last active September 28, 2020 14:15
COMPILE PHP 7.2 UBUNTU 14.04 LTS extending fastnetserv
### COMPILE PHP 7.2 UBUNTU 14.04 LTS ###
### https://www.fastnetserv.com/how-to-install-php-7-2-on-ubuntu-14-04-ispconfig-3-1
# installing dependencies
apt-get install build-essential nano libfcgi-dev libfcgi0ldbl libjpeg-turbo8-dbg libmcrypt-dev libssl-dev libc-client2007e \
libc-client2007e-dev libxml2-dev libbz2-dev libcurl4-openssl-dev libjpeg-dev libpng12-dev libfreetype6-dev \
libkrb5-dev libpq-dev libxml2-dev libxslt1-dev \
libaspell-dev libpspell-dev libreadline-dev libtidy-dev libgmp-dev libssh2-1-dev unixodbc-dev && \
ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a
@latuminggi
latuminggi / COMPILE PHP 7.3 UBUNTU 14.04 LTS extending fastnetserv
Last active November 24, 2020 06:45
COMPILE PHP 7.3 UBUNTU 14.04 LTS extending fastnetserv
### COMPILE PHP 7.3 UBUNTU 14.04 LTS ###
### https://www.fastnetserv.com/how-to-install-php-7-2-on-ubuntu-14-04-ispconfig-3-1
# installing dependencies
apt-get install build-essential nano libfcgi-dev libfcgi0ldbl libjpeg-turbo8-dbg libmcrypt-dev libssl-dev libc-client2007e \
libc-client2007e-dev libxml2-dev libbz2-dev libcurl4-openssl-dev libjpeg-dev libpng12-dev libfreetype6-dev \
libkrb5-dev libpq-dev libxml2-dev libxslt1-dev \
libaspell-dev libpspell-dev libreadline-dev libtidy-dev libgmp-dev libssh2-1-dev unixodbc-dev && \
ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a
@latuminggi
latuminggi / Install Let's Encrypt with ACME.sh in Nginx
Last active August 19, 2021 01:39
Install Let's Encrypt with ACME.sh in Nginx
### Install Let's Encrypt with ACME.sh in Nginx ###
# clone acme (as root)
git clone https://github.com/acmesh-official/acme.sh.git && \
cd acme.sh && \
./acme.sh --install -m [email protected]
# create cert ----------------------------------------------------------------------
# acme.sh is an alias for /root/.acme.sh/acme.sh
@latuminggi
latuminggi / COMPILE PHP 8.0 RHEL (CentOS?) 6
Last active May 29, 2024 16:26
COMPILE PHP 8.0 RHEL/(CentOS?) 6
### COMPILE PHP 8.0 RHEL/(CentOS?) 6 ###
# You can find PHP 8.0 repository here:
# https://pkgs.dyn.su/el6-extras/x86_64
# installing dependencies
# https://coderwall.com/p/ggmpfa/php-configuration-error-and-solutions-in-rpm
yum install -y autoconf autotools gmp-devel libcurl-devel postgresql postgresql-devel sqlite sqlite-devel \
libxslt-devel net-snmp-devel readline-devel aspell aspell-devel unixODBC-devel libicu-devel libc-client-devel \
freetype-devel libXpm-devel libpng-devel libvpx-devel enchant-devel libmcrypt-devel libmemcached-devel \
@latuminggi
latuminggi / COMPILE NGINX 1.20.1 RHEL (CentOS?) 6
Last active July 23, 2021 14:34
COMPILE NGINX 1.20.1 RHEL/(CentOS?) 6
### COMPILE NGINX 1.20.1 RHEL/(CentOS?) 6 ###
# installing dependencies
yum install git yum-utils gcc gcc-c++ pcre-devel zlib-devel make unzip libuuid-devel \
openssl-devel libxml2-devel libxslt-devel libgcrypt-devel libgpg-error-devel \
pcre pcre-devel geoip-devel cpp gd-devel
# install glibc
wget https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-common-2.17-55.el6.x86_64.rpm \
https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-headers-2.17-55.el6.x86_64.rpm \
@latuminggi
latuminggi / Updating glibc, libstdc++, and gcc on RHEL (CentOS) 6
Last active July 21, 2021 07:08
Updating glibc, libstdc++, and gcc on RHEL / CentOS 6
### Updating glibc, libstdc++, and gcc on RHEL / CentOS 6 ###
# https://code.visualstudio.com/docs/remote/linux#_updating-glibc-and-libstdc-on-rhel-centos-6
# https://serverkurma.com/linux/how-to-update-glibc-newer-version-on-centos-6-x/
# https://gist.github.com/harv/f86690fcad94f655906ee9e37c85b174
# https://copr.fedorainfracloud.org/coprs/mosquito/myrepo-el6/
# WARNING !!!
# Do not run this script on anything mission critical without a rollback strategy
# since it does update libraries that other applications depend on.
@latuminggi
latuminggi / Disable ICMP Timestamp Response Ubuntu LTS
Created July 27, 2021 09:54
Disable ICMP Timestamp Response Ubuntu LTS
### Disable ICMP Timestamp Response Ubuntu LTS ###
# sysctl disable tcp_timestamps
echo 0 > /proc/sys/net/ipv4/tcp_timestamps && \
echo "net.ipv4.tcp_timestamps = 0" > /etc/sysctl.d/tcp_timestamps.conf && \
sysctl -p && \
sysctl -a | grep "net\.ipv4\.tcp_timestamps"
# open icmp to specified segment
iptables -A INPUT -s 10.10.0.0/16 -p icmp -m icmp --icmp-type 8 -j ACCEPT
@latuminggi
latuminggi / Disable weak SSH ciphers in Linux
Last active April 16, 2025 13:37
Disable weak SSH ciphers in Linux
### Disable weak SSH ciphers in Linux ###
# check ssh ciphers, macs, and kexalgorithms
sshd -T | grep "\(ciphers\|macs\|kexalgorithms\)"
# edit sshd_config
nano /etc/ssh/sshd_config
# add following conf lines into most bottom of sshd_config file
Ciphers [email protected],[email protected],aes256-ctr,aes128-ctr
@latuminggi
latuminggi / nginx http upstream with fallback
Last active September 3, 2021 09:01
nginx http upstream with fallback if upstream return http error page
### nginx http upstream with fallback if upstream return http error page ###
### https://www.digitalocean.com/community/tools/nginx
# upstream members of soa
upstream soa {
server 11.22.33.41:1234 max_fails=1 fail_timeout=1m;
server 11.22.33.42:1234 max_fails=1 fail_timeout=1m;
server 11.22.33.43:1234 max_fails=1 fail_timeout=1m backup;
server 11.22.33.44:1234 max_fails=1 fail_timeout=1m backup;
}