tavis nörttimaailmassa

EksisONE - artikkeleita ja ohjeita nörttimaailmasta

Nopean WordPressin asennus virtuaaliserverille

Roadmap

 

Ubuntu

apt update
apt dist-upgrade
reboot
timedatectl set-timezone Europe/Helsinki

Nginx

apt install nginx
systemctl enable nginx
unlink /etc/nginx/sites-enabled/default
nano /etc/nginx/nginx.conf
nginx -t
systemctl restart nginx

PHP/PHP-FPM


apt install php7.4-fpm php7.4-common php7.4-mysql \
php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd \
php7.4-imagick php7.4-cli php7.4-dev php7.4-imap \
php7.4-mbstring php7.4-opcache php7.4-redis \
php7.4-soap php7.4-zip -y

mv /etc/php/7.4/fpm/php-fpm.conf /etc/php/7.4/fpm/php-fpm.conf.backup
nano /etc/php/7.4/fpm/php-fpm.conf
mv/etc/php/7.4/fpm/php.ini /etc/php/7.4/fpm/php.ini.backup
nano /etc/php/7.4/fpm/php.ini
php-fpm7.4 -t
systemctl restart php7.4-fpm
systemctl enable php7.4-fpm

MariaDB

apt install mariadb-server
mysql_secure_installation

UFW

ufw app list
ufw allow 'Nginx Full'
ufw allow OpenSSH
ufw enable
ufw status

Fail2ban, asennus

apt install fail2ban

Let’s Encrypt

apt install letsencrypt
apt install python3-certbot-nginx
certbot certonly --nginx -d eksis.dev -d www.eksis.dev

Virtual Host

mkdir -p /var/www/eksis.dev/public_html
nano /etc/nginx/sites-available/eksis.dev