Cómo instalar Tiki Wiki en Ubuntu 22.04

Tiki, también conocido como TikiWiki, es un sistema de gestión de contenidos de código abierto basado en wikis. Ayuda a los usuarios principiantes a alojar sus sitios Wiki en un minuto. Está basado en PHP y utiliza MariaDB/MySQL para almacenar su contenido. Tiki proporciona herramientas para crear sólidas bases de conocimiento, colaboración y gestión de proyectos, publicación de sitios web y blogs, servicio de asistencia CRM, e-learning y mucho más. Ofrece ricas funciones como páginas wiki, blogs, foros, archivos, multilingüe, estrechamente integrado y galerías de imágenes.

Este tutorial te mostrará cómo instalar Tiki Wiki en un servidor Ubuntu 22.04.

Requisitos previos

  • Un servidor con Ubuntu 22.04.
  • Un nombre de dominio apuntando a la IP de tu servidor.
  • Una contraseña de root configurada en el servidor.

Actualizar el sistema

En primer lugar, se recomienda actualizar los paquetes del sistema a la última versión. Puedes actualizarlos con el siguiente comando:

apt-get update -y

Una vez actualizados todos los paquetes, puedes pasar al siguiente paso.

Instalar el servidor LAMP

En primer lugar, instala el servidor web Apache y el servidor MariaDB con el siguiente comando:

apt-get install apache2 mariadb-server unzip git gnupg -y

Después de instalar los paquetes anteriores, debes instalar PHP y las extensiones necesarias en tu sistema. Tiki Wiki sólo es compatible con la versión 7.4 de PHP. Por defecto, Ubuntu 22.04 viene con la versión PHP 8.1. Así que tendrás que añadir el repositorio Ondrej PHP a tu servidor.

Puedes añadirlo con el siguiente comando:

apt-get install software-properties-common -y
add-apt-repository ppa:ondrej/php

Una vez añadido el repositorio, actualízalo e instala PHP con las extensiones necesarias ejecutando el siguiente comando:

apt-get install php7.4 php7.4-tidy php7.4-gd php7.4-xmlrpc php7.4-mbstring libapache2-mod-php7.4 php7.4-mysql php-apcu php7.4-curl php7.4-intl php7.4-sqlite3 php7.4-zip php-memcache php7.4-pspell php7.4-zip php7.4-memcached php-pear php7.4-common php7.4-opcache php7.4-xml php7.4-zip -y

Una vez instalados todos los paquetes, edita el archivo php.ini y realiza algunos cambios:

nano /etc/php/7.4/apache2/php.ini

Cambia las siguientes líneas:

memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 300
date.timezone = UTC

En este punto, el servidor LAMP está instalado en tu servidor.

Crear una base de datos para Tiki Wiki

A continuación, tendrás que crear una base de datos y un usuario para Tiki Wiki. Primero, inicia sesión en la consola MariaDB con el siguiente comando:

mysql

Una vez dentro, crea una base de datos y un usuario con el siguiente comando:

CREATE DATABASE tiki CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'tiki'@'localhost' IDENTIFIED BY 'yourpassword';

A continuación, concede todos los privilegios a la base de datos tiki con el siguiente comando:

GRANT ALL ON tiki.* TO 'tiki'@'localhost' WITH GRANT OPTION;

A continuación, vacía los privilegios y sal del intérprete de comandos MariaDB con el siguiente comando:

FLUSH PRIVILEGES;
EXIT;

Descargar Tiki Wiki

A continuación, tendrás que descargar la última versión de Tiki Wiki del sitio web Sourceforge. Puedes descargarla con el siguiente comando:

wget https://sourceforge.net/projects/tikiwiki/files/latest/download --no-check-certificate

Una vez finalizada la descarga, extrae el archivo descargado con el siguiente comando:

unzip download

A continuación, mueve el directorio extraído al directorio raíz de Apache:

mv tiki-24.2 /var/www/html/tikiwiki

A continuación, cambia la Propiedad y el permiso del directorio tikiwiki:

chown -R www-data:www-data /var/www/html/tikiwiki/
chmod -R 755 /var/www/html/tikiwiki/

En este punto, Tiki Wiki está descargado y configurado.

Configurar Apache para Tiki Wiki

A continuación, crea un archivo de configuración de host virtual Apache para Tiki Wiki con el siguiente comando:

nano /etc/apache2/sites-available/tikiwiki.conf

Añade las siguientes líneas:

<VirtualHost *:80>
     ServerAdmin [email protected]
     DocumentRoot /var/www/html/tikiwiki
     ServerName tikiwiki.example.com

     <Directory /var/www/html/tikiwiki/>
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Guarda y cierra el archivo cuando hayas terminado. A continuación, activa el host virtual de Apache con el siguiente comando:

a2ensite tikiwiki.conf

A continuación, activa el módulo de reescritura de Apache y reinicia el servicio Apache con el siguiente comando:

a2enmod rewrite
systemctl restart apache2

También puedes comprobar el estado de Apache con el siguiente comando:

systemctl status apache2

Obtendrás la siguiente salida:

? apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2022-11-20 11:44:46 UTC; 3min 43s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 122937 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
    Process: 124446 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
   Main PID: 122942 (apache2)
      Tasks: 6 (limit: 2242)
     Memory: 23.7M
        CPU: 247ms
     CGroup: /system.slice/apache2.service
             ??122942 /usr/sbin/apache2 -k start
             ??124450 /usr/sbin/apache2 -k start
             ??124451 /usr/sbin/apache2 -k start
             ??124452 /usr/sbin/apache2 -k start
             ??124453 /usr/sbin/apache2 -k start
             ??124454 /usr/sbin/apache2 -k start

Nov 20 11:44:46 ubuntu2204 systemd[1]: Starting The Apache HTTP Server...

Accede a la Interfaz Web de Tiki Wiki

Ahora, abre tu navegador web y accede a la interfaz web de Tiki Wiki utilizando la URL http://tikiwiki.example.com/tiki-install.php. Deberías ver la siguiente página:

Selecciona tu idioma y pulsa el botón Continuar. Deberías ver la siguiente página:

Haz clic en Continuar para aceptar el acuerdo de licencia. Debes ver la siguiente página:

Asegúrate de que todas las pruebas están en verde y haz clic en Continuar . Debes ver la siguiente página:

Proporciona los detalles de tu base de datos y pulsa el botón Continuar. Deberías ver la siguiente página:

Elige tu motor de Base de Datos y pulsa el botón Instalar. Una vez completada la instalación, deberías ver la siguiente página:

Haz clic en el botón Continuar. Deberías ver la siguiente página:

Proporciona la información de tu sitio y pulsa el botón Continuar. Deberías ver la siguiente página:

Haz clic en el botón Continuar. Deberías ver la página de creación del usuario administrador:

Haz clic en el botón «Entrar en Tiki y Bloquear Instalador». Deberías ver la página de creación del usuario admin:

Establece tu contraseña de administrador y pulsa el botón Aplicar. Deberías ver el panel de control de Tiki Wiki en la siguiente página:

Asegurar Tiki Wiki con Let’s Encrypt SSL

Asegurar tu sitio wiki con un certificado SSL de Let’s Encrypt es una buena idea. Para ello, debes instalar el cliente Certbot en tu sistema.

Puedes instalar el Certbot con el siguiente comando:

apt-get install certbot python3-certbot-apache -y

Una vez que el cliente Certbot se haya instalado correctamente, ejecuta el siguiente comando para instalar el SSL de Let’s Encrypt para tu sitio web:

certbot --apache -d tikiwiki.example.com

Se te pedirá que proporciones tu correo electrónico válido y que aceptes las condiciones del servicio, como se muestra a continuación:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): [email protected]

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y

Obtaining a new certificate
Performing the following challenges:
http-01 challenge for tikiwiki.example.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/tikiwiki-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/tikiwiki-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/tikiwiki-le-ssl.conf

A continuación, selecciona si deseas redirigir el tráfico HTTP a HTTPS o configurar Nginx para que redirija todo el tráfico a un acceso seguro HTTPS, como se muestra en la siguiente salida:

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2

Escribe 2 y pulsa Intro para iniciar el proceso. Una vez completada la instalación, deberías obtener la siguiente salida:

Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/tikiwiki.conf to ssl vhost in /etc/apache2/sites-available/tikiwiki-le-ssl.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://tikiwiki.example.com

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=tikiwiki.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/tikiwiki.example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/tikiwiki.example.com/privkey.pem
   Your cert will expire on 2023-02-12. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the "certonly" option. To non-interactively renew *all* of
   your certificates, run "certbot renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

En este punto, tu sitio Tiki Wiki está protegido con Let’s Encrypt SSL. Ahora puedes acceder a tu sitio de forma segura utilizando el protocolo HTTPS.

Conclusión

Enhorabuena! has instalado con éxito Tiki Wiki en el servidor Ubuntu 22.04. Ahora puedes alojar tu propio Wiki utilizando Tiki Wiki. Para más información, puedes visitar la página de documentación de Tiki Wiki. No dudes en preguntarme si tienes alguna duda.

También te podría gustar...