sudo systemctl stop snapd.service
sudo systemctl disable snapd.service
sudo add-apt-repository ppa:ondrej/php
sudo add-apt-repository ppa:nginx/mainline
sudo apt-get update
apt install unzip mysql-server nginx php7.4 php7.4-cli php7.4-fpm php7.4-json php7.4-common php7.4-xml php7.4-zip php7.4-mysql php7.4-mbstring
cd /tmp
wget https://downloads.joomla.org/cms/joomla3/3-9-21/Joomla_3-9-21-Stable-Full_Package.zip
sudo mkdir /var/www/joomla
sudo unzip Joomla_3-9-21-Stable-Full_Package.zip -d /var/www/joomla
chown -R www-data: /var/www/joomla
sudo nano /etc/nginx/sites-available/joomla
server {
listen 80;
server_name blog.stefaniak.fr www.blog.stefaniak.fr;
root /var/www/joomla;
index index.html index.htm index.php;
charset utf-8;
access_log /var/log/nginx/blog.stefaniak.fr.log;
error_log /var/log/nginx/blog.stefaniak.fr.log info;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~* /(images|cache|media|logs|tmp)/.*.(php|pl|py|jsp|asp|sh|cgi)$ {
return 403;
error_page 403 /403_error.html;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ .php$ {
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS on;
fastcgi_buffering off;
include /etc/nginx/fastcgi.conf;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
sudo ln -s /etc/nginx/sites-available/joomla /etc/nginx/sites-enabled/
sudo nginx -t
rm /etc/nginx/sites-enabled/default
sudo systemctl restart nginx
nano /etc/php/7.4/fpm/php.ini
output_buffering = Off
upload_max_filesize = 20M
post_max_size = 20M
nano /etc/nginx/nginx.conf
client_max_body_size 21M;
/etc/init.d/php7.4-fpm restart
mysql_secure_installation
# mysql -u root -p
mysql> CREATE DATABASE joomla;
mysql> CREATE USER 'joomla'@'localhost' IDENTIFIED BY 'Password123!';
mysql> GRANT ALL PRIVILEGES ON joomla.* TO 'joomla'@'localhost';
mysql> FLUSH PRIVILEGES;
Comments est propulsé par CComment