本文介绍Joomla 安装部署,基于Ubuntu 20.04 nginx php8.2 php-fpm
Joomla 是一款开源免费的建站工具,一直想把平时的一些感想以及碰到的问题做一个记录,在别的博客平台也能实现,但是刚好手上有台云服务器以及域名,就想着自己搭建一个自己的博客平台。对比了一下现在主流的一些CMS软件,由于本人也是略懂点开发,最终还是选择了Joomla这款软件,看中的是它的自由和灵活。
nginx
php8.2安装
首先是更换源
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo vim /etc/apt/sources.list
输入
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
执行:sudo apt update
安装依赖
1、 sudo apt install software-properties-common
2、 sudo add-apt-repository ppa:ondrej/php
3、sudo apt update
执行安装
sudo apt-get install -y php8.2-cli php8.2-dev php8.2-pgsql php8.2-sqlite3 php8.2-gd php8.2-curl php8.2-imap php8.2-mysql php8.2-mbstring php8.2-xml php8.2-zip php8.2-bcmath php8.2-soap php8.2-intl php8.2-readline php8.2-ldap php8.2-msgpack php8.2-igbinary php8.2-redis php8.2-swoole php8.2-memcached php8.2-pcov php8.2-fpm php8.2-gmp php8.2-imagick php8.2-mcrypt php8.2-uuid php8.2-yaml
修改php-fpm配置
sudo vi /etc/php/8.2/fpm/pool.d/www.conf
service php8.2-fpm restart
编辑nginx配置
server { listen 80; listen [::]:80;
server_name www.i230.com;
rewrite ^(.*)$ https://${server_name}$1 permanent;}server { listen 443 ssl; listen [::]:443 ssl;
server_name www.i230.com i230.com;
ssl_certificate certs/www.i230.com_nginx/www.i230.com_bundle.crt; ssl_certificate_key certs/www.i230.com_nginx/www.i230.com.key; ssl_session_timeout 5m; #请按照以下协议配置 ssl_protocols TLSv1.2 TLSv1.3; #请按照以下套件配置,配置加密套件,写法遵循 openssl 标准。 ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; ssl_prefer_server_ciphers on;
index index.html index.php index.htm;
location / { root /data/webapps/joomla; index index.html index.php index.htm; try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { root /data/webapps/joomla; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; include fastcgi_params; }
}