T3 Package中的内容(没有集成joomla)
daqi@chuse:/var/www//sites/100_study/joomla/lesson01$ tree -L 2.├── CHANGELOG.md├── LICENSE.txt├── pkg_t3.script.php├── pkg_t3.xml├── README.md├── source│ ├── plg_system_t3│ ├── tpl_t3_blank│ └── tpl_t3_bs3_blank└── translations├── fr-FR├── hu-HU├── it-IT└── README.md
一:解压
解压Joomla_3.9.3-Stable-Full_Package.zip
到E:\\sites\100_study\joomla\lesson01
,该目录是项目根目录,以下以@
代替,它在虚拟机ubuntu中对应的目录是/var/www//sites/100_study/joomla/lesson01
二:配置
01: host配置
# C:\Windows\System32\drivers\etc\hosts127.0.0.1
02: nginx配置
# /opt/nginx/conf/nginx.conf 的内容user www-data;worker_processes 2;events {worker_connections 1024;}http {include mime.types;default_type application/octet-stream;sendfile on;keepalive_timeout 65;client_max_body_size 128M;server{server_name ;include /var/www//sites/000_nginx_config/;}server{server_name ;include /var/www//sites/000_nginx_config/;}}
# /var/www//sites/000_nginx_config/ 的内容root /var/www//sites/100_study/joomla/lesson01;index index.php index.html index.htm default.html default.htm;access_log /var/www//sites/000_nginx_config/log/100.a.joomla.access.log; error_log /var/www//sites/000_nginx_config/log/100.a,joomla.error.log error; include /var/www//sites/000_nginx_config/common_joomla;
# /var/www//sites/000_nginx_config/common_joomla的内容location /echo{add_header Content-Type "text/plain;charset=utf-8";echo "根目录是";echo $document_root;echo "当前请求的uri";echo $request_uri;}# Support Clean (aka Search Engine Friendly) URLslocation / {try_files $uri $uri/ /index.php?$args;}# deny running scripts inside writable directorieslocation ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {return 403;error_page 403 /403_error.html;}location ~ \.php$ {# fastcgi_pass 127.0.0.1:9000;fastcgi_pass unix:/run/php/php7.0-fpm.sock; fastcgi_index index.php;include fastcgi_params;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;include /opt/nginx/conf/fastcgi.conf;}# caching of files location ~* \.(ico|pdf|flv)$ {expires 1y;}location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {expires 14d;}
三:安装joomla
重启服务器,在浏览器中输入会直接跳到安装页面,在@/includes/framework.php文件中,通过判断是否存在文件@/configuration.php,来判断是否要跳转到安装入口文件@/installation/index.php
第一步:填写站名及超级用户
我超级用户名为today,密码为tomorrow
第二步:数据库配置
先建数据库joomla01
(可以不用先建),及用户abcd
,密码为1234
mysql> CREATE DATABASE IF NOT EXISTS joomla01 DEFAULT CHARSET utf8 COLLATE utf8_general_ci;Query OK, 1 row affected (0.04 sec)mysql> GRANT ALL PRIVILEGES ON joomla01.* TO 'abcd'@'%' IDENTIFIED BY '1234' WITH GRANT OPTION;Query OK, 0 rows affected, 1 warning (0.00 sec)
第三步:信息确认
第四步:安装
整个安装耗时28秒,很快。安装完后,请将@/installation
目录删除或改名,此时可以安装语言包,但一般进入后台安装。
前台地址:
后台地址: /administrator/
四:安装T3框架
下载T3 Package
或T3 Quickstart for Joomla 3.9.0
,quickstart是集成了joomla和样本数据,我下载的是T3 Package,下载后放在哪里都行,我放在E:\t3-2.7.4.zip
后台->Extensions->Manage->Install,从本地安装上面的E:\t3-2.7.4.zip