Web сервер

Ubuntu 18.04, nginx, apache, postfix, php

Установка

Специфика Hetzner:
init rescue boot
installimage
С ISO образа: подготовить имя пользователя, hostname, пароль
 
Обновление
apt-get -y upgrade; apt-get -y install ubuntu-standard ntpdate ; apt-get -y dist-upgrade; apt-get -y autoremove; 
Проверяем/правим hostname
nano -w /etc/hostname
nano -w /etc/hosts
reboot

Проверка

hostname -f

 

Установка времени и локалей
apt-get install ntp ntpdate
dpkg-reconfigure tzdata
dpkg-reconfigure dash  # указать NO
 
locale-gen 
apt-get -y remove locales
apt-get -y install locales
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales
reboot

 Ставим общие пакеты

sudo apt-get install software-properties-common pyzor razor arj cabextract lzop nomarch p7zip-full ripole rpm2cpio tnef unzip unrar-free zip dbconfig-common javascript-common libaprutil1-dbd-sqlite3 libaprutil1-ldap libjs-jquery libjs-sphinxdoc libjs-underscore liblua5.2-0 libpcre2-8-0 libzip4 ssl-cert python python-acme python-apt-common python-augeas python-boto python-cffi-backend python-chardet python-configargparse python-configobj python-cryptography python-dialog python-enum34 python-funcsigs python-gdbm python-idna python-iniparse python-ipaddress python-meld3 python-minimal python-mock python-ndg-httpsclient python-openssl python-parsedatetime python-pbr python-pdfminer python-pkg-resources python-psutil python-pyasn1 python-pyicu python-requests python-rfc3339 python-six python-tz python-urllib3 python-zope.component python-zope.event python-zope.hookable python-zope.interface python2.7 python2.7-minimal python3 python3-apt python3-certbot-nginx python3-commandnotfound python3-dbus python3-distupgrade python3-gdbm python3-gi python3-minimal python3-pycurl python3-software-properties python3-update-manager python3.5 python3.5-minimal nginx nginx-common nginx-full unrar perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libdigest-md5-perl perl perl-base perl-modules mysql-server php-composer-semver php-composer-spdx-licenses  php-cli-prompt  php-fxsl  php-json-schema php-pear  php-phpseclib php-symfony-console php-symfony-filesystem php-symfony-finder php-symfony-process  php-tcpdf        openssh-client openssh-server openssh-sftp-server openssl  optipng p7zip-full parted passwd patch pax pciutils pcregrep pdf2djvu  poppler-data poppler-utils rar  rsnapshot rsync rsyslog ruby ruby-did-you-mean ruby-minitest ruby-net-telnet ruby-power-assert ruby-test-unit rubygems-integration  smartmontools software-properties-common  ssl-cert  tar tcl tcl-expect tcl8.6 tcpd tcpdump telnet  testdisk  traceroute  ubuntu-standard  unar unattended-upgrades  unrar-free unzip  usbutils util-linux uuid-runtime  zip  xpdf xterm  xfonts-75dpi xfonts-encodings xfonts-utils  update-inetd update-manager-core  wget  whois  bash bash-completion  gzip handbrake handbrake-cli  imagemagick imagemagick-common  gettext gettext-base ghostscript ghostscript-x  hdparm  letsencrypt  links linux-base linux-firmware linux-generic linux-headers-generic  logrotate  munin-common munin-doc munin-plugins-core  nano ncurses-base ncurses-bin ncurses-term  net-tools netbase mailutils gsfonts php-apcu-bc  ttf-dejavu-core pkg-php-tools 

Поключаем репозиторий PHP с разными версиями

LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
apt-get update

Ставим php 7.3

apt install   php7.3-fpm php7.3-cli php7.3-imap php7.3-json php7.3-mysql php7.3-opcache php7.3-mbstring php7.3-readline php7.3 php7.3-bz2 php7.3-cgi php7.3-cli php7.3-common php7.3-curl php7.3-dev php7.3-dom php7.3-fpm php7.3-gd php7.3-gmp php7.3-json php7.3-ldap php7.3-mbstring php7.3-mysql php7.3-odbc php7.3-opcache php7.3-pgsql php7.3-pspell php7.3-readline php7.3-recode php7.3-simplexml php7.3-snmp php7.3-sqlite3 php7.3-tidy php7.3-xml php7.3-xmlrpc php7.3-zip  php7.3-apcu php7.3-cgi php7.3-cli php7.3-common  php7.3-curl php7.3-dev php7.3-fpm  php7.3-gd php7.3-gettext php7.3-imagick php7.3-imap php7.3-intl php7.3-json php7.3-ldap php7.3-mbstring  php7.3-memcache php7.3-memcached php7.3-mysql  php7.3-pspell php7.3-readline php7.3-recode php7.3-rrd php7.3-snmp php7.3-soap php7.3-sqlite3 php7.3-sybase  php7.3-tidy php7.3-xdebug php7.3-xml php7.3-xmlrpc php7.3-zip 

Ставим PHP 5.6

apt install php5.6-fpm php5.6-cli php5.6-imap php5.6-json php5.6-mysql php5.6-opcache php5.6-mbstring php5.6-readline php5.6 php5.6-bz2 php5.6-cgi php5.6-cli php5.6-common php5.6-curl php5.6-dev php5.6-dom php5.6-fpm php5.6-gd php5.6-gmp php5.6-json php5.6-ldap php5.6-mbstring php5.6-mysql php5.6-odbc php5.6-opcache php5.6-pgsql php5.6-pspell php5.6-readline php5.6-recode php5.6-simplexml php5.6-snmp php5.6-sqlite3 php5.6-tidy php5.6-xml php5.6-xmlrpc php5.6-zip php5.6-apcu php5.6-cgi php5.6-cli php5.6-common php5.6-curl php5.6-dev php5.6-fpm php5.6-gd php5.6-gettext php5.6-imagick php5.6-imap php5.6-intl php5.6-json php5.6-ldap php5.6-mbstring php5.6-memcache php5.6-memcached php5.6-mysql php5.6-pspell php5.6-readline php5.6-recode php5.6-rrd php5.6-snmp php5.6-soap php5.6-sqlite3 php5.6-sybase php5.6-tidy php5.6-xdebug php5.6-xml php5.6-xmlrpc php5.6-zip