Ubuntu 安装 | |
|
在这里,我们有一些在带有 Apache2、MySQL/MARIADB 和 PHP5/PHP7/PHP8 的 Ubuntu Server 上安装 Tiki 的分步说明。. | |
安装 Ubuntu 服务器 | |
|
我建议在初始安装时仅安装SSH服务器。 | |
Patch it up | |
|
Copy to clipboard
| |
安装 Tiki 的其他必要组件 | |
1.1.1. Tiki 29 系统要求 | |
|
PHP 及其他系统依赖项 Copy to clipboard
| |
1.1.2. 如果你想从 Git 源码构建(适用于大多数人) | |
|
Copy to clipboard
Copy to clipboard
| |
1.2. 安装 LAMP | |
|
Copy to clipboard
| |
1.3. 安装 Tiki 的其他必要组件 | |
1.3.1. Tiki 27 LTS 系统要求 | |
|
您应该可以通过以下命令安装所需的 PHP 8.1+ 相关软件包: Copy to clipboard
Copy to clipboard
Copy to clipboard
示例步骤:
Copy to clipboard
Copy to clipboard
| |
1.3.2. Tiki 24 LTS 系统要求(如果您需要此较旧的 LTS 版本) | |
|
使用以下命令将 PPA 集成到系统中: Copy to clipboard
Copy to clipboard
Copy to clipboard
Copy to clipboard
将 php 7.4 设置为默认版本(可选)
Copy to clipboard
| |
1.3.3. 需要执行的额外步骤 | |
|
如果是全新服务器,您可能会被问到几个问题来配置一些服务器程序。
配置 postfix(用于管理服务器发送和接收电子邮件的程序)时,您可以回答如下(除非您知道自己在做什么):
配置 phpmyadmin (用于通过基于 Web 的 GUI 管理 mysql 数据库的程序)时,您可以回答如下(除非您知道自己在做什么):
然后您可以启用这些模块: Copy to clipboard
Copy to clipboard
Command on a console Copy to clipboard
Command on a console Copy to clipboard
Copy to clipboard
Copy to clipboard
对 https 的等效配置文件进行相同的编辑: Copy to clipboard
Contents of /etc/apache2/sites-enabled/000-default.conf Copy to clipboard
Contents of /etc/apache2/sites-enabled/default-ssl.conf Copy to clipboard
| |
1.4. 为tiki创建一个MySQL数据库和一个对该数据库具有本地权限的MySQL用户 | |
选项1 - 使用控制台 | |
|
我们可以为tiki创建数据库和用户。我们可以通过终端窗口操作,首先使用
commands in a terminal window Copy to clipboard
| |
选项2 - 使用phpmyadmin或adminer | |
|
或者,您可以使用已安装的PhpMyAdmin:
或者使用一个名为Adminer的小型PHP脚本来管理您的MySQL服务器,您可以通过终端中类似如下命令将其下载到服务器: Copy to clipboard
就这样。然后您需要告知tiki我们已创建:
建议按照以下步骤加固您的phpMyAdmin:https://www.atlantic.net/vps-hosting/how-to-install-and-secure-phpmyadmin-on-centos-8/
| |
1.5. 通过git安装Tiki 27 | |
|
(URL取自 http://dev.tiki.org/Get+code )
我们将通过git浅克隆获取tiki27。此选项最适合在生产服务器上检出。它大约占用214M磁盘空间。
切换目录到 /var/www 并获取该tiki27克隆: Copy to clipboard
Copy to clipboard
Copy to clipboard
此脚本通过一个名为“Composer”的程序(在需要时下载并更新它们)以及npm来管理所有Tiki依赖项。
您需要使这个tiki27文件夹可以通过Web服务器访问。您可以通过创建符号链接轻松实现。 Copy to clipboard
这将引导我们进入 tiki-install.php:
安装完成后,您可能需要手动在tiki根目录中创建指向.htaccess文件的符号链接,因为这是tiki正常运行所必需的,而且在某些情况/设置下可能不会自动创建。您可以使用以下命令: Copy to clipboard
在设置数据库连接的界面上,我们提供之前创建的数据库名称、数据库用户和密码,然后按照屏幕上的说明操作。
在新安装时,第一个用户是admin,密码为admin。我们更换密码,然后继续首次登录。
| |
1.6. 从Let's Encrypt获取免费SSL证书 | |
|
安装一个仓库以获取能正常工作的更新版软件包: Copy to clipboard
Copy to clipboard
Copy to clipboard
然后使用以下命令创建 SSL 证书: Copy to clipboard
| |
1.6.1. 通过控制台添加一些 Composer 包 | |
|
如果需要,您可以通过 console 添加一些包。 Copy to clipboard
| |
安装 Manticore 搜索 | |
|
从 Tiki26 开始,您可以在生产环境中使用 Manticore search 作为统一搜索索引。您需要为 Manticore 搜索安装一些额外的软件包:
Copy to clipboard
Copy to clipboard
| |
1.7. Install Lamp | |
|
You can install a LAMP (Linux, Apache, Mariadb, PHP) server with this command under Ubuntu: Copy to clipboard
Use these commands to integrate the PPA in the system: Copy to clipboard
Copy to clipboard
Copy to clipboard
Set php 7.4 as defaultIn case you have other php versions newer than 7.4 (such as php 8.0.x), you may set the default php version at 7.4 with these commands: Copy to clipboard
Extra steps neededIf it's a brand new server, you might be asked a few questions to configure some server programs.
To configure postfix (program to mange email sending and receiving from the server), you can answer, for instance (unless you know what you are doing):
To configure phpmyadmin (program to manage mysql databases through a web based GUI), you can answer, for instance (unless you know what you are doing):
Then you can enable the modules Copy to clipboard
Copy to clipboard
Command on a console Copy to clipboard
Command on a console Copy to clipboard
Copy to clipboard
Copy to clipboard
Copy to clipboard
Contents of /etc/apache2/sites-enabled/000-default.conf Copy to clipboard
Contents of /etc/apache2/sites-enabled/default-ssl.conf Copy to clipboard
| |
1.8. Create for tiki a mysql db and a mysql user with local perms for that db | |
Option 1 - using console | |
|
We can create a database and user for tiki. We can do so through a terminal windows converting ourselves in root in a first step with
commands in a terminal window Copy to clipboard
| |
Option 2 - use phpmyadmin or adminer | |
|
Alternatively, you can use your PhpMyAdmin install:
or a small php script to manage your mysql server, called Adminer, that you can download to your server with an instruction like this one in a terminal: Copy to clipboard
And that's all. Then you will need to tell tiki that we have created:
It is recommended to secure your phpMyAdmin by following the steps: https://www.atlantic.net/vps-hosting/how-to-install-and-secure-phpmyadmin-on-centos-8/
| |
1.9. Install Tiki 24 through git | |
|
(url's taken from http://dev.tiki.org/Get+code )
We will fetch tiki24 through git shallow clone. This option is best to checkout on production servers. It uses about 214M of disk space.
Change directory to /var/www and get that tiki24 clone:
Copy to clipboard
Copy to clipboard
Copy to clipboard
This script manages all Tiki dependencies through a program called "Composer" (it downloads and updated them when needed)
You need to make this tiki24 folder available through the webserver.
Copy to clipboard
and this will take us to tiki-install.php:
Once installed, you may need to manually create a synbolic link to .htaccess file in the tiki root folder, since it's needed for tiki to work properly and it might not get automatically created under some circumstances/setups, apparently. You can do so with the command: Copy to clipboard
At the screen to Setup the database connection, we provide the database name, db user and password that we previosuly created and we follow instructions on screen.
At the new installation, the first user is admin, with password admin. We replace the password and continue to log in for the first time.
| |
1.10. Get a free SSL Certificate from Let's Encrypt | |
|
Install a repository to get updated version of packages that will just work: Copy to clipboard
Copy to clipboard
Copy to clipboard
Then create the SSL Certificate with this command: Copy to clipboard
| |
1.10.1. Add some composer packages through console | |
|
If you want, you can add some packages through console Copy to clipboard
| |
Tiki 26+ | |
|
For Tiki26 or higher, you need php8.1. If you want to install this tiki, you will need to tweak the previous git commands to clone branch 26.x.
You should then be able to install the required PHP 8.1 packages with this command: Copy to clipboard
Copy to clipboard
| |
Tiki 27+ | |
|
For Tiki27 or higher installed through the command line, you need a fairly recent version of nodejs (v18) and npm (v10) in your system. Ubuntu 22.04 LTS comes with older versions of those programs by default. Therefore, you need to add some repository and install newer verions from there. See for instance instructions here:
Example instructions: Copy to clipboard
Copy to clipboard
| |
Install Manticore search | |
|
Since Tiki26, you can start using Manticore search for production as your unified search index. You will need to install some extra packages for manticore search:
Copy to clipboard
Copy to clipboard
| |
Related links | |
| |
1.1. Install Lamp | |
|
You can install Linux, Apache, Mysql and PHP (plus a few other helper utils such as git or subversion, etc) with: Copy to clipboard
Note
If you need to install Tiki22 or newer, you don't need to add any extra repository, since you already have php 7.4 using the default ubuntu 20.04 repositories.
Need extra repos for php 7.4+ ?+In case you need to add the extra repositories for some other reason, these are the extra commands you would need: Copy to clipboard
Add php 7.4 packagesCopy to clipboard
Set php 7.4 as defaultIn case you have other php versions newer than 7.4 (such as php 8.0.x), you may set the default php version at 7.4 with these commands: Copy to clipboard
Extra steps neededIf it's a brand new server, you might be asked a few questions to configure some server programs.
To configure postfix (program to mange email sending and receiving from the server), you can answer, for instance (unless you know what you are doing):
To configure phpmyadmin (program to manage mysql databases through a web based GUI), you can answer, for instance (unless you know what you are doing):
Then you can enable the modules Copy to clipboard
Copy to clipboard
Command on a console Copy to clipboard
Command on a console Copy to clipboard
Copy to clipboard
Copy to clipboard
Copy to clipboard
Contents of /etc/apache2/sites-enabled/000-default.conf Copy to clipboard
Contents of /etc/apache2/sites-enabled/default-ssl.conf Copy to clipboard
| |
1.2. Create for tiki a mysql db and a mysql user with local perms for that db | |
Option 1 - using console | |
|
We can create a database and user for tiki. We can do so through a terminal windows converting ourselves in root in a first step with
commands in a terminal window Copy to clipboard
| |
Option 2 - use phpmyadmin or adminer | |
|
Alternatively, you can use your PhpMyAdmin install:
or a small php script to manage your mysql server, called Adminer, that you can download to your server with an instruction like this one in a terminal: Copy to clipboard
And that's all. Then you will need to tell tiki that we have created:
It is recommended to secure your phpMyAdmin by following the steps: https://www.atlantic.net/vps-hosting/how-to-install-and-secure-phpmyadmin-on-centos-8/
| |
1.3. Use bash instead of dash | |
|
Ubuntu 20.04 comes with dash as the default shell interpreter. And Tiki shell scripts expect bash instead of dash. Therefore, one easy solution is to setup bash for your user with sudo perms in the server to use bash by default. You can do so with the command (for user username):
Copy to clipboard
| |
1.4. Install Tiki 21 through git | |
|
(url's taken from http://dev.tiki.org/Get+code )
We will fetch tiki21 through git shallow clone. This option is best to checkout on production servers. It uses about 187M of disk space.
Change directory to /var/www and get that tiki21 clone:
Copy to clipboard
Copy to clipboard
Copy to clipboard
This script manages all Tiki dependencies through a program called "Composer" (it downloads and updated them when needed)
You need to make this tiki21 folder available through the webserver.
Copy to clipboard
and this will take us to tiki-install.php:
Tip for Spanish speakers: see the video from a course on Tiki:
At the screen to Setup the database connection, we provide the database name, db user and password that we previosuly created and we follow instructions on screen.
At the new installation, the first user is admin, with password admin. We replace the password and continue to log in for the first time.
| |
1.5. Get a free SSL Certificate from Let's Encrypt | |
|
Install a repository to get updated version of packages that will just work: Copy to clipboard
Copy to clipboard
Copy to clipboard
Then create the SSL Certificate with this command: Copy to clipboard
| |
1.5.1. Add some composer packages through console | |
|
If you want, you can add some packages through console Copy to clipboard
| |
Related links | |
| |
1.1. Install Lamp | |
|
You can install Linux, Apache, Mysql and PHP (plus a few other helper utils such as git or subversion, etc) with: Copy to clipboard
Note
If you need to install Tiki22 or newer, since they require php 7.4, you will need to add a couple of extra repository to the server, in order to be able to install the php 7.4 packages. Copy to clipboard
Copy to clipboard
To configure postfix (program to mange email sending and receiving from the server), you can answer, for instance (unless you know what you are doing):
To configure phpmyadmin (program to manage mysql databases through a web based GUI), you can answer, for instance (unless you know what you are doing):
Then you can enable the modules Copy to clipboard
Copy to clipboard
Command on a console Copy to clipboard
Command on a console Copy to clipboard
Copy to clipboard
Copy to clipboard
Copy to clipboard
Contents of /etc/apache2/sites-enabled/000-default.conf Copy to clipboard
Contents of /etc/apache2/sites-enabled/default-ssl.conf Copy to clipboard
| |
1.2. Create for tiki a mysql db and a mysql user with local perms for that db | |
Option 1 - using console | |
|
We can create a database and user for tiki. We can do so through a terminal windows converting ourselves in root in a first step with
commands in a terminal window Copy to clipboard
| |
Option 2 - use phpmyadmin or adminer | |
|
Alternatively, you can use your PhpMyAdmin install:
or a small php script to manage your mysql server, called Adminer, that you can download to your server with an instruction like this one in a terminal: Copy to clipboard
And that's all. Then you will need to tell tiki that we have created:
| |
1.3. Use bash instead of dash | |
|
Ubuntu 18.04 comes with dash as the default shell interpreter. And Tiki shell scripts expect bash instead of dash. Therefore, one easy solution is to setup bash for your user with sudo perms in the server to use bash by default. You can do so with the command (for user username):
Copy to clipboard
| |
1.4. Install Tiki 21 through git | |
|
(url's taken from http://dev.tiki.org/Get+code )
We will fetch tiki21 through git shallow clone. This option is best to checkout on production servers. It uses about 187M of disk space.
Change directory to /var/www and get that tiki21 clone:
Copy to clipboard
Copy to clipboard
Copy to clipboard
This script manages all Tiki dependencies through a program called "Composer" (it downloads and updated them when needed)
You need to make this tiki21 folder available through the webserver.
Copy to clipboard
and this will take us to tiki-install.php:
Tip for Spanish speakers: see the video from a course on Tiki:
At the screen to Setup the database connection, we provide the database name, db user and password that we previosuly created and we follow instructions on screen.
At the new installation, the first user is admin, with password admin. We replace the password and continue to log in for the first time.
| |
1.4.1. Additional step for H5P | |
|
It seems that you need to create a folder for h5p to work as expected (in case you have H5P enabled in your site); otherwise, when you attempt to upload a file to a file gallery, you get an error message saying that Tiki cannot write to the corresponding folder from h5p.
You can run these commands, from the tiki root folder in the server: Copy to clipboard
| |
1.5. Get a free SSL Certificate from Let's Encrypt | |
|
Install a repository to get updated version of packages that will just work: Copy to clipboard
Copy to clipboard
Copy to clipboard
Then create the SSL Certificate with this command: Copy to clipboard
| |
1.5.1. Add some composer packages through console | |
|
If you want, you can add some packages through console Copy to clipboard
| |