Loading...
 

History: Ubuntu Install

Preview of version: 97

Ubuntu Install


Here we have some step-by-step instructions for installing Tiki on Ubuntu Server with Apache2, MySQL5, and PHP5/PHP7.

Install Ubuntu Server

I would recommend installing only SSH Server as part of the initial install.

Patch it up

Copy to clipboard
sudo apt-get update sudo apt-get upgrade

Install Lamp

You can install Linux, Apache, Mysql and PHP (plus a few other helper utils such as subversion, etc) with:

Copy to clipboard
sudo apt install mysql-server mysql-client apache2 php php-tidy php-pear memcached php-gd php-xmlrpc phpmyadmin php-mbstring libapache2-mod-php php-mysql php-apcu php-curl php-intl php-sqlite3 php-zip postfix subversion php-memcache php-gettext php-pspell php-zip poppler-utils php-memcached bsdmainutils catdoc elinks man-db odt2txt php-pear pstotext php-common php-intl php7.1-opcache php7.1-mcrypt php7.1-xml php7.1-zip


Then you can enable the modules

Copy to clipboard
sudo phpenmod mcrypt sudo phpenmod mbstring


Extra packages for Media Alchemyst:

Copy to clipboard
sudo add-apt-repository ppa:libreoffice/libreoffice-6-0 sudo apt install libreoffice ffmpeg unoconv ghostscript php-imagick imagemagick



Enable the Apache rewrite rules:

Command on a console
Copy to clipboard
sudo a2enmod rewrite sudo service apache2 restart


And you can enable the self-signed ssl certificates to allow connections with https:

Command on a console
Copy to clipboard
sudo a2enmod ssl sudo a2ensite default-ssl sudo service apache2 restart


And add this section between the VirtualHost tags the to this file /etc/apache2/sites-enabled/000-default.conf (or equivalent for your configuration; in this case, the doc. root where tiki is installed is /var/www/html/, which is where ubuntu 16.04 comes pre-configured for the base doc root):

Copy to clipboard
sudo nano /etc/apache2/sites-enabled/000-default.conf


Section to add (just after the Document root line):

Copy to clipboard
<Directory /var/www/html/> Options Indexes FollowSymLinks MultiViews AllowOverride All ## The following lines to allow connections have changed syntax ## between apache 2.2 and apache 2.4 ## See: http://httpd.apache.org/docs/2.4/upgrading.html > Run-Time Configuration Changes > Access control #Order allow,deny #Allow from all Require all granted </Directory>


Do the same type of edit into the equivalent config file for https:

Copy to clipboard
sudo nano /etc/apache2/sites-enabled/default-ssl.conf



After the change, they should look like:

Contents of /etc/apache2/sites-enabled/000-default.conf
Copy to clipboard
<VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. #ServerName www.example.com ServerAdmin webmaster@localhost DocumentRoot /var/www/html <Directory /var/www/html/> Options Indexes FollowSymLinks MultiViews AllowOverride All #Order allow,deny #Allow from all Require all granted </Directory> # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf </VirtualHost> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Contents of /etc/apache2/sites-enabled/default-ssl.conf
Copy to clipboard
<IfModule mod_ssl.c> <VirtualHost _default_:443> ServerAdmin webmaster@localhost DocumentRoot /var/www/html <Directory /var/www/html/> Options Indexes FollowSymLinks MultiViews AllowOverride All ## The following lines to allow connections have changed syntax ## between apache 2.2 and apache 2.4 ## See: http://httpd.apache.org/docs/2.4/upgrading.html > Run-Time Configuration Changes > Access control #Order allow,deny #Allow from all Require all granted </Directory> # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf # SSL Engine Switch: # Enable/Disable SSL for this virtual host. SSLEngine on # A self-signed (snakeoil) certificate can be created by installing # the ssl-cert package. See # /usr/share/doc/apache2/README.Debian.gz for more info. # If both key and certificate are stored in the same file, only the # SSLCertificateFile directive is needed. SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key # Server Certificate Chain: # Point SSLCertificateChainFile at a file containing the # concatenation of PEM encoded CA certificates which form the # certificate chain for the server certificate. Alternatively # the referenced file can be the same as SSLCertificateFile # when the CA certificates are directly appended to the server # certificate for convinience. #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt # Certificate Authority (CA): # Set the CA certificate verification path where to find CA # certificates for client authentication or alternatively one # huge file containing all of them (file must be PEM encoded) # Note: Inside SSLCACertificatePath you need hash symlinks # to point to the certificate files. Use the provided # Makefile to update the hash symlinks after changes. #SSLCACertificatePath /etc/ssl/certs/ #SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt # Certificate Revocation Lists (CRL): # Set the CA revocation path where to find CA CRLs for client # authentication or alternatively one huge file containing all # of them (file must be PEM encoded) # Note: Inside SSLCARevocationPath you need hash symlinks # to point to the certificate files. Use the provided # Makefile to update the hash symlinks after changes. #SSLCARevocationPath /etc/apache2/ssl.crl/ #SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl # Client Authentication (Type): # Client certificate verification type and depth. Types are # none, optional, require and optional_no_ca. Depth is a # number which specifies how deeply to verify the certificate # issuer chain before deciding the certificate is not valid. #SSLVerifyClient require #SSLVerifyDepth 10 # SSL Engine Options: # Set various options for the SSL engine. # o FakeBasicAuth: # Translate the client X.509 into a Basic Authorisation. This means that # the standard Auth/DBMAuth methods can be used for access control. The # user name is the `one line' version of the client's X.509 certificate. # Note that no password is obtained from the user. Every entry in the user # file needs this password: `xxj31ZMTZzkVA'. # o ExportCertData: # This exports two additional environment variables: SSL_CLIENT_CERT and # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the # server (always existing) and the client (only existing when client # authentication is used). This can be used to import the certificates # into CGI scripts. # o StdEnvVars: # This exports the standard SSL/TLS related `SSL_*' environment variables. # Per default this exportation is switched off for performance reasons, # because the extraction step is an expensive operation and is usually # useless for serving static content. So one usually enables the # exportation for CGI and SSI requests only. # o OptRenegotiate: # This enables optimized SSL connection renegotiation handling when SSL # directives are used in per-directory context. #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory /usr/lib/cgi-bin> SSLOptions +StdEnvVars </Directory> # SSL Protocol Adjustments: # The safe and default but still SSL/TLS standard compliant shutdown # approach is that mod_ssl sends the close notify alert but doesn't wait for # the close notify alert from client. When you need a different shutdown # approach you can use one of the following variables: # o ssl-unclean-shutdown: # This forces an unclean shutdown when the connection is closed, i.e. no # SSL close notify alert is send or allowed to received. This violates # the SSL/TLS standard but is needed for some brain-dead browsers. Use # this when you receive I/O errors because of the standard approach where # mod_ssl sends the close notify alert. # o ssl-accurate-shutdown: # This forces an accurate shutdown when the connection is closed, i.e. a # SSL close notify alert is send and mod_ssl waits for the close notify # alert of the client. This is 100% SSL/TLS standard compliant, but in # practice often causes hanging connections with brain-dead browsers. Use # this only for browsers where you know that their SSL implementation # works correctly. # Notice: Most problems of broken clients are also related to the HTTP # keep-alive facility, so you usually additionally want to disable # keep-alive for those clients, too. Use variable "nokeepalive" for this. # Similarly, one has to force some clients to use HTTP/1.0 to workaround # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and # "force-response-1.0" for this. # BrowserMatch "MSIE [2-6]" \ # nokeepalive ssl-unclean-shutdown \ # downgrade-1.0 force-response-1.0 </VirtualHost> </IfModule> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet

1.2. Create for tiki a mysql db and a mysql user with local perms for that db

Use your PhpMyAdmin install:
http://example.com/phpmyadmin/

If you can't login with your mysql root password, you can use the debian-sys-maint crdentials that you will find here:
/etc/mysql/debian.cnf

  • Go to users: We remove debian-sys-maint user, to prevent system upgrades from eventually touching the mysql db's.
  • Create a new user for mysql that does NOT have all perms
    • New user is tikiuser, and we do not select neither database nor general perms for this user.
  • Go to the start page for PhpMyAdmin again
  • Create a bbdd named tiki18svn and as collation select UTF8_unicode_ci
  • Go to the users tab, and go to Databases
    • Select the db tiki18svn, and check all perms except "grant" to that user for that db


And that's all. Then you will need to tell tiki that we have created:

  • mysql db: tiki18svn
  • mysql user: tikiuser
  • mysql password: xxxxxxx (whatever you provided as password)


Alternatively, if we don't use control panel we can create a database and user for tiki.

Copy to clipboard
# mysql -p # mysql> CREATE DATABASE youraccountname_tiki; # mysql> GRANT ALL PRIVILEGES ON youraccountname_tiki.* TO 'youraccountname_yourusername'@'localhost' IDENTIFIED BY 'yourpassword'; # mysql> \q


If it's a brand new server, you are encouraged to secure your mysql installation with the provided script, and do the recommended setup steps indicated here:
https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/

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
usermod --shell /bin/bash yourusername


More information:

1.4. Install Tiki 18 through subversion

(url's taken from http://dev.tiki.org/Get+code )
Create a new folder

Create folder /var/www/html/18.x and change directory to that new folder:

Copy to clipboard
sudo mkdir /var/www/html/18.x cd /var/www/html/18.x


We fetch tiki18 through subversion to this folder:

Copy to clipboard
svn checkout https://svn.code.sf.net/p/tikiwiki/code/branches/18.x .


Then we run the Tiki setup script through console:

Copy to clipboard
bash setup.sh


You can have a look at what the script does here:
http://doc.tiki.org/setup.sh

This script manages all Tiki dependencies through a program called "Composer" (it downloads and updated them when needed)

Then you can proceed with the standard Tiki installation thorugh the web browser (replace example.com with your domain name):
http://example.com/18.x/

and this will take us to tiki-install.php:
http://example.com/18.x/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.
You have your tiki installed, ready for you to continue using the Wizards

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
sudo mkdir storage/public/h5p sudo chmod 775 storage/public/h5p

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
sudo add-apt-repository ppa:certbot/certbot sudo apt update sudo apt install python-certbot-apache


Before we can start to create the SSL cert, set the domain name in the vhost configuration file. Open the default vhost file with an editor:

Copy to clipboard
nano /etc/apache2/sites-available/000-default.conf


and add the line:

Copy to clipboard
ServerName example.com


Replace example.com with your fully qualified domain name.

Then create the SSL Certificate with this command:

Copy to clipboard
sudo certbot --apache


The command will start a wizard that asks you several questions.
If you want further customization, use other options as described or linked from here:
https://certbot.eff.org/lets-encrypt/ubuntubionic-apache

1.5.1. Add some composer packages through console

If you want, you can add some packages through console

Copy to clipboard
sudo su cd /var/www/html/ composer require --update-no-dev --prefer-dist mpdf/mpdf composer require --update-no-dev --prefer-dist fullcalendar/fullcalendar-scheduler #composer require --update-no-dev --prefer-dist xorti/mxgraph-editor # deprecated for Tiki 21.x composer require --update-no-dev --prefer-dist tikiwiki/diagram # updated for Tiki 21.x instead of mxgraph-editor composer require --update-no-dev --prefer-dist onelogin/php-saml composer require --update-no-dev --prefer-dist thiagoalessio/tesseract_ocr composer require --update-no-dev --prefer-dist npm-asset/pdfjs-dist-viewer-min #composer require --update-no-dev --prefer-dist media-alchemyst/media-alchemyst #composer require --update-no-dev --prefer-dist php-ffmpeg/php-ffmpeg composer require --update-no-dev --prefer-dist npm-asset/dexie composer require --update-no-dev --prefer-dist npm-asset/lozad composer require --update-no-dev --prefer-dist google/apiclient service apache2 restart exit


1.6. Install Lamp

You can install Linux, Apache, Mysql and PHP (plus a few other helper utils such as subversion, etc) with:

Copy to clipboard
sudo apt install mysql-server mysql-client apache2 php php-tidy php-pear memcached php-gd php-xmlrpc php-xml-parser phpmyadmin php-mbstring php-mcrypt libapache2-mod-php php-mysql php-opcache php-apcu php-curl php-intl php-sqlite3 postfix subversion php-memcache php-gettext php-pspell php-zip poppler-utils php-memcached bsdmainutils catdoc elinks man-db odt2txt php-pear pstotext php-common


Then you can enable the modules

Copy to clipboard
sudo phpenmod mcrypt sudo phpenmod mbstring


Extra packages for Media Alchemyst:

Copy to clipboard
sudo add-apt-repository ppa:libreoffice/libreoffice-5-1 sudo apt install libreoffice sudo apt-get install ffmpeg sudo apt-get install unoconv sudo apt-get install ghostscript sudo apt-get install php-imagick sudo apt-get install imagemagick



Enable the Apache rewrite rules:

Command on a console
Copy to clipboard
sudo a2enmod rewrite sudo service apache2 restart


And you can enable the self-signed ssl certificates to allow connections with https:

Command on a console
Copy to clipboard
sudo a2enmod ssl sudo a2ensite default-ssl sudo service apache2 restart


And add this section between the VirtualHost tags the to this file /etc/apache2/sites-enabled/000-default.conf (or equivalent for your configuration; in this case, the doc. root where tiki is installed is /var/www/html/, which is where ubuntu 16.04 comes pre-configured for the base doc root):

Copy to clipboard
sudo nano /etc/apache2/sites-enabled/000-default.conf


Section to add (just after the Document root line):

Copy to clipboard
<Directory /var/www/html/> Options Indexes FollowSymLinks MultiViews AllowOverride All ## The following lines to allow connections have changed syntax ## between apache 2.2 and apache 2.4 ## See: http://httpd.apache.org/docs/2.4/upgrading.html > Run-Time Configuration Changes > Access control #Order allow,deny #Allow from all Require all granted </Directory>


Do the same type of edit into the equivalent config file for https:

Copy to clipboard
sudo nano /etc/apache2/sites-enabled/default-ssl.conf



After the change, they should look like:

Contents of /etc/apache2/sites-enabled/000-default.conf
Copy to clipboard
<VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. #ServerName www.example.com ServerAdmin webmaster@localhost DocumentRoot /var/www/html <Directory /var/www/html/> Options Indexes FollowSymLinks MultiViews AllowOverride All #Order allow,deny #Allow from all Require all granted </Directory> # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf </VirtualHost> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Contents of /etc/apache2/sites-enabled/default-ssl.conf
Copy to clipboard
<IfModule mod_ssl.c> <VirtualHost _default_:443> ServerAdmin webmaster@localhost DocumentRoot /var/www/html <Directory /var/www/html/> Options Indexes FollowSymLinks MultiViews AllowOverride All ## The following lines to allow connections have changed syntax ## between apache 2.2 and apache 2.4 ## See: http://httpd.apache.org/docs/2.4/upgrading.html > Run-Time Configuration Changes > Access control #Order allow,deny #Allow from all Require all granted </Directory> # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf # SSL Engine Switch: # Enable/Disable SSL for this virtual host. SSLEngine on # A self-signed (snakeoil) certificate can be created by installing # the ssl-cert package. See # /usr/share/doc/apache2/README.Debian.gz for more info. # If both key and certificate are stored in the same file, only the # SSLCertificateFile directive is needed. SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key # Server Certificate Chain: # Point SSLCertificateChainFile at a file containing the # concatenation of PEM encoded CA certificates which form the # certificate chain for the server certificate. Alternatively # the referenced file can be the same as SSLCertificateFile # when the CA certificates are directly appended to the server # certificate for convinience. #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt # Certificate Authority (CA): # Set the CA certificate verification path where to find CA # certificates for client authentication or alternatively one # huge file containing all of them (file must be PEM encoded) # Note: Inside SSLCACertificatePath you need hash symlinks # to point to the certificate files. Use the provided # Makefile to update the hash symlinks after changes. #SSLCACertificatePath /etc/ssl/certs/ #SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt # Certificate Revocation Lists (CRL): # Set the CA revocation path where to find CA CRLs for client # authentication or alternatively one huge file containing all # of them (file must be PEM encoded) # Note: Inside SSLCARevocationPath you need hash symlinks # to point to the certificate files. Use the provided # Makefile to update the hash symlinks after changes. #SSLCARevocationPath /etc/apache2/ssl.crl/ #SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl # Client Authentication (Type): # Client certificate verification type and depth. Types are # none, optional, require and optional_no_ca. Depth is a # number which specifies how deeply to verify the certificate # issuer chain before deciding the certificate is not valid. #SSLVerifyClient require #SSLVerifyDepth 10 # SSL Engine Options: # Set various options for the SSL engine. # o FakeBasicAuth: # Translate the client X.509 into a Basic Authorisation. This means that # the standard Auth/DBMAuth methods can be used for access control. The # user name is the `one line' version of the client's X.509 certificate. # Note that no password is obtained from the user. Every entry in the user # file needs this password: `xxj31ZMTZzkVA'. # o ExportCertData: # This exports two additional environment variables: SSL_CLIENT_CERT and # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the # server (always existing) and the client (only existing when client # authentication is used). This can be used to import the certificates # into CGI scripts. # o StdEnvVars: # This exports the standard SSL/TLS related `SSL_*' environment variables. # Per default this exportation is switched off for performance reasons, # because the extraction step is an expensive operation and is usually # useless for serving static content. So one usually enables the # exportation for CGI and SSI requests only. # o OptRenegotiate: # This enables optimized SSL connection renegotiation handling when SSL # directives are used in per-directory context. #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory /usr/lib/cgi-bin> SSLOptions +StdEnvVars </Directory> # SSL Protocol Adjustments: # The safe and default but still SSL/TLS standard compliant shutdown # approach is that mod_ssl sends the close notify alert but doesn't wait for # the close notify alert from client. When you need a different shutdown # approach you can use one of the following variables: # o ssl-unclean-shutdown: # This forces an unclean shutdown when the connection is closed, i.e. no # SSL close notify alert is send or allowed to received. This violates # the SSL/TLS standard but is needed for some brain-dead browsers. Use # this when you receive I/O errors because of the standard approach where # mod_ssl sends the close notify alert. # o ssl-accurate-shutdown: # This forces an accurate shutdown when the connection is closed, i.e. a # SSL close notify alert is send and mod_ssl waits for the close notify # alert of the client. This is 100% SSL/TLS standard compliant, but in # practice often causes hanging connections with brain-dead browsers. Use # this only for browsers where you know that their SSL implementation # works correctly. # Notice: Most problems of broken clients are also related to the HTTP # keep-alive facility, so you usually additionally want to disable # keep-alive for those clients, too. Use variable "nokeepalive" for this. # Similarly, one has to force some clients to use HTTP/1.0 to workaround # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and # "force-response-1.0" for this. # BrowserMatch "MSIE [2-6]" \ # nokeepalive ssl-unclean-shutdown \ # downgrade-1.0 force-response-1.0 </VirtualHost> </IfModule> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet

1.7. Create for tiki a mysql db and a mysql user with local perms for that db

Use your PhpMyAdmin install:
http://example.com/phpmyadmin/

If you can't login with your mysql root password, you can use the debian-sys-maint crdentials that you will find here:
/etc/mysql/debian.cnf

  • Go to users: We remove debian-sys-maint user, to prevent system upgrades from eventually touching the mysql db's.
  • Create a new user for mysql that does NOT have all perms
    • New user is tikiuser, and we do not select neither database nor general perms for this user.
  • Go to the start page for PhpMyAdmin again
  • Create a bbdd named tiki18svn and as collation select UTF8_unicode_ci
  • Go to the users tab, and go to Databases
    • Select the db tiki18svn, and check all perms except "grant" to that user for that db


And that's all. Then you will need to tell tiki that we have created:

  • mysql db: tiki18svn
  • mysql user: tikiuser
  • mysql password: xxxxxxx (whatever you provided as password)


Alternatively, if we don't use control panel we can create a database and user for tiki.

Copy to clipboard
# mysql -p # mysql> CREATE DATABASE youraccountname_tiki; # mysql> GRANT ALL PRIVILEGES ON youraccountname_tiki.* TO 'youraccountname_yourusername'@'localhost' IDENTIFIED BY 'yourpassword'; # mysql> \q

1.8. Install Tiki 18 through subversion

(url's taken from http://dev.tiki.org/Get+code )
Create a new folder

Create folder /var/www/html/18.x and change directory to that new folder:

Copy to clipboard
sudo mkdir /var/www/html/18.x cd /var/www/html/18.x


We fetch tiki18 through subversion to this folder:

Copy to clipboard
svn checkout https://svn.code.sf.net/p/tikiwiki/code/branches/18.x .


Then we run the Tiki setup script through console:

Copy to clipboard
sh setup.sh


You can have a look at what the script does here:
http://doc.tiki.org/setup.sh

This script manages all Tiki dependencies through a program called "Composer" (it downloads and updated them when needed)

Then you can proceed with the standard Tiki installation thorugh the web browser (replace example.com with your domain name):
http://example.com/18.x/

and this will take us to tiki-install.php:
http://example.com/18.x/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.
You have your tiki installed, ready for you to continue using the Wizards

1.9. 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
sudo add-apt-repository ppa:certbot/certbot sudo apt update sudo apt install python-certbot-apache


Before we can start to create the SSL cert, set the domain name in the vhost configuration file. Open the default vhost file with an editor:

Copy to clipboard
nano /etc/apache2/sites-available/000-default.conf


and add the line:

Copy to clipboard
ServerName example.com


Replace example.com with your fully qualified domain name.

Then create the SSL Certificate with this command:

Copy to clipboard
sudo certbot --apache


The command will start a wizard that asks you several questions.
If you want further customization, use other options as described or linked from here:
https://certbot.eff.org/lets-encrypt/ubuntuxenial-apache

1.10. Install Lamp

You can choose to install it through tasksel (tested with Ubuntu 14.04 LTS) plus a few other handy packages, just in case they do not come along with the lamp-server itself:

Copy to clipboard
sudo apt-get install tasksel sudo tasksel install lamp-server sudo apt-get install mysql-server mysql-client apache2 php5 php5-tidy php-pear memcached php5-xcache php5-gd php5-xmlrpc php-xml-parser phpmyadmin sendmail

For later Ubuntu versions
Copy to clipboard
sudo apt-get install libapache2-mod-php php-mysql


Then you can enable the module

Copy to clipboard
sudo php5enmod mcrypt



Enable the Apache rewrite rules:

Command on a console
Copy to clipboard
sudo a2enmod rewrite sudo service apache2 restart


And add this section between the VirtualHost tags the to this file /etc/apache2/sites-enabled/000-default.conf (or equivalent for your configuration; in this case, the doc. root where tiki is installed is /var/www/html/, which is where ubuntu 14.04 comes pre-configured for the base doc root):

Copy to clipboard
sudo nano /etc/apache2/sites-enabled/000-default.conf


Section to add (just after the Document root line):

Copy to clipboard
<Directory /var/www/html/> Options Indexes FollowSymLinks MultiViews AllowOverride All ## The following lines to allow connections have changed syntax ## between apache 2.2 and apache 2.4 ## See: http://httpd.apache.org/docs/2.4/upgrading.html > Run-Time Configuration Changes > Access control #Order allow,deny #Allow from all Require all granted </Directory>



After the change, it should look like:

Contenido de /etc/apache2/sites-enabled/000-default.conf
Copy to clipboard
<VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. #ServerName www.example.com ServerAdmin webmaster@localhost DocumentRoot /var/www/html <Directory /var/www/html/> Options Indexes FollowSymLinks MultiViews AllowOverride All #Order allow,deny #Allow from all Require all granted </Directory> # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf </VirtualHost> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet

1.11. Enable phpmyadmin if needed

You may need to do this, even if in previous ubuntu versions it didn't seem to be needed:

Copy to clipboard
sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf sudo ln -s /etc/apache2/conf-available/phpmyadmin.conf /etc/apache2/conf-enabled/phpmyadmin.conf service apache2 restart


Then you can reach your mysql ddbb to manage them through PhpMyAdmin at (replace example.com with your domain name):
http://example.com/phpmyadmin/

1.12. Create for tiki a mysql db and a mysql user with local perms for that db

Use your PhpMyAdmin install:

  • Go to users: We remove debian-sys-maint user, to prevent system upgrades from eventually touching the mysql db's.
  • Create a new user for mysql that does NOT have all perms
    • New user is tikiuser, and we do not select neither database nor general perms for this user.
  • Go to the start page for PhpMyAdmin again
  • Create a bbdd named tiki12svn and as collation select UTF8_unicode_ci
  • Go to the users tab, and go to Databases
    • Select the db tiki12svn, and check all perms except "grant" to that user for that db


And that's all. Then you will need to tell tiki that we have created:

  • mysql db: tiki12svn
  • mysql user: tikiuser
  • mysql password: xxxxxxx (whatever you provided as password)

1.13. Install Tiki 12 through subversion

(url's taken from http://dev.tiki.org/Get+code )
Create a new folder

Create folder /var/www/html/12.x and change directory to that new folder:

Copy to clipboard
sudo mkdir /var/www/html/12.x cd /var/www/html/12.x


We fetch tiki12 through subversion to this folder:

Copy to clipboard
svn checkout https://svn.code.sf.net/p/tikiwiki/code/branches/12.x .


Then we run the Tiki setup script through console:

Copy to clipboard
sh setup.sh


You can have a look at what the script does here:
http://doc.tiki.org/setup.sh

This script manages all Tiki dependencies through a program called "Composer" (it downloads and updated them when needed)

Then you can proceed with the standard Tiki installation thorugh the web browser (replace example.com with your domain name):
http://example.com/12.x/

and this will take us to tiki-install.php:
http://example.com/12.x/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.
You have your tiki installed, ready for you to continue using the Wizards


This how-to has been tested on Ubuntu server 9.04, but should work fine also with more recent Ubuntu GNU/Linux distributions. Tiki is working fine in many Tiki 10.04 and 12.04 setups (with slightly different setup procedures, maybe): therefore, some effort to converge all documentation in this page is underway.

Install LAMP

You can choose to install it through tasksel (untested in Ubuntu 12.04 LTS):

Copy to clipboard
sudo apt-get install tasksel sudo tasksel install lamp-server


Or alternatively to a tasksel-based installation of lamp, you can install the required packages by hand as usual (and their dependencies) automagically, which has been tested on Ubuntu 12.04 and works fine:

Copy to clipboard
sudo apt-get install mysql-server mysql-client apache2 php5 php5-tidy php-pear memcached php5-xcache php5-gd php5-xmlrpc php-xml-parser phpmyadmin sendmail

Install stuff for Image Galleries

Copy to clipboard
sudo apt-get install imagemagick php5-imagick php5-gd graphviz

Download latest stable Tiki version

These are hosted on SourceForge, if you want to grab the most current stable version directly:
Tiki 9.x (LTS) or the latest stable at each moment in time.

http://info.tiki.org/Download

Alternatively, you can also Get code from SVN.

Copy to clipboard
sudo apt-get install subversion

Move the Tiki tarball to where you need it

Get the latest tarball from http://info.tiki.org/Download
As an example, it's described here with Tiki 9.2.:

Copy to clipboard
sudo mv tikiwiki-9.2.tar.gz /var/www/html/

Extract Tiki

Copy to clipboard
cd /var/www/html sudo tar -xvzf tikiwiki-9.2.tar.gz

Install Tiki

Copy to clipboard
cd /var/www/html/tikiwiki-9.2 sudo sh setup.sh
Copy to clipboard
User [www-data]: Group [www-data]: Multi []: Checking dirs : backups ... ok. db ... ok. dump ... ok. img/wiki ... ok. img/wiki_up ... ok. img/trackers ... ok. modules/cache ... ok. temp ... ok. temp/cache ... ok. templates_c ... ok. templates ... ok. styles ... ok. maps ... ok. whelp ... ok. mods ... ok. files ... ok. tiki_tests/tests ... ok. lib/Galaxia/processes ... ok. Fix global perms ... chowned ... done. Fix special dirs ... done.

Setup MySQL for the Tiki database.

We'll create the database and create a user with rights to the Tiki database. In the following example, the database name is tiki, the username is tiki, and the password for tiki is tikipassword. You'll need this information later when we configure Tiki, so make sure you write this stuff down. Replace names as you see fit.

Copy to clipboard
mysql -u root -p

You'll be prompted for your mysql root password you entered earlier, then are met with the mysql prompt. Type the following commands exactly as shown.

Copy to clipboard
mysql>CREATE DATABASE tikiwiki default character set 'UTF8'; mysql>GRANT ALL ON tikiwiki.* TO 'tiki'@'localhost' IDENTIFIED BY 'tikipassword'; mysql>QUIT

Update your default directory for Apache. Use vim or nano to edit.

Copy to clipboard
sudo nano -w /etc/apache2/apache2.conf

Add the following line to the end of the <Directory /var/www> section (just above the ending </Directory>)

Copy to clipboard
RedirectMatch ^/$ /tikiwiki-9.2/


It's not clear that this step might interfere with latest behavior or rewrite rules found in .htaccess file distributed (as _htaccess) by Tiki. If you experience any issues, don't do this step, and just use your tiki from your subfolder (add the subfolder to the path in the browser). Or adapt the base path in your /etc/apache2/sites-available/default (or equivalent) file, etc.

If you keep accessing your tiki from a subfolder, adapt the corresponding part of the .htaccess file in the tiki root file tree:

Copy to clipboard
# You may need to uncomment and fix the RewriteBase value below to suit your installation. e.g. if your Tiki is not installed directly in the web root. RewriteBase /tikiwiki-9.2



Enable rewrite rules for Apache web server

Copy to clipboard
sudo a2enmod rewrite sudo service apache2 restart


And add this section between the VirtualHost tags the to this file /etc/apache2/sites-enabled/000-default.conf (or equivalent for your configuration; in this case, the doc. root where tiki is installed is /var/www/ ):

Copy to clipboard
sudo nano /etc/apache2/sites-enabled/000-default.conf


Section to add (just after the Documen root line):

Copy to clipboard
<Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory>

Give yourself some more memory for PHP

Note it may not be necessary as the default is now 128M, but just in case:

Copy to clipboard
sudo nano -w /etc/php5/apache2/php.ini

change

Copy to clipboard
memory_limit = 16M ; Maximum amount of memory a script may consume (16MB)

to memory_limit = 128M

PHP sendmail Ubuntu

To get it working in the end I had to:

Copy to clipboard
sudo apt-get install sendmail

Check its working

Copy to clipboard
ps -aux | grep sendmail

Edit your php.ini to uncomment sendmail:

located in
Copy to clipboard
sudo nano -w /etc/php5/apache2/php.ini
Copy to clipboard
;sendmail_path =

to

Copy to clipboard
sendmail_path = /usr/sbin/sendmail -t -i
Copy to clipboard
[mail function] ; For Win32 only. ;SMTP = localhost ;smtp_port = 25 ; For Win32 only. ;sendmail_from = me@example.com ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). sendmail_path = /usr/sbin/sendmail -t -i ; Force the addition of the specified parameters to be passed as extra parameters ; to the sendmail binary. These parameters will always replace the value of ; the 5th parameter to mail(), even in safe mode. ;mail.force_extra_parameters =

Or use Postfix instead of Sendmail

Copy to clipboard
sudo apt-get install postfix


No extra configuration is of either Postfix or PHP is required, beyond choosing which sort of mail system you're setting up, which is explained during Postfix installation. It just works, at least in my virgin 6.x Tiki install on a virgin Ubuntu Lucid. Tiki can send mail.

Restart Apache

Copy to clipboard
sudo /etc/init.d/apache2 restart

Configure Tiki

Point a browser to http://hostname/tikiwiki-9.2/tiki-install.php
Replace "hostname" above with actual hostname or IP address
Database type is MySQL Improved
Database name is tikiwiki
Database User is tiki
Password is tikipassword

You can also see the standard documentation about the installation
http://doc.tiki.org/Installation

and see how to apply a configuration profile to adapt your tiki to your own use ase with just a few clicks:

Applying Profiles

Starting in Tiki4, the interface has been improved and streamlined. No more profiles at install time, but a nicer profile manager anytime :-)

Applying the configuration profile "Bug_Tracker"



Profiles can also be applied at any time after Tiki is installed by following these steps:

  1. Log into Tiki as an administrator
  2. Open the Administration page (click the "Admin Home" link in the menu)
  3. Click on the Profiles link
  4. Show profiles available in the registered repositories by clicking List. You can filter the list of profiles by name, type and repository if you like.
  5. Click on the name of the profile you want to apply. Details about that profile will be obtained from the repository and displayed for your review.
  6. Click the Apply Now button

Enjoy!


Note: sendmail still needs some work. I suspect the email is being send to the server but is going no where. I suspect that if you setting up Tiki with professional hosting you won't need to worry about sendmail?

Related links



Alias names for this page:
UbuntuInstall | Install Ubuntu | InstallUbuntu

History

Advanced
Information Version
Xavi (as xavidp - admin) command to start manticore search server side 151
Xavier de Pedro info for tiki26 and manticore search 150
Volker Wysk Noted that Tiki 25 actually needs PHP 7.4 149
Xavier de Pedro replacing mysql with mariaadb, otherwise the instructions further down in the tutorial will faill, because root will not be able to connect withtout password to mysql in the console, and changing that setup is too complicated for intro tutorial 148
Volker Wysk 147
Xavier de Pedro 146
Xavier de Pedro 145
Xavier de Pedro removed section (tab) for 16.04 and added tab for 22.04 cloning content (as a starting point) from the tab 20.04. 144
Xavier de Pedro missing package 143
Xavier de Pedro added php7.4-bz2 142
Xavier de Pedro added libapache2-mod-php7.4 as it was not explicitly listed 141
Xavi (as xavidp - admin) 140
Xavi (as xavidp - admin) 139
Xavi (as xavidp - admin) 138
Xavi (as xavidp - admin) 137
Xavier de Pedro 136
Xavier de Pedro 135
Xavier de Pedro 134
Xavier de Pedro 133
Xavier de Pedro added info on how to set default phhp v to 7.4 (instead of 8.0.x for instance) and add git to the list of programs to get installed 132
Xavier de Pedro removed old content 131
Xavier de Pedro 130
Xavier de Pedro 129
Xavier de Pedro 128
Hitesh mohanbhai jethva Add a link to secure phpMyAdmin 127
Xavier de Pedro 126
Xavier de Pedro updated php modules needed for tiki22 125
aristo compasso mysql 8 syntax changed for creating user and granting privileges 124
aristo compasso Updated install LAMP command. php7.2 packages are not found, 123
Xavier de Pedro 122
Xavier de Pedro 121
Xavier de Pedro 120
Xavier de Pedro 119
Xavier de Pedro 118
Xavier de Pedro added ldap php module for the cases in which tiki admins would like to setup conection/login against ldap server 117
Xavier de Pedro 116
Xavier de Pedro 115
Xavier de Pedro 114
Xavier de Pedro 113
Xavier de Pedro 112
Xavier de Pedro 111
Xavier de Pedro 110
Xavier de Pedro 109
Xavier de Pedro 108
Xavier de Pedro 107
Xavier de Pedro 106
Xavier de Pedro 105
Xavier de Pedro 104
Xavier de Pedro 103
Xavier de Pedro 102

doc.tiki.org

Get Started

Admin Guide User Guide

Keywords

Keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Accessibility (WAI and 508)
Accounting
Articles and Submissions
Backlinks
Banners
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution
Cookie
Copyright
Credit
Custom Home and Group Home Page
Date and Time
Debugger Console
Directory of hyperlinks
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
Draw
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Mail-in
Map with Mapserver
Menu
Meta Elements
Mobile Tiki and Voice Tiki
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Semantic links
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags
Task
Tell a Friend, alert + Social Bookmarking
TikiTests
Theme CSS & Smarty
Tiki Manager
Trackers
Transitions
User Administration including registration and banning
User Files
User Menu
Watch
WebDAV
Webmail
Web Services
Wiki History, page rename, etc
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG
XMLRPC

Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki