Skip to content

Instantly share code, notes, and snippets.

@mrsombre
Last active March 19, 2018 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrsombre/693d427312c5ed1f2665dd450054e7b6 to your computer and use it in GitHub Desktop.
Save mrsombre/693d427312c5ed1f2665dd450054e7b6 to your computer and use it in GitHub Desktop.

Nginx Mainline version

http://nginx.org/en/linux_packages.html#mainline

Set limits

/lib/systemd/system/nginx.service

[Service]
...
LimitNOFILE=265536
LimitMEMLOCK=65536

Dotdeb

https://www.dotdeb.org/instructions/

Sury (Latest PHP)

https://packages.sury.org/php/README.txt
apt-get install php7.1-fpm

Percona (MySQL)

https://www.percona.com/doc/percona-server/5.7/installation/apt_repo.html

Set limits

/lib/systemd/system/mysql.service

[Service]
...
LimitNOFILE=65536
LimitMEMLOCK=65536
systemctl daemon-reload
service mysql restart

Disable NFS

systemctl stop rpcbind.service
systemctl disable rpcbind.service

NTPd

NTP to ip4 /etc/default/ntp

NTPD_OPTS='-4 -g'

Config

# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help

driftfile /var/lib/ntp/ntp.drift

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

server 0.debian.pool.ntp.org iburst
server 1.debian.pool.ntp.org iburst
server 2.debian.pool.ntp.org iburst
server 3.debian.pool.ntp.org iburst

restrict -4 default kod notrap nomodify nopeer noquery
restrict 127.0.0.1

interface ignore wildcard
interface listen 127.0.0.1
interface listen <ip>

Iptables

apt-get install iptables-persistent

Time

ntpdate -u pool.ntp.org dpkg-reconfigure tzdata

Composer

curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer

Node

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

Yarn

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment