https://wiki.archlinux.org/api.php?action=feedcontributions&user=Aexoxea&feedformat=atomArchWiki - User contributions [en]2017-12-14T02:57:20ZUser contributionsMediaWiki 1.29.2https://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492910User:Aexoxea/Tiki Wiki CMS Groupware2017-10-11T12:24:29Z<p>Aexoxea: /* Choose your update path */ Consistency.</p>
<hr />
<div>{{warning|This is a work in progress and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a web-based content management system with collaboration features written in PHP.<br />
<br />
== Package Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements#PHP Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once made, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] (for new installs) or [[#Choose your update path|Choose your update path]] (for updates) below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Install Tiki ===<br />
<br />
Install the Tiki package that you made above.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, use Apache.<br />
<br />
{{note|Tiki won't be accessible after setting up the web server, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to:<br />
<br />
# Install Apache per the instructions at [[Apache HTTP Server#Installation]].<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is enabled (it is by default).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other web server ====<br />
<br />
Essentially the same steps as for Apache. You will need to consult the relevant ArchWiki page (or other documentation) for your web server in order to:<br />
<br />
# Install your web server.<br />
# Configure your web server to run PHP.<br />
# Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
# Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or Oracle MySQL, though it's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Regardless, you need to install, set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. You will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new database user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. If your PHP install is new, this should already be enabled.<br />
* Enable the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|If using Apache, you will need to restart the web server now for these changes to take effect. Reloading or restarting the web server may also be needed for other web servers; consult your documentation.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your updated Tiki site. Once there, continue with [[#After updating|After updating]] below.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== Choose your update path ===<br />
<br />
Make the new package (see [[#Package Tiki|Package Tiki]] above), then choose '''one''' of the following paths to install it:<br />
<br />
* '''Update-in-place:''' Install the new package over the existing package.<br />
* '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then install the new package.<br />
<br />
The update-in-place path will work in ''most'' circumstances. However, if you run into difficulties relating to Tiki's package files during or after the update, the remove-then-install path will enable you to troubleshoot around what files are left behind under {{ic|/usr/share/webapps/tikiwiki/}} after removing the old version but before installing the new version.<br />
<br />
{{warning|It is ''not'' guaranteed that customisations to Tiki package files will be retained through either update path, or that they will work properly. If you make customisations, it is recommended to store them elsewhere (e.g. in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system]), so you can [[List of applications/Utilities#Comparison, diff, merge|merge]] them back in after updating as needed. Alternatively, you can consider submitting generally useful changes upstream.}}<br />
<br />
{{note|Depending upon how Tiki has been configured, be aware that some of the directories may contain uploaded files (e.g. images and other attachments). They should not be impacted by the update process, but if you would prefer they be located elsewhere, there are options to do so after updating successfully. See [[#File Storage|File Storage]] below for details.}}<br />
<br />
Once you've installed the new package successfully, continue with [[#Configure Tiki|Configure Tiki]] above.<br />
<br />
=== After updating ===<br />
<br />
Log in to your site, check that everything is as it should be, and when you're ready, re-open the site (if you closed it before). Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under Tiki's &quot;[https://doc.tiki.org/New-in-version New in version]&quot; page.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel etc. as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. The [[Security]] ArchWiki page complements this in respect of securing the underlying operating system. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}} (or equivalent), enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. Make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. At a minimum, you should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
=== File Storage ===<br />
<br />
Tiki is able to store uploaded files either in its database or on the file system. The pros and cons of each approach are covered on Tiki's [https://doc.tiki.org/File+Storage File Storage] page.<br />
<br />
If storing uploaded files on the file system, by default these will be kept in directories under {{ic|/usr/share/webapps/tikiwiki/}}. There are a number of reasons why you might want to move them elsewhere. Again, the options to do so are outlined on Tiki's [https://doc.tiki.org/File+Storage File Storage] page, and on the related Control Panel pages for the specific features that accept file uploads.<br />
<br />
{{note|Where directories are created outside the {{ic|/usr/share/webapps/tikiwiki/}} hierarchy, be sure appropriate web server options and local file permissions are set so they can be accessed (e.g. if using Apache, update the {{ic|/etc/httpd/conf/extra/tikiwiki.conf}} file so that the directories are included in the {{ic|open_basedir}} parameter, and make sure the directories are owned by {{ic|http:http}}).}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or equivalent).<br />
# Enable {{ic|1=extension=iconv.so}} and {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
=== Timeout updating database on large sites ===<br />
<br />
If you have a large site, PHP timeout values may be exceeded when updating the database (as part of updating Tiki to a new version) in the web-based workflow. Should this occur, you have two choices:<br />
<br />
# Extend PHP's timeout values, then try again.<br />
# Run the database update from the command line, then manually lock the installer (you ''should'' then be able to skip the web-based workflow, and continue from [[#After updating|After updating]]):<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# '''php''' console.php database:update<br />
# touch db/lock}}<br />
<br />
Substitute '''{{ic|php}}''' in the command line example above if using a version from PHP from the AUR.<br />
<br />
=== &quot;Installer not locked&quot; warning ===<br />
<br />
A warning will appear in the Control Panel if the installer lock file is missing. This can occur if the Tiki package is uninstalled and reinstalled, or the package is updated but the web-based install workflow has not been gone through.<br />
<br />
In circumstances where there is no need to go through the web-based install workflow, you need to manually create the lock file as suggested in the warning. The easiest way to do this from the command line is:<br />
{{bc|# touch /usr/share/webapps/tikiwiki/db/lock}}<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
If running [[Namcap]] on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}<br />
<br />
== See Also ==<br />
<br />
* [https://tiki.org/ Tiki Home Page].<br />
* [https://doc.tiki.org Tiki Documentation].<br />
* [https://tiki.org/Community Tiki Community] -- Includes user forums and the development mailing list.<br />
* [https://dev.tiki.org/ Tiki Development] -- Includes a bug tracker and related information.</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492909User:Aexoxea/Tiki Wiki CMS Groupware2017-10-11T12:21:23Z<p>Aexoxea: /* Tips and Tricks */ Added File Storage information.</p>
<hr />
<div>{{warning|This is a work in progress and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a web-based content management system with collaboration features written in PHP.<br />
<br />
== Package Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements#PHP Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once made, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] (for new installs) or [[#Choose your update path|Choose your update path]] (for updates) below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Install Tiki ===<br />
<br />
Install the Tiki package that you made above.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, use Apache.<br />
<br />
{{note|Tiki won't be accessible after setting up the web server, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to:<br />
<br />
# Install Apache per the instructions at [[Apache HTTP Server#Installation]].<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is enabled (it is by default).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other web server ====<br />
<br />
Essentially the same steps as for Apache. You will need to consult the relevant ArchWiki page (or other documentation) for your web server in order to:<br />
<br />
# Install your web server.<br />
# Configure your web server to run PHP.<br />
# Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
# Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or Oracle MySQL, though it's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Regardless, you need to install, set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. You will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new database user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. If your PHP install is new, this should already be enabled.<br />
* Enable the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|If using Apache, you will need to restart the web server now for these changes to take effect. Reloading or restarting the web server may also be needed for other web servers; consult your documentation.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your updated Tiki site. Once there, continue with [[#After updating|After updating]] below.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== Choose your update path ===<br />
<br />
Make the new package (see [[#Package Tiki|Package Tiki]] above), then choose '''one''' of the following paths to install it:<br />
<br />
* '''Update-in-place:''' Install the new package over the existing package.<br />
* '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then install the new package.<br />
<br />
The update-in-place path will work in ''most'' circumstances. However, if you run into difficulties relating to Tiki's package files during or after the update, the remove-then-install path will enable you to troubleshoot around what files are left behind under {{ic|/usr/share/webapps/tikiwiki}} after removing the old version but before installing the new version.<br />
<br />
{{warning|It is ''not'' guaranteed that customisations to Tiki package files will be retained through either update path, or that they will work properly. If you make customisations, it is recommended to store them elsewhere (e.g. in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system]), so you can [[List of applications/Utilities#Comparison, diff, merge|merge]] them back in after updating as needed. Alternatively, you can consider submitting generally useful changes upstream.}}<br />
<br />
{{note|Depending upon how Tiki has been configured, be aware that some of the directories may contain uploaded files (e.g. images and other attachments). They should not be impacted by the update process, but if you would prefer they be located elsewhere, there are options to do so after updating successfully. See [[#File Storage|File Storage]] below for details.}}<br />
<br />
Once you've installed the new package successfully, continue with [[#Configure Tiki|Configure Tiki]] above.<br />
<br />
=== After updating ===<br />
<br />
Log in to your site, check that everything is as it should be, and when you're ready, re-open the site (if you closed it before). Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under Tiki's &quot;[https://doc.tiki.org/New-in-version New in version]&quot; page.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel etc. as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. The [[Security]] ArchWiki page complements this in respect of securing the underlying operating system. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}} (or equivalent), enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. Make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. At a minimum, you should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
=== File Storage ===<br />
<br />
Tiki is able to store uploaded files either in its database or on the file system. The pros and cons of each approach are covered on Tiki's [https://doc.tiki.org/File+Storage File Storage] page.<br />
<br />
If storing uploaded files on the file system, by default these will be kept in directories under {{ic|/usr/share/webapps/tikiwiki/}}. There are a number of reasons why you might want to move them elsewhere. Again, the options to do so are outlined on Tiki's [https://doc.tiki.org/File+Storage File Storage] page, and on the related Control Panel pages for the specific features that accept file uploads.<br />
<br />
{{note|Where directories are created outside the {{ic|/usr/share/webapps/tikiwiki/}} hierarchy, be sure appropriate web server options and local file permissions are set so they can be accessed (e.g. if using Apache, update the {{ic|/etc/httpd/conf/extra/tikiwiki.conf}} file so that the directories are included in the {{ic|open_basedir}} parameter, and make sure the directories are owned by {{ic|http:http}}).}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or equivalent).<br />
# Enable {{ic|1=extension=iconv.so}} and {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
=== Timeout updating database on large sites ===<br />
<br />
If you have a large site, PHP timeout values may be exceeded when updating the database (as part of updating Tiki to a new version) in the web-based workflow. Should this occur, you have two choices:<br />
<br />
# Extend PHP's timeout values, then try again.<br />
# Run the database update from the command line, then manually lock the installer (you ''should'' then be able to skip the web-based workflow, and continue from [[#After updating|After updating]]):<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# '''php''' console.php database:update<br />
# touch db/lock}}<br />
<br />
Substitute '''{{ic|php}}''' in the command line example above if using a version from PHP from the AUR.<br />
<br />
=== &quot;Installer not locked&quot; warning ===<br />
<br />
A warning will appear in the Control Panel if the installer lock file is missing. This can occur if the Tiki package is uninstalled and reinstalled, or the package is updated but the web-based install workflow has not been gone through.<br />
<br />
In circumstances where there is no need to go through the web-based install workflow, you need to manually create the lock file as suggested in the warning. The easiest way to do this from the command line is:<br />
{{bc|# touch /usr/share/webapps/tikiwiki/db/lock}}<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
If running [[Namcap]] on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}<br />
<br />
== See Also ==<br />
<br />
* [https://tiki.org/ Tiki Home Page].<br />
* [https://doc.tiki.org Tiki Documentation].<br />
* [https://tiki.org/Community Tiki Community] -- Includes user forums and the development mailing list.<br />
* [https://dev.tiki.org/ Tiki Development] -- Includes a bug tracker and related information.</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492908User:Aexoxea/Tiki Wiki CMS Groupware2017-10-11T12:09:53Z<p>Aexoxea: /* Choose your update path */ Confidence plz</p>
<hr />
<div>{{warning|This is a work in progress and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a web-based content management system with collaboration features written in PHP.<br />
<br />
== Package Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements#PHP Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once made, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] (for new installs) or [[#Choose your update path|Choose your update path]] (for updates) below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Install Tiki ===<br />
<br />
Install the Tiki package that you made above.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, use Apache.<br />
<br />
{{note|Tiki won't be accessible after setting up the web server, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to:<br />
<br />
# Install Apache per the instructions at [[Apache HTTP Server#Installation]].<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is enabled (it is by default).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other web server ====<br />
<br />
Essentially the same steps as for Apache. You will need to consult the relevant ArchWiki page (or other documentation) for your web server in order to:<br />
<br />
# Install your web server.<br />
# Configure your web server to run PHP.<br />
# Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
# Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or Oracle MySQL, though it's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Regardless, you need to install, set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. You will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new database user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. If your PHP install is new, this should already be enabled.<br />
* Enable the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|If using Apache, you will need to restart the web server now for these changes to take effect. Reloading or restarting the web server may also be needed for other web servers; consult your documentation.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your updated Tiki site. Once there, continue with [[#After updating|After updating]] below.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== Choose your update path ===<br />
<br />
Make the new package (see [[#Package Tiki|Package Tiki]] above), then choose '''one''' of the following paths to install it:<br />
<br />
* '''Update-in-place:''' Install the new package over the existing package.<br />
* '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then install the new package.<br />
<br />
The update-in-place path will work in ''most'' circumstances. However, if you run into difficulties relating to Tiki's package files during or after the update, the remove-then-install path will enable you to troubleshoot around what files are left behind under {{ic|/usr/share/webapps/tikiwiki}} after removing the old version but before installing the new version.<br />
<br />
{{warning|It is ''not'' guaranteed that customisations to Tiki package files will be retained through either update path, or that they will work properly. If you make customisations, it is recommended to store them elsewhere (e.g. in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system]), so you can [[List of applications/Utilities#Comparison, diff, merge|merge]] them back in after updating as needed. Alternatively, you can consider submitting generally useful changes upstream.}}<br />
<br />
{{note|Depending upon how Tiki has been configured, be aware that some of the directories may contain uploaded files (e.g. images and other attachments). They should not be impacted by the update process, but if you would prefer they be located elsewhere, there are options to do so after updating successfully. See [[#File Storage|File Storage]] below for details.}}<br />
<br />
Once you've installed the new package successfully, continue with [[#Configure Tiki|Configure Tiki]] above.<br />
<br />
=== After updating ===<br />
<br />
Log in to your site, check that everything is as it should be, and when you're ready, re-open the site (if you closed it before). Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under Tiki's &quot;[https://doc.tiki.org/New-in-version New in version]&quot; page.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel etc. as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. The [[Security]] ArchWiki page complements this in respect of securing the underlying operating system. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}} (or equivalent), enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. Make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. At a minimum, you should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or equivalent).<br />
# Enable {{ic|1=extension=iconv.so}} and {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
=== Timeout updating database on large sites ===<br />
<br />
If you have a large site, PHP timeout values may be exceeded when updating the database (as part of updating Tiki to a new version) in the web-based workflow. Should this occur, you have two choices:<br />
<br />
# Extend PHP's timeout values, then try again.<br />
# Run the database update from the command line, then manually lock the installer (you ''should'' then be able to skip the web-based workflow, and continue from [[#After updating|After updating]]):<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# '''php''' console.php database:update<br />
# touch db/lock}}<br />
<br />
Substitute '''{{ic|php}}''' in the command line example above if using a version from PHP from the AUR.<br />
<br />
=== &quot;Installer not locked&quot; warning ===<br />
<br />
A warning will appear in the Control Panel if the installer lock file is missing. This can occur if the Tiki package is uninstalled and reinstalled, or the package is updated but the web-based install workflow has not been gone through.<br />
<br />
In circumstances where there is no need to go through the web-based install workflow, you need to manually create the lock file as suggested in the warning. The easiest way to do this from the command line is:<br />
{{bc|# touch /usr/share/webapps/tikiwiki/db/lock}}<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
If running [[Namcap]] on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}<br />
<br />
== See Also ==<br />
<br />
* [https://tiki.org/ Tiki Home Page].<br />
* [https://doc.tiki.org Tiki Documentation].<br />
* [https://tiki.org/Community Tiki Community] -- Includes user forums and the development mailing list.<br />
* [https://dev.tiki.org/ Tiki Development] -- Includes a bug tracker and related information.</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492907User:Aexoxea/Tiki Wiki CMS Groupware2017-10-11T12:09:24Z<p>Aexoxea: /* Choose your update path */ Consistency.</p>
<hr />
<div>{{warning|This is a work in progress and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a web-based content management system with collaboration features written in PHP.<br />
<br />
== Package Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements#PHP Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once made, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] (for new installs) or [[#Choose your update path|Choose your update path]] (for updates) below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Install Tiki ===<br />
<br />
Install the Tiki package that you made above.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, use Apache.<br />
<br />
{{note|Tiki won't be accessible after setting up the web server, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to:<br />
<br />
# Install Apache per the instructions at [[Apache HTTP Server#Installation]].<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is enabled (it is by default).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other web server ====<br />
<br />
Essentially the same steps as for Apache. You will need to consult the relevant ArchWiki page (or other documentation) for your web server in order to:<br />
<br />
# Install your web server.<br />
# Configure your web server to run PHP.<br />
# Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
# Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or Oracle MySQL, though it's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Regardless, you need to install, set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. You will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new database user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. If your PHP install is new, this should already be enabled.<br />
* Enable the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|If using Apache, you will need to restart the web server now for these changes to take effect. Reloading or restarting the web server may also be needed for other web servers; consult your documentation.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your updated Tiki site. Once there, continue with [[#After updating|After updating]] below.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== Choose your update path ===<br />
<br />
Make the new package (see [[#Package Tiki|Package Tiki]] above), then choose '''one''' of the following paths to install it:<br />
<br />
* '''Update-in-place:''' Install the new package over the existing package.<br />
* '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then install the new package.<br />
<br />
The update-in-place path should work in ''most'' circumstances. However, if you run into difficulties relating to Tiki's package files during or after the update, the remove-then-install path will enable you to troubleshoot around what files are left behind under {{ic|/usr/share/webapps/tikiwiki}} after removing the old version but before installing the new version.<br />
<br />
{{warning|It is ''not'' guaranteed that customisations to Tiki package files will be retained through either update path, or that they will work properly. If you make customisations, it is recommended to store them elsewhere (e.g. in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system]), so you can [[List of applications/Utilities#Comparison, diff, merge|merge]] them back in after updating as needed. Alternatively, you can consider submitting generally useful changes upstream.}}<br />
<br />
{{note|Depending upon how Tiki has been configured, be aware that some of the directories may contain uploaded files (e.g. images and other attachments). They should not be impacted by the update process, but if you would prefer they be located elsewhere, there are options to do so after updating successfully. See [[#File Storage|File Storage]] below for details.}}<br />
<br />
Once you've installed the new package successfully, continue with [[#Configure Tiki|Configure Tiki]] above.<br />
<br />
=== After updating ===<br />
<br />
Log in to your site, check that everything is as it should be, and when you're ready, re-open the site (if you closed it before). Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under Tiki's &quot;[https://doc.tiki.org/New-in-version New in version]&quot; page.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel etc. as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. The [[Security]] ArchWiki page complements this in respect of securing the underlying operating system. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}} (or equivalent), enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. Make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. At a minimum, you should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or equivalent).<br />
# Enable {{ic|1=extension=iconv.so}} and {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
=== Timeout updating database on large sites ===<br />
<br />
If you have a large site, PHP timeout values may be exceeded when updating the database (as part of updating Tiki to a new version) in the web-based workflow. Should this occur, you have two choices:<br />
<br />
# Extend PHP's timeout values, then try again.<br />
# Run the database update from the command line, then manually lock the installer (you ''should'' then be able to skip the web-based workflow, and continue from [[#After updating|After updating]]):<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# '''php''' console.php database:update<br />
# touch db/lock}}<br />
<br />
Substitute '''{{ic|php}}''' in the command line example above if using a version from PHP from the AUR.<br />
<br />
=== &quot;Installer not locked&quot; warning ===<br />
<br />
A warning will appear in the Control Panel if the installer lock file is missing. This can occur if the Tiki package is uninstalled and reinstalled, or the package is updated but the web-based install workflow has not been gone through.<br />
<br />
In circumstances where there is no need to go through the web-based install workflow, you need to manually create the lock file as suggested in the warning. The easiest way to do this from the command line is:<br />
{{bc|# touch /usr/share/webapps/tikiwiki/db/lock}}<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
If running [[Namcap]] on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}<br />
<br />
== See Also ==<br />
<br />
* [https://tiki.org/ Tiki Home Page].<br />
* [https://doc.tiki.org Tiki Documentation].<br />
* [https://tiki.org/Community Tiki Community] -- Includes user forums and the development mailing list.<br />
* [https://dev.tiki.org/ Tiki Development] -- Includes a bug tracker and related information.</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492906User:Aexoxea/Tiki Wiki CMS Groupware2017-10-11T12:08:39Z<p>Aexoxea: /* Choose your update path */ Refactored per further testing.</p>
<hr />
<div>{{warning|This is a work in progress and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a web-based content management system with collaboration features written in PHP.<br />
<br />
== Package Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements#PHP Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once made, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] (for new installs) or [[#Choose your update path|Choose your update path]] (for updates) below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Install Tiki ===<br />
<br />
Install the Tiki package that you made above.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, use Apache.<br />
<br />
{{note|Tiki won't be accessible after setting up the web server, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to:<br />
<br />
# Install Apache per the instructions at [[Apache HTTP Server#Installation]].<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is enabled (it is by default).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other web server ====<br />
<br />
Essentially the same steps as for Apache. You will need to consult the relevant ArchWiki page (or other documentation) for your web server in order to:<br />
<br />
# Install your web server.<br />
# Configure your web server to run PHP.<br />
# Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
# Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or Oracle MySQL, though it's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Regardless, you need to install, set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. You will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new database user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. If your PHP install is new, this should already be enabled.<br />
* Enable the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|If using Apache, you will need to restart the web server now for these changes to take effect. Reloading or restarting the web server may also be needed for other web servers; consult your documentation.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your updated Tiki site. Once there, continue with [[#After updating|After updating]] below.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== Choose your update path ===<br />
<br />
Make the new package (see [[#Package Tiki|Package Tiki]] above), then choose '''one''' of the following paths to install it:<br />
<br />
* '''Update-in-place:''' Install the new package over the existing package.<br />
* '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then install the new package.<br />
<br />
The update-in-place path should work in ''most'' circumstances. However, if you run into difficulties relating to Tiki's files during or after the update, the remove-then-install path will enable you to troubleshoot around what files are left behind under {{ic|/usr/share/webapps/tikiwiki}} after removing the old version but before installing the new version.<br />
<br />
{{warning|It is ''not'' guaranteed that customisations to Tiki package files will be retained through either update path, or that they will work properly. If you make customisations, it is recommended to store them elsewhere (e.g. in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system]), so you can [[List of applications/Utilities#Comparison, diff, merge|merge]] them back in after updating as needed. Alternatively, you can consider submitting generally useful changes upstream.}}<br />
<br />
{{note|Depending upon how Tiki has been configured, be aware that some of the directories may contain uploaded files (e.g. images and other attachments). They should not be impacted by the update process, but if you would prefer they be located elsewhere, there are options to do so after updating successfully. See [[#File Storage|File Storage]] below for details.}}<br />
<br />
Once you've installed the new package successfully, continue with [[#Configure Tiki|Configure Tiki]] above.<br />
<br />
=== After updating ===<br />
<br />
Log in to your site, check that everything is as it should be, and when you're ready, re-open the site (if you closed it before). Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under Tiki's &quot;[https://doc.tiki.org/New-in-version New in version]&quot; page.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel etc. as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. The [[Security]] ArchWiki page complements this in respect of securing the underlying operating system. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}} (or equivalent), enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. Make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. At a minimum, you should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or equivalent).<br />
# Enable {{ic|1=extension=iconv.so}} and {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
=== Timeout updating database on large sites ===<br />
<br />
If you have a large site, PHP timeout values may be exceeded when updating the database (as part of updating Tiki to a new version) in the web-based workflow. Should this occur, you have two choices:<br />
<br />
# Extend PHP's timeout values, then try again.<br />
# Run the database update from the command line, then manually lock the installer (you ''should'' then be able to skip the web-based workflow, and continue from [[#After updating|After updating]]):<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# '''php''' console.php database:update<br />
# touch db/lock}}<br />
<br />
Substitute '''{{ic|php}}''' in the command line example above if using a version from PHP from the AUR.<br />
<br />
=== &quot;Installer not locked&quot; warning ===<br />
<br />
A warning will appear in the Control Panel if the installer lock file is missing. This can occur if the Tiki package is uninstalled and reinstalled, or the package is updated but the web-based install workflow has not been gone through.<br />
<br />
In circumstances where there is no need to go through the web-based install workflow, you need to manually create the lock file as suggested in the warning. The easiest way to do this from the command line is:<br />
{{bc|# touch /usr/share/webapps/tikiwiki/db/lock}}<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
If running [[Namcap]] on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}<br />
<br />
== See Also ==<br />
<br />
* [https://tiki.org/ Tiki Home Page].<br />
* [https://doc.tiki.org Tiki Documentation].<br />
* [https://tiki.org/Community Tiki Community] -- Includes user forums and the development mailing list.<br />
* [https://dev.tiki.org/ Tiki Development] -- Includes a bug tracker and related information.</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492905User:Aexoxea/Tiki Wiki CMS Groupware2017-10-11T11:14:27Z<p>Aexoxea: /* Troubleshooting */ Added &quot;&quot;Installer not locked&quot; warning&quot;.</p>
<hr />
<div>{{warning|This is a work in progress and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a web-based content management system with collaboration features written in PHP.<br />
<br />
== Package Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements#PHP Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once made, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] (for new installs) or [[#Choose your update path|Choose your update path]] (for updates) below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Install Tiki ===<br />
<br />
Install the Tiki package that you made above.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, use Apache.<br />
<br />
{{note|Tiki won't be accessible after setting up the web server, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to:<br />
<br />
# Install Apache per the instructions at [[Apache HTTP Server#Installation]].<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is enabled (it is by default).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other web server ====<br />
<br />
Essentially the same steps as for Apache. You will need to consult the relevant ArchWiki page (or other documentation) for your web server in order to:<br />
<br />
# Install your web server.<br />
# Configure your web server to run PHP.<br />
# Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
# Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or Oracle MySQL, though it's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Regardless, you need to install, set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. You will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new database user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. If your PHP install is new, this should already be enabled.<br />
* Enable the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|If using Apache, you will need to restart the web server now for these changes to take effect. Reloading or restarting the web server may also be needed for other web servers; consult your documentation.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your updated Tiki site. Once there, continue with [[#After updating|After updating]] below.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== Choose your update path ===<br />
<br />
Make the new package (see [[#Package Tiki|Package Tiki]] above), then choose '''one''' of the following paths to install it:<br />
<br />
* '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then install the new package.<br />
* '''Update-in-place:''' Install the new package over the existing package.<br />
<br />
The remove-then-install path is strongly recommended, as this helps to ensure that package files from different versions are not mixed together (which ''will'' happen due to the way Tiki operates and [[Pacman]] handles updates), while leaving runtime files -- such as configurations and non-database uploads -- intact.<br />
<br />
The update-in-place path is not recommended, but is appealing if you have customised the package files. Be aware that undefined behaviour may occur where files from different versions become mixed together. You can check if this has happened using the files check feature in the [https://doc.tiki.org/Security+Admin System &gt; Security Admin] Control Panel.<br />
<br />
{{tip|You should consider storing any package file changes in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system], then [[List of applications/Utilities#Comparison, diff, merge|merging]] them back after updating. Doing this in concert with the remove-then-install path will prove more robust over time. Additionally, you can consider submitting generally useful changes upstream.}}<br />
<br />
Once you've installed the new package, continue with [[#Configure Tiki|Configure Tiki]] above.<br />
<br />
=== After updating ===<br />
<br />
Log in to your site, check that everything is as it should be, and when you're ready, re-open the site (if you closed it before). Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under Tiki's &quot;[https://doc.tiki.org/New-in-version New in version]&quot; page.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel etc. as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. The [[Security]] ArchWiki page complements this in respect of securing the underlying operating system. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}} (or equivalent), enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. Make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. At a minimum, you should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or equivalent).<br />
# Enable {{ic|1=extension=iconv.so}} and {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
=== Timeout updating database on large sites ===<br />
<br />
If you have a large site, PHP timeout values may be exceeded when updating the database (as part of updating Tiki to a new version) in the web-based workflow. Should this occur, you have two choices:<br />
<br />
# Extend PHP's timeout values, then try again.<br />
# Run the database update from the command line, then manually lock the installer (you ''should'' then be able to skip the web-based workflow, and continue from [[#After updating|After updating]]):<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# '''php''' console.php database:update<br />
# touch db/lock}}<br />
<br />
Substitute '''{{ic|php}}''' in the command line example above if using a version from PHP from the AUR.<br />
<br />
=== &quot;Installer not locked&quot; warning ===<br />
<br />
A warning will appear in the Control Panel if the installer lock file is missing. This can occur if the Tiki package is uninstalled and reinstalled, or the package is updated but the web-based install workflow has not been gone through.<br />
<br />
In circumstances where there is no need to go through the web-based install workflow, you need to manually create the lock file as suggested in the warning. The easiest way to do this from the command line is:<br />
{{bc|# touch /usr/share/webapps/tikiwiki/db/lock}}<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
If running [[Namcap]] on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}<br />
<br />
== See Also ==<br />
<br />
* [https://tiki.org/ Tiki Home Page].<br />
* [https://doc.tiki.org Tiki Documentation].<br />
* [https://tiki.org/Community Tiki Community] -- Includes user forums and the development mailing list.<br />
* [https://dev.tiki.org/ Tiki Development] -- Includes a bug tracker and related information.</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware/Files_Stable&diff=492904User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable2017-10-11T11:08:46Z<p>Aexoxea: Remove DB Lock for remove-then-install.</p>
<hr />
<div>These files can be used to build and install the latest stable release of [[User:Aexoxea/Tiki Wiki CMS Groupware|Tiki Wiki CMS Groupware]].<br />
<br />
{{note|This page exists in lieu of a package in AUR for now. I still consider these files to be experimental and I can't yet commit to keeping them updated.}}<br />
<br />
{{hc|PKGBUILD|2=&lt;nowiki&gt;<br />
pkgname=tikiwiki<br />
pkgver=17.1<br />
pkgrel=1<br />
_relcodename=&quot;17.x_Zeta_Bootis&quot;<br />
_minphpver=&quot;5.6&quot;<br />
_maxphpver=&quot;7.2&quot; # Maximum will be the minor release behind this version.<br />
pkgdesc=&quot;Tiki Wiki CMS Groupware, normal version.&quot;<br />
arch=('any')<br />
url=&quot;https://tiki.org/&quot;<br />
license=('LGPL2.1')<br />
depends=(&quot;php-intl&gt;=${_minphpver}&quot; &quot;php-intl&lt;${_maxphpver}&quot;)<br />
optdepends=(&quot;php-gd&gt;=${_minphpver}: image processing and CAPTCHAs&quot;<br />
&quot;php-gd&lt;${_maxphpver}: image processing and CAPTCHAs&quot;<br />
&quot;mariadb: supported database server&quot;<br />
&quot;mysql: supported database server&quot;)<br />
makedepends=(&quot;php-mcrypt&gt;=${_minphpver}&quot; &quot;php-mcrypt&lt;${_maxphpver}&quot;<br />
&quot;unzip&quot;)<br />
conflicts=('tikiwiki-lts' 'tikiwiki-lts-lag')<br />
source=(&quot;tiki-${pkgver}.tar.gz::https://sourceforge.net/projects/tikiwiki/files/Tiki_${_relcodename}/${pkgver}/tiki-${pkgver}.tar.gz/download&quot;<br />
&quot;apache.example.conf&quot;<br />
&quot;setup-6460.diff&quot;)<br />
options=('emptydirs' '!strip')<br />
install=&quot;${pkgname}.install&quot;<br />
md5sums=('a40161bae2d4da33658d6d52235cb8aa'<br />
'f761900ca84055a145a68ad10551aced'<br />
'9b58ddd811948cc059863101790454d9')<br />
sha1sums=('5dff1f418f9d982232187d6364d0a34ecfbd34a8'<br />
'db56b4e1960f16a595a6b309a77d0fee46b48bf0'<br />
'98052a54f98c6bfe4a651c71c5860190a47d0483')<br />
<br />
package() {<br />
# Copy the main package files into place.<br />
mkdir --parents &quot;${pkgdir}/usr/share/webapps/&quot;<br />
cp --archive --force &quot;${srcdir}/tiki-${pkgver}&quot; &quot;${pkgdir}/usr/share/webapps/tikiwiki&quot;<br />
<br />
# Install the Apache example configuration.<br />
install -D --mode=&quot;644&quot; --target-directory=&quot;${pkgdir}/etc/webapps/tikiwiki/&quot; &quot;${srcdir}/apache.example.conf&quot;<br />
<br />
# Ready the setup script for use.<br />
chmod a+rx,u+w &quot;${pkgdir}/usr/share/webapps/tikiwiki/setup.sh&quot;<br />
patch &quot;${pkgdir}/usr/share/webapps/tikiwiki/setup.sh&quot; &quot;${srcdir}/setup-6460.diff&quot; # Workaround for 'https://dev.tiki.org/item6460'.<br />
<br />
# Run the setup script.<br />
cd &quot;${pkgdir}/usr/share/webapps/tikiwiki/&quot;<br />
if [ -e &quot;/usr/bin/php&quot; ]; then<br />
./setup.sh -u root -g root -n fix<br />
elif [ -e &quot;/usr/bin/php71&quot; ]; then<br />
./setup.sh -u root -g root -p php71 -n fix<br />
elif [ -e &quot;/usr/bin/php70&quot; ]; then<br />
./setup.sh -u root -g root -p php70 -n fix<br />
elif [ -e &quot;/usr/bin/php56&quot; ]; then<br />
./setup.sh -u root -g root -p php56 -n fix<br />
else<br />
echo &quot;:: WARNING: Setup script not run as no supported PHP binary could be found.&quot;<br />
fi<br />
}<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|apache.example.conf|2=&lt;nowiki&gt;<br />
&lt;IfModule mod_alias.c&gt;<br />
Alias /tiki /usr/share/webapps/tikiwiki/<br />
&lt;/IfModule&gt;<br />
<br />
&lt;Directory /usr/share/webapps/tikiwiki/&gt;<br />
Options FollowSymlinks<br />
AllowOverride all<br />
Require all granted<br />
php_admin_value open_basedir &quot;/srv/http/:/dev/urandom:/tmp/:/usr/share/pear/:/usr/share/webapps/tikiwiki/:/etc/webapps/tikiwiki/&quot;<br />
&lt;/Directory&gt;<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|setup-6460.diff|2=&lt;nowiki&gt;<br />
--- setup.sh<br />
+++ setup.sh<br />
@@ -539,10 +539,10 @@<br />
then<br />
if exists curl;<br />
then<br />
- curl -s https://getcomposer.org/installer | php -- --install-dir=temp<br />
+ curl -s https://getcomposer.org/installer | &quot;${PHPCLI}&quot; -- --install-dir=temp<br />
else<br />
# todo : if exists php;<br />
- php -r &quot;eval('?&gt;'.file_get_contents('https://getcomposer.org/installer'));&quot; -- --install-dir=temp<br />
+ &quot;${PHPCLI}&quot; -r &quot;eval('?&gt;'.file_get_contents('https://getcomposer.org/installer'));&quot; -- --install-dir=temp<br />
fi<br />
# if PATCHCOMPOSERFLAG then modify temp/composer.phar to avoid the warnings<br />
# this hack is not yet possible because of a self signature check in temp/composer.phar<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|tikiwiki.install|2=&lt;nowiki&gt;<br />
post_install() {<br />
<br />
echo &quot;:: Be aware that if using Tiki Wiki CMS Groupware on PHP 7.1, there are a few&quot;<br />
echo &quot; minor known issues (see 'https://doc.tiki.org/Requirements'). If these impact&quot;<br />
echo &quot; you, consider downgrading to PHP 7.0.&quot;<br />
echo &quot; &quot;<br />
echo &quot;:: To complete the setup of Tiki Wiki CMS Groupware, you need to follow the&quot;<br />
echo &quot; instructions starting at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Install_and_set_up_prerequisites'&quot;<br />
<br />
}<br />
<br />
pre_upgrade() {<br />
<br />
echo &quot;:: Prior to upgrading Tiki Wiki CMS Groupware, you should consider the actions&quot;<br />
echo &quot; listed at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Before_updating'&quot;<br />
<br />
# Clear out Tiki caches -- cached files may interfere with the upgrade process.<br />
rm --force --recursive /usr/share/webapps/tikiwiki/modules/cache/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/cache/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/public/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/templates_c/*<br />
<br />
}<br />
<br />
post_upgrade() {<br />
<br />
# Remove lock file -- allows Tiki installer to be used.<br />
rm --force /usr/share/webapps/tikiwiki/db/lock<br />
<br />
echo &quot;:: To complete the upgrade of Tiki Wiki CMS Groupware, you need to follow the&quot;<br />
echo &quot; instructions starting at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Choose_your_update_path'&quot;<br />
<br />
}<br />
<br />
pre_remove() {<br />
<br />
# Clear out Tiki caches -- cached files may interfere with the upgrade process (if doing remove-then-install).<br />
rm --force --recursive /usr/share/webapps/tikiwiki/modules/cache/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/cache/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/public/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/templates_c/*<br />
<br />
}<br />
<br />
post_remove() {<br />
<br />
# Remove lock file -- allows Tiki installer to be used (if doing remove-then-install).<br />
rm --force /usr/share/webapps/tikiwiki/db/lock<br />
<br />
echo &quot;:: If you're removing Tiki Wiki CMS Groupware for good, remember to:&quot;<br />
echo &quot; (1) Remove Tiki's database (and database user account, if applicable).&quot;<br />
echo &quot; (2) Remove any residual files under /usr/share/webapps/tikiwiki/.&quot;<br />
<br />
}<br />
&lt;/nowiki&gt;}}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492784User:Aexoxea/Tiki Wiki CMS Groupware2017-10-09T14:22:58Z<p>Aexoxea: /* See Also */ Expanded.</p>
<hr />
<div>{{warning|This is a work in progress and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a web-based content management system with collaboration features written in PHP.<br />
<br />
== Package Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements#PHP Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once made, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] (for new installs) or [[#Choose your update path|Choose your update path]] (for updates) below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Install Tiki ===<br />
<br />
Install the Tiki package that you made above.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, use Apache.<br />
<br />
{{note|Tiki won't be accessible after setting up the web server, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to:<br />
<br />
# Install Apache per the instructions at [[Apache HTTP Server#Installation]].<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is enabled (it is by default).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other web server ====<br />
<br />
Essentially the same steps as for Apache. You will need to consult the relevant ArchWiki page (or other documentation) for your web server in order to:<br />
<br />
# Install your web server.<br />
# Configure your web server to run PHP.<br />
# Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
# Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or Oracle MySQL, though it's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Regardless, you need to install, set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. You will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new database user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. If your PHP install is new, this should already be enabled.<br />
* Enable the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|If using Apache, you will need to restart the web server now for these changes to take effect. Reloading or restarting the web server may also be needed for other web servers; consult your documentation.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your updated Tiki site. Once there, continue with [[#After updating|After updating]] below.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== Choose your update path ===<br />
<br />
Make the new package (see [[#Package Tiki|Package Tiki]] above), then choose '''one''' of the following paths to install it:<br />
<br />
* '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then install the new package.<br />
* '''Update-in-place:''' Install the new package over the existing package.<br />
<br />
The remove-then-install path is strongly recommended, as this helps to ensure that package files from different versions are not mixed together (which ''will'' happen due to the way Tiki operates and [[Pacman]] handles updates), while leaving runtime files -- such as configurations and non-database uploads -- intact.<br />
<br />
The update-in-place path is not recommended, but is appealing if you have customised the package files. Be aware that undefined behaviour may occur where files from different versions become mixed together. You can check if this has happened using the files check feature in the [https://doc.tiki.org/Security+Admin System &gt; Security Admin] Control Panel.<br />
<br />
{{tip|You should consider storing any package file changes in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system], then [[List of applications/Utilities#Comparison, diff, merge|merging]] them back after updating. Doing this in concert with the remove-then-install path will prove more robust over time. Additionally, you can consider submitting generally useful changes upstream.}}<br />
<br />
Once you've installed the new package, continue with [[#Configure Tiki|Configure Tiki]] above.<br />
<br />
=== After updating ===<br />
<br />
Log in to your site, check that everything is as it should be, and when you're ready, re-open the site (if you closed it before). Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under Tiki's &quot;[https://doc.tiki.org/New-in-version New in version]&quot; page.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel etc. as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. The [[Security]] ArchWiki page complements this in respect of securing the underlying operating system. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}} (or equivalent), enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. Make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. At a minimum, you should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or equivalent).<br />
# Enable {{ic|1=extension=iconv.so}} and {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
=== Timeout updating database on large sites ===<br />
<br />
If you have a large site, PHP timeout values may be exceeded when updating the database (as part of updating Tiki to a new version) in the web-based workflow. Should this occur, you have two choices:<br />
<br />
# Extend PHP's timeout values, then try again.<br />
# Run the database update from the command line, then manually lock the installer (you ''should'' then be able to skip the web-based workflow, and continue from [[#After updating|After updating]]):<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# '''php''' console.php database:update<br />
# touch db/lock}}<br />
<br />
Substitute '''{{ic|php}}''' in the command line example above if using a version from PHP from the AUR.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
If running [[Namcap]] on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}<br />
<br />
== See Also ==<br />
<br />
* [https://tiki.org/ Tiki Home Page].<br />
* [https://doc.tiki.org Tiki Documentation].<br />
* [https://tiki.org/Community Tiki Community] -- Includes user forums and the development mailing list.<br />
* [https://dev.tiki.org/ Tiki Development] -- Includes a bug tracker and related information.</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492783User:Aexoxea/Tiki Wiki CMS Groupware2017-10-09T14:21:23Z<p>Aexoxea: /* Linter Errata */ Link to page instead of package.</p>
<hr />
<div>{{warning|This is a work in progress and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a web-based content management system with collaboration features written in PHP.<br />
<br />
== Package Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements#PHP Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once made, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] (for new installs) or [[#Choose your update path|Choose your update path]] (for updates) below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Install Tiki ===<br />
<br />
Install the Tiki package that you made above.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, use Apache.<br />
<br />
{{note|Tiki won't be accessible after setting up the web server, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to:<br />
<br />
# Install Apache per the instructions at [[Apache HTTP Server#Installation]].<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is enabled (it is by default).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other web server ====<br />
<br />
Essentially the same steps as for Apache. You will need to consult the relevant ArchWiki page (or other documentation) for your web server in order to:<br />
<br />
# Install your web server.<br />
# Configure your web server to run PHP.<br />
# Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
# Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or Oracle MySQL, though it's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Regardless, you need to install, set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. You will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new database user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. If your PHP install is new, this should already be enabled.<br />
* Enable the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|If using Apache, you will need to restart the web server now for these changes to take effect. Reloading or restarting the web server may also be needed for other web servers; consult your documentation.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your updated Tiki site. Once there, continue with [[#After updating|After updating]] below.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== Choose your update path ===<br />
<br />
Make the new package (see [[#Package Tiki|Package Tiki]] above), then choose '''one''' of the following paths to install it:<br />
<br />
* '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then install the new package.<br />
* '''Update-in-place:''' Install the new package over the existing package.<br />
<br />
The remove-then-install path is strongly recommended, as this helps to ensure that package files from different versions are not mixed together (which ''will'' happen due to the way Tiki operates and [[Pacman]] handles updates), while leaving runtime files -- such as configurations and non-database uploads -- intact.<br />
<br />
The update-in-place path is not recommended, but is appealing if you have customised the package files. Be aware that undefined behaviour may occur where files from different versions become mixed together. You can check if this has happened using the files check feature in the [https://doc.tiki.org/Security+Admin System &gt; Security Admin] Control Panel.<br />
<br />
{{tip|You should consider storing any package file changes in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system], then [[List of applications/Utilities#Comparison, diff, merge|merging]] them back after updating. Doing this in concert with the remove-then-install path will prove more robust over time. Additionally, you can consider submitting generally useful changes upstream.}}<br />
<br />
Once you've installed the new package, continue with [[#Configure Tiki|Configure Tiki]] above.<br />
<br />
=== After updating ===<br />
<br />
Log in to your site, check that everything is as it should be, and when you're ready, re-open the site (if you closed it before). Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under Tiki's &quot;[https://doc.tiki.org/New-in-version New in version]&quot; page.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel etc. as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. The [[Security]] ArchWiki page complements this in respect of securing the underlying operating system. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}} (or equivalent), enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. Make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. At a minimum, you should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or equivalent).<br />
# Enable {{ic|1=extension=iconv.so}} and {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
=== Timeout updating database on large sites ===<br />
<br />
If you have a large site, PHP timeout values may be exceeded when updating the database (as part of updating Tiki to a new version) in the web-based workflow. Should this occur, you have two choices:<br />
<br />
# Extend PHP's timeout values, then try again.<br />
# Run the database update from the command line, then manually lock the installer (you ''should'' then be able to skip the web-based workflow, and continue from [[#After updating|After updating]]):<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# '''php''' console.php database:update<br />
# touch db/lock}}<br />
<br />
Substitute '''{{ic|php}}''' in the command line example above if using a version from PHP from the AUR.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
If running [[Namcap]] on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}<br />
<br />
== See Also ==<br />
<br />
* [https://doc.tiki.org Tiki Documentation].<br />
* [https://tiki.org/Community Tiki Community] -- User forums and development mailing list.<br />
* [https://dev.tiki.org/ Tiki Development] -- Bug tracker and related information.</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492782User:Aexoxea/Tiki Wiki CMS Groupware2017-10-09T14:20:18Z<p>Aexoxea: /* Documentation and Support */ Converted to a &quot;See Also&quot; section.</p>
<hr />
<div>{{warning|This is a work in progress and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a web-based content management system with collaboration features written in PHP.<br />
<br />
== Package Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements#PHP Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once made, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] (for new installs) or [[#Choose your update path|Choose your update path]] (for updates) below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Install Tiki ===<br />
<br />
Install the Tiki package that you made above.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, use Apache.<br />
<br />
{{note|Tiki won't be accessible after setting up the web server, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to:<br />
<br />
# Install Apache per the instructions at [[Apache HTTP Server#Installation]].<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is enabled (it is by default).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other web server ====<br />
<br />
Essentially the same steps as for Apache. You will need to consult the relevant ArchWiki page (or other documentation) for your web server in order to:<br />
<br />
# Install your web server.<br />
# Configure your web server to run PHP.<br />
# Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
# Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or Oracle MySQL, though it's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Regardless, you need to install, set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. You will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new database user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. If your PHP install is new, this should already be enabled.<br />
* Enable the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|If using Apache, you will need to restart the web server now for these changes to take effect. Reloading or restarting the web server may also be needed for other web servers; consult your documentation.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your updated Tiki site. Once there, continue with [[#After updating|After updating]] below.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== Choose your update path ===<br />
<br />
Make the new package (see [[#Package Tiki|Package Tiki]] above), then choose '''one''' of the following paths to install it:<br />
<br />
* '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then install the new package.<br />
* '''Update-in-place:''' Install the new package over the existing package.<br />
<br />
The remove-then-install path is strongly recommended, as this helps to ensure that package files from different versions are not mixed together (which ''will'' happen due to the way Tiki operates and [[Pacman]] handles updates), while leaving runtime files -- such as configurations and non-database uploads -- intact.<br />
<br />
The update-in-place path is not recommended, but is appealing if you have customised the package files. Be aware that undefined behaviour may occur where files from different versions become mixed together. You can check if this has happened using the files check feature in the [https://doc.tiki.org/Security+Admin System &gt; Security Admin] Control Panel.<br />
<br />
{{tip|You should consider storing any package file changes in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system], then [[List of applications/Utilities#Comparison, diff, merge|merging]] them back after updating. Doing this in concert with the remove-then-install path will prove more robust over time. Additionally, you can consider submitting generally useful changes upstream.}}<br />
<br />
Once you've installed the new package, continue with [[#Configure Tiki|Configure Tiki]] above.<br />
<br />
=== After updating ===<br />
<br />
Log in to your site, check that everything is as it should be, and when you're ready, re-open the site (if you closed it before). Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under Tiki's &quot;[https://doc.tiki.org/New-in-version New in version]&quot; page.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel etc. as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. The [[Security]] ArchWiki page complements this in respect of securing the underlying operating system. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}} (or equivalent), enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. Make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. At a minimum, you should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or equivalent).<br />
# Enable {{ic|1=extension=iconv.so}} and {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
=== Timeout updating database on large sites ===<br />
<br />
If you have a large site, PHP timeout values may be exceeded when updating the database (as part of updating Tiki to a new version) in the web-based workflow. Should this occur, you have two choices:<br />
<br />
# Extend PHP's timeout values, then try again.<br />
# Run the database update from the command line, then manually lock the installer (you ''should'' then be able to skip the web-based workflow, and continue from [[#After updating|After updating]]):<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# '''php''' console.php database:update<br />
# touch db/lock}}<br />
<br />
Substitute '''{{ic|php}}''' in the command line example above if using a version from PHP from the AUR.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
If running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}<br />
<br />
== See Also ==<br />
<br />
* [https://doc.tiki.org Tiki Documentation].<br />
* [https://tiki.org/Community Tiki Community] -- User forums and development mailing list.<br />
* [https://dev.tiki.org/ Tiki Development] -- Bug tracker and related information.</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492777User:Aexoxea/Tiki Wiki CMS Groupware2017-10-09T13:51:58Z<p>Aexoxea: /* Run Tiki's install workflow */ Redundant.</p>
<hr />
<div>{{warning|This is a work in progress and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a web-based content management system with collaboration features written in PHP.<br />
<br />
== Package Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements#PHP Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once made, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] (for new installs) or [[#Choose your update path|Choose your update path]] (for updates) below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Install Tiki ===<br />
<br />
Install the Tiki package that you made above.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, use Apache.<br />
<br />
{{note|Tiki won't be accessible after setting up the web server, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to:<br />
<br />
# Install Apache per the instructions at [[Apache HTTP Server#Installation]].<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is enabled (it is by default).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other web server ====<br />
<br />
Essentially the same steps as for Apache. You will need to consult the relevant ArchWiki page (or other documentation) for your web server in order to:<br />
<br />
# Install your web server.<br />
# Configure your web server to run PHP.<br />
# Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
# Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or Oracle MySQL, though it's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Regardless, you need to install, set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. You will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new database user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. If your PHP install is new, this should already be enabled.<br />
* Enable the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|If using Apache, you will need to restart the web server now for these changes to take effect. Reloading or restarting the web server may also be needed for other web servers; consult your documentation.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your updated Tiki site. Once there, continue with [[#After updating|After updating]] below.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== Choose your update path ===<br />
<br />
Make the new package (see [[#Package Tiki|Package Tiki]] above), then choose '''one''' of the following paths to install it:<br />
<br />
* '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then install the new package.<br />
* '''Update-in-place:''' Install the new package over the existing package.<br />
<br />
The remove-then-install path is strongly recommended, as this helps to ensure that package files from different versions are not mixed together (which ''will'' happen due to the way Tiki operates and [[Pacman]] handles updates), while leaving runtime files -- such as configurations and non-database uploads -- intact.<br />
<br />
The update-in-place path is not recommended, but is appealing if you have customised the package files. Be aware that undefined behaviour may occur where files from different versions become mixed together. You can check if this has happened using the files check feature in the [https://doc.tiki.org/Security+Admin System &gt; Security Admin] Control Panel.<br />
<br />
{{tip|You should consider storing any package file changes in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system], then [[List of applications/Utilities#Comparison, diff, merge|merging]] them back after updating. Doing this in concert with the remove-then-install path will prove more robust over time. Additionally, you can consider submitting generally useful changes upstream.}}<br />
<br />
Once you've installed the new package, continue with [[#Configure Tiki|Configure Tiki]] above.<br />
<br />
=== After updating ===<br />
<br />
Log in to your site, check that everything is as it should be, and when you're ready, re-open the site (if you closed it before). Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under Tiki's &quot;[https://doc.tiki.org/New-in-version New in version]&quot; page.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel etc. as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. The [[Security]] ArchWiki page complements this in respect of securing the underlying operating system. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}} (or equivalent), enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. Make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. At a minimum, you should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or equivalent).<br />
# Enable {{ic|1=extension=iconv.so}} and {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
=== Timeout updating database on large sites ===<br />
<br />
If you have a large site, PHP timeout values may be exceeded when updating the database (as part of updating Tiki to a new version) in the web-based workflow. Should this occur, you have two choices:<br />
<br />
# Extend PHP's timeout values, then try again.<br />
# Run the database update from the command line, then manually lock the installer (you ''should'' then be able to skip the web-based workflow, and continue from [[#After updating|After updating]]):<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# '''php''' console.php database:update<br />
# touch db/lock}}<br />
<br />
Substitute '''{{ic|php}}''' in the command line example above if using a version from PHP from the AUR.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
If running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492776User:Aexoxea/Tiki Wiki CMS Groupware2017-10-09T13:48:14Z<p>Aexoxea: /* Set up a database server */ Clarify what I mean.</p>
<hr />
<div>{{warning|This is a work in progress and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a web-based content management system with collaboration features written in PHP.<br />
<br />
== Package Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements#PHP Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once made, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] (for new installs) or [[#Choose your update path|Choose your update path]] (for updates) below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Install Tiki ===<br />
<br />
Install the Tiki package that you made above.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, use Apache.<br />
<br />
{{note|Tiki won't be accessible after setting up the web server, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to:<br />
<br />
# Install Apache per the instructions at [[Apache HTTP Server#Installation]].<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is enabled (it is by default).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other web server ====<br />
<br />
Essentially the same steps as for Apache. You will need to consult the relevant ArchWiki page (or other documentation) for your web server in order to:<br />
<br />
# Install your web server.<br />
# Configure your web server to run PHP.<br />
# Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
# Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or Oracle MySQL, though it's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Regardless, you need to install, set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. You will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new database user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. If your PHP install is new, this should already be enabled.<br />
* Enable the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|If using Apache, you will need to restart the web server now for these changes to take effect. Reloading or restarting the web server may also be needed for other web servers; consult your documentation.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your updated Tiki site. Once there, continue with [[#After updating|After updating]] below.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before continuing if you need to!}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== Choose your update path ===<br />
<br />
Make the new package (see [[#Package Tiki|Package Tiki]] above), then choose '''one''' of the following paths to install it:<br />
<br />
* '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then install the new package.<br />
* '''Update-in-place:''' Install the new package over the existing package.<br />
<br />
The remove-then-install path is strongly recommended, as this helps to ensure that package files from different versions are not mixed together (which ''will'' happen due to the way Tiki operates and [[Pacman]] handles updates), while leaving runtime files -- such as configurations and non-database uploads -- intact.<br />
<br />
The update-in-place path is not recommended, but is appealing if you have customised the package files. Be aware that undefined behaviour may occur where files from different versions become mixed together. You can check if this has happened using the files check feature in the [https://doc.tiki.org/Security+Admin System &gt; Security Admin] Control Panel.<br />
<br />
{{tip|You should consider storing any package file changes in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system], then [[List of applications/Utilities#Comparison, diff, merge|merging]] them back after updating. Doing this in concert with the remove-then-install path will prove more robust over time. Additionally, you can consider submitting generally useful changes upstream.}}<br />
<br />
Once you've installed the new package, continue with [[#Configure Tiki|Configure Tiki]] above.<br />
<br />
=== After updating ===<br />
<br />
Log in to your site, check that everything is as it should be, and when you're ready, re-open the site (if you closed it before). Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under Tiki's &quot;[https://doc.tiki.org/New-in-version New in version]&quot; page.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel etc. as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. The [[Security]] ArchWiki page complements this in respect of securing the underlying operating system. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}} (or equivalent), enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. Make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. At a minimum, you should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or equivalent).<br />
# Enable {{ic|1=extension=iconv.so}} and {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
=== Timeout updating database on large sites ===<br />
<br />
If you have a large site, PHP timeout values may be exceeded when updating the database (as part of updating Tiki to a new version) in the web-based workflow. Should this occur, you have two choices:<br />
<br />
# Extend PHP's timeout values, then try again.<br />
# Run the database update from the command line, then manually lock the installer (you ''should'' then be able to skip the web-based workflow, and continue from [[#After updating|After updating]]):<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# '''php''' console.php database:update<br />
# touch db/lock}}<br />
<br />
Substitute '''{{ic|php}}''' in the command line example above if using a version from PHP from the AUR.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
If running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492775User:Aexoxea/Tiki Wiki CMS Groupware2017-10-09T13:45:17Z<p>Aexoxea: /* Set up a database server */ Updated for consistency.</p>
<hr />
<div>{{warning|This is a work in progress and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a web-based content management system with collaboration features written in PHP.<br />
<br />
== Package Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements#PHP Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once made, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] (for new installs) or [[#Choose your update path|Choose your update path]] (for updates) below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Install Tiki ===<br />
<br />
Install the Tiki package that you made above.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, use Apache.<br />
<br />
{{note|Tiki won't be accessible after setting up the web server, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to:<br />
<br />
# Install Apache per the instructions at [[Apache HTTP Server#Installation]].<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is enabled (it is by default).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other web server ====<br />
<br />
Essentially the same steps as for Apache. You will need to consult the relevant ArchWiki page (or other documentation) for your web server in order to:<br />
<br />
# Install your web server.<br />
# Configure your web server to run PHP.<br />
# Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
# Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or MySQL, though it's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Regardless, you need to install, set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. You will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new database user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. If your PHP install is new, this should already be enabled.<br />
* Enable the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|If using Apache, you will need to restart the web server now for these changes to take effect. Reloading or restarting the web server may also be needed for other web servers; consult your documentation.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your updated Tiki site. Once there, continue with [[#After updating|After updating]] below.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before continuing if you need to!}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== Choose your update path ===<br />
<br />
Make the new package (see [[#Package Tiki|Package Tiki]] above), then choose '''one''' of the following paths to install it:<br />
<br />
* '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then install the new package.<br />
* '''Update-in-place:''' Install the new package over the existing package.<br />
<br />
The remove-then-install path is strongly recommended, as this helps to ensure that package files from different versions are not mixed together (which ''will'' happen due to the way Tiki operates and [[Pacman]] handles updates), while leaving runtime files -- such as configurations and non-database uploads -- intact.<br />
<br />
The update-in-place path is not recommended, but is appealing if you have customised the package files. Be aware that undefined behaviour may occur where files from different versions become mixed together. You can check if this has happened using the files check feature in the [https://doc.tiki.org/Security+Admin System &gt; Security Admin] Control Panel.<br />
<br />
{{tip|You should consider storing any package file changes in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system], then [[List of applications/Utilities#Comparison, diff, merge|merging]] them back after updating. Doing this in concert with the remove-then-install path will prove more robust over time. Additionally, you can consider submitting generally useful changes upstream.}}<br />
<br />
Once you've installed the new package, continue with [[#Configure Tiki|Configure Tiki]] above.<br />
<br />
=== After updating ===<br />
<br />
Log in to your site, check that everything is as it should be, and when you're ready, re-open the site (if you closed it before). Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under Tiki's &quot;[https://doc.tiki.org/New-in-version New in version]&quot; page.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel etc. as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. The [[Security]] ArchWiki page complements this in respect of securing the underlying operating system. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}} (or equivalent), enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. Make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. At a minimum, you should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or equivalent).<br />
# Enable {{ic|1=extension=iconv.so}} and {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
=== Timeout updating database on large sites ===<br />
<br />
If you have a large site, PHP timeout values may be exceeded when updating the database (as part of updating Tiki to a new version) in the web-based workflow. Should this occur, you have two choices:<br />
<br />
# Extend PHP's timeout values, then try again.<br />
# Run the database update from the command line, then manually lock the installer (you ''should'' then be able to skip the web-based workflow, and continue from [[#After updating|After updating]]):<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# '''php''' console.php database:update<br />
# touch db/lock}}<br />
<br />
Substitute '''{{ic|php}}''' in the command line example above if using a version from PHP from the AUR.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
If running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492774User:Aexoxea/Tiki Wiki CMS Groupware2017-10-09T13:38:29Z<p>Aexoxea: /* Package Tiki */ Unimportant adjective.</p>
<hr />
<div>{{warning|This is a work in progress and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a web-based content management system with collaboration features written in PHP.<br />
<br />
== Package Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements#PHP Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once made, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] (for new installs) or [[#Choose your update path|Choose your update path]] (for updates) below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Install Tiki ===<br />
<br />
Install the Tiki package that you made above.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, use Apache.<br />
<br />
{{note|Tiki won't be accessible after setting up the web server, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to:<br />
<br />
# Install Apache per the instructions at [[Apache HTTP Server#Installation]].<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is enabled (it is by default).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other web server ====<br />
<br />
Essentially the same steps as for Apache. You will need to consult the relevant ArchWiki page (or other documentation) for your web server in order to:<br />
<br />
# Install your web server.<br />
# Configure your web server to run PHP.<br />
# Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
# Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or MySQL, so you need to install '''one''' of {{pkg|mariadb}} or {{aur|mysql}}. It's recommended to install MariaDB unless you have a specific need for something else.<br />
<br />
Once installed, you need to set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. If your PHP install is new, this should already be enabled.<br />
* Enable the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|If using Apache, you will need to restart the web server now for these changes to take effect. Reloading or restarting the web server may also be needed for other web servers; consult your documentation.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your updated Tiki site. Once there, continue with [[#After updating|After updating]] below.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before continuing if you need to!}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== Choose your update path ===<br />
<br />
Make the new package (see [[#Package Tiki|Package Tiki]] above), then choose '''one''' of the following paths to install it:<br />
<br />
* '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then install the new package.<br />
* '''Update-in-place:''' Install the new package over the existing package.<br />
<br />
The remove-then-install path is strongly recommended, as this helps to ensure that package files from different versions are not mixed together (which ''will'' happen due to the way Tiki operates and [[Pacman]] handles updates), while leaving runtime files -- such as configurations and non-database uploads -- intact.<br />
<br />
The update-in-place path is not recommended, but is appealing if you have customised the package files. Be aware that undefined behaviour may occur where files from different versions become mixed together. You can check if this has happened using the files check feature in the [https://doc.tiki.org/Security+Admin System &gt; Security Admin] Control Panel.<br />
<br />
{{tip|You should consider storing any package file changes in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system], then [[List of applications/Utilities#Comparison, diff, merge|merging]] them back after updating. Doing this in concert with the remove-then-install path will prove more robust over time. Additionally, you can consider submitting generally useful changes upstream.}}<br />
<br />
Once you've installed the new package, continue with [[#Configure Tiki|Configure Tiki]] above.<br />
<br />
=== After updating ===<br />
<br />
Log in to your site, check that everything is as it should be, and when you're ready, re-open the site (if you closed it before). Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under Tiki's &quot;[https://doc.tiki.org/New-in-version New in version]&quot; page.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel etc. as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. The [[Security]] ArchWiki page complements this in respect of securing the underlying operating system. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}} (or equivalent), enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. Make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. At a minimum, you should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or equivalent).<br />
# Enable {{ic|1=extension=iconv.so}} and {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
=== Timeout updating database on large sites ===<br />
<br />
If you have a large site, PHP timeout values may be exceeded when updating the database (as part of updating Tiki to a new version) in the web-based workflow. Should this occur, you have two choices:<br />
<br />
# Extend PHP's timeout values, then try again.<br />
# Run the database update from the command line, then manually lock the installer (you ''should'' then be able to skip the web-based workflow, and continue from [[#After updating|After updating]]):<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# '''php''' console.php database:update<br />
# touch db/lock}}<br />
<br />
Substitute '''{{ic|php}}''' in the command line example above if using a version from PHP from the AUR.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
If running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492773User:Aexoxea/Tiki Wiki CMS Groupware2017-10-09T13:37:09Z<p>Aexoxea: /* Package Tiki */ Make link more specific.</p>
<hr />
<div>{{warning|This is a work in progress and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a web-based content management system with collaboration features written in PHP.<br />
<br />
== Package Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) mostly works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements#PHP Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once made, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] (for new installs) or [[#Choose your update path|Choose your update path]] (for updates) below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Install Tiki ===<br />
<br />
Install the Tiki package that you made above.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, use Apache.<br />
<br />
{{note|Tiki won't be accessible after setting up the web server, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to:<br />
<br />
# Install Apache per the instructions at [[Apache HTTP Server#Installation]].<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is enabled (it is by default).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other web server ====<br />
<br />
Essentially the same steps as for Apache. You will need to consult the relevant ArchWiki page (or other documentation) for your web server in order to:<br />
<br />
# Install your web server.<br />
# Configure your web server to run PHP.<br />
# Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
# Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or MySQL, so you need to install '''one''' of {{pkg|mariadb}} or {{aur|mysql}}. It's recommended to install MariaDB unless you have a specific need for something else.<br />
<br />
Once installed, you need to set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. If your PHP install is new, this should already be enabled.<br />
* Enable the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|If using Apache, you will need to restart the web server now for these changes to take effect. Reloading or restarting the web server may also be needed for other web servers; consult your documentation.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your updated Tiki site. Once there, continue with [[#After updating|After updating]] below.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before continuing if you need to!}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== Choose your update path ===<br />
<br />
Make the new package (see [[#Package Tiki|Package Tiki]] above), then choose '''one''' of the following paths to install it:<br />
<br />
* '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then install the new package.<br />
* '''Update-in-place:''' Install the new package over the existing package.<br />
<br />
The remove-then-install path is strongly recommended, as this helps to ensure that package files from different versions are not mixed together (which ''will'' happen due to the way Tiki operates and [[Pacman]] handles updates), while leaving runtime files -- such as configurations and non-database uploads -- intact.<br />
<br />
The update-in-place path is not recommended, but is appealing if you have customised the package files. Be aware that undefined behaviour may occur where files from different versions become mixed together. You can check if this has happened using the files check feature in the [https://doc.tiki.org/Security+Admin System &gt; Security Admin] Control Panel.<br />
<br />
{{tip|You should consider storing any package file changes in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system], then [[List of applications/Utilities#Comparison, diff, merge|merging]] them back after updating. Doing this in concert with the remove-then-install path will prove more robust over time. Additionally, you can consider submitting generally useful changes upstream.}}<br />
<br />
Once you've installed the new package, continue with [[#Configure Tiki|Configure Tiki]] above.<br />
<br />
=== After updating ===<br />
<br />
Log in to your site, check that everything is as it should be, and when you're ready, re-open the site (if you closed it before). Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under Tiki's &quot;[https://doc.tiki.org/New-in-version New in version]&quot; page.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel etc. as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. The [[Security]] ArchWiki page complements this in respect of securing the underlying operating system. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}} (or equivalent), enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. Make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. At a minimum, you should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or equivalent).<br />
# Enable {{ic|1=extension=iconv.so}} and {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
=== Timeout updating database on large sites ===<br />
<br />
If you have a large site, PHP timeout values may be exceeded when updating the database (as part of updating Tiki to a new version) in the web-based workflow. Should this occur, you have two choices:<br />
<br />
# Extend PHP's timeout values, then try again.<br />
# Run the database update from the command line, then manually lock the installer (you ''should'' then be able to skip the web-based workflow, and continue from [[#After updating|After updating]]):<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# '''php''' console.php database:update<br />
# touch db/lock}}<br />
<br />
Substitute '''{{ic|php}}''' in the command line example above if using a version from PHP from the AUR.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
If running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware/Files_Stable&diff=492771User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable2017-10-09T12:54:39Z<p>Aexoxea: Undo revision 492583 by Aexoxea (Go back to using rm)</p>
<hr />
<div>These files can be used to build and install the latest stable release of [[User:Aexoxea/Tiki Wiki CMS Groupware|Tiki Wiki CMS Groupware]].<br />
<br />
{{note|This page exists in lieu of a package in AUR for now. I still consider these files to be experimental and I can't yet commit to keeping them updated.}}<br />
<br />
{{hc|PKGBUILD|2=&lt;nowiki&gt;<br />
pkgname=tikiwiki<br />
pkgver=17.1<br />
pkgrel=1<br />
_relcodename=&quot;17.x_Zeta_Bootis&quot;<br />
_minphpver=&quot;5.6&quot;<br />
_maxphpver=&quot;7.2&quot; # Maximum will be the minor release behind this version.<br />
pkgdesc=&quot;Tiki Wiki CMS Groupware, normal version.&quot;<br />
arch=('any')<br />
url=&quot;https://tiki.org/&quot;<br />
license=('LGPL2.1')<br />
depends=(&quot;php-intl&gt;=${_minphpver}&quot; &quot;php-intl&lt;${_maxphpver}&quot;)<br />
optdepends=(&quot;php-gd&gt;=${_minphpver}: image processing and CAPTCHAs&quot;<br />
&quot;php-gd&lt;${_maxphpver}: image processing and CAPTCHAs&quot;<br />
&quot;mariadb: supported database server&quot;<br />
&quot;mysql: supported database server&quot;)<br />
makedepends=(&quot;php-mcrypt&gt;=${_minphpver}&quot; &quot;php-mcrypt&lt;${_maxphpver}&quot;<br />
&quot;unzip&quot;)<br />
conflicts=('tikiwiki-lts' 'tikiwiki-lts-lag')<br />
source=(&quot;tiki-${pkgver}.tar.gz::https://sourceforge.net/projects/tikiwiki/files/Tiki_${_relcodename}/${pkgver}/tiki-${pkgver}.tar.gz/download&quot;<br />
&quot;apache.example.conf&quot;<br />
&quot;setup-6460.diff&quot;)<br />
options=('emptydirs' '!strip')<br />
install=&quot;${pkgname}.install&quot;<br />
md5sums=('a40161bae2d4da33658d6d52235cb8aa'<br />
'f761900ca84055a145a68ad10551aced'<br />
'9b58ddd811948cc059863101790454d9')<br />
sha1sums=('5dff1f418f9d982232187d6364d0a34ecfbd34a8'<br />
'db56b4e1960f16a595a6b309a77d0fee46b48bf0'<br />
'98052a54f98c6bfe4a651c71c5860190a47d0483')<br />
<br />
package() {<br />
# Copy the main package files into place.<br />
mkdir --parents &quot;${pkgdir}/usr/share/webapps/&quot;<br />
cp --archive --force &quot;${srcdir}/tiki-${pkgver}&quot; &quot;${pkgdir}/usr/share/webapps/tikiwiki&quot;<br />
<br />
# Install the Apache example configuration.<br />
install -D --mode=&quot;644&quot; --target-directory=&quot;${pkgdir}/etc/webapps/tikiwiki/&quot; &quot;${srcdir}/apache.example.conf&quot;<br />
<br />
# Ready the setup script for use.<br />
chmod a+rx,u+w &quot;${pkgdir}/usr/share/webapps/tikiwiki/setup.sh&quot;<br />
patch &quot;${pkgdir}/usr/share/webapps/tikiwiki/setup.sh&quot; &quot;${srcdir}/setup-6460.diff&quot; # Workaround for 'https://dev.tiki.org/item6460'.<br />
<br />
# Run the setup script.<br />
cd &quot;${pkgdir}/usr/share/webapps/tikiwiki/&quot;<br />
if [ -e &quot;/usr/bin/php&quot; ]; then<br />
./setup.sh -u root -g root -n fix<br />
elif [ -e &quot;/usr/bin/php71&quot; ]; then<br />
./setup.sh -u root -g root -p php71 -n fix<br />
elif [ -e &quot;/usr/bin/php70&quot; ]; then<br />
./setup.sh -u root -g root -p php70 -n fix<br />
elif [ -e &quot;/usr/bin/php56&quot; ]; then<br />
./setup.sh -u root -g root -p php56 -n fix<br />
else<br />
echo &quot;:: WARNING: Setup script not run as no supported PHP binary could be found.&quot;<br />
fi<br />
}<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|apache.example.conf|2=&lt;nowiki&gt;<br />
&lt;IfModule mod_alias.c&gt;<br />
Alias /tiki /usr/share/webapps/tikiwiki/<br />
&lt;/IfModule&gt;<br />
<br />
&lt;Directory /usr/share/webapps/tikiwiki/&gt;<br />
Options FollowSymlinks<br />
AllowOverride all<br />
Require all granted<br />
php_admin_value open_basedir &quot;/srv/http/:/dev/urandom:/tmp/:/usr/share/pear/:/usr/share/webapps/tikiwiki/:/etc/webapps/tikiwiki/&quot;<br />
&lt;/Directory&gt;<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|setup-6460.diff|2=&lt;nowiki&gt;<br />
--- setup.sh<br />
+++ setup.sh<br />
@@ -539,10 +539,10 @@<br />
then<br />
if exists curl;<br />
then<br />
- curl -s https://getcomposer.org/installer | php -- --install-dir=temp<br />
+ curl -s https://getcomposer.org/installer | &quot;${PHPCLI}&quot; -- --install-dir=temp<br />
else<br />
# todo : if exists php;<br />
- php -r &quot;eval('?&gt;'.file_get_contents('https://getcomposer.org/installer'));&quot; -- --install-dir=temp<br />
+ &quot;${PHPCLI}&quot; -r &quot;eval('?&gt;'.file_get_contents('https://getcomposer.org/installer'));&quot; -- --install-dir=temp<br />
fi<br />
# if PATCHCOMPOSERFLAG then modify temp/composer.phar to avoid the warnings<br />
# this hack is not yet possible because of a self signature check in temp/composer.phar<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|tikiwiki.install|2=&lt;nowiki&gt;<br />
post_install() {<br />
<br />
echo &quot;:: Be aware that if using Tiki Wiki CMS Groupware on PHP 7.1, there are a few&quot;<br />
echo &quot; minor known issues (see 'https://doc.tiki.org/Requirements'). If these impact&quot;<br />
echo &quot; you, consider downgrading to PHP 7.0.&quot;<br />
echo &quot; &quot;<br />
echo &quot;:: To complete the setup of Tiki Wiki CMS Groupware, you need to follow the&quot;<br />
echo &quot; instructions starting at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Install_and_set_up_prerequisites'&quot;<br />
<br />
}<br />
<br />
pre_upgrade() {<br />
<br />
echo &quot;:: Prior to upgrading Tiki Wiki CMS Groupware, you should consider the actions&quot;<br />
echo &quot; listed at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Before_updating'&quot;<br />
<br />
# Clear out Tiki caches -- cached files may interfere with the upgrade process.<br />
rm --force --recursive /usr/share/webapps/tikiwiki/modules/cache/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/cache/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/public/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/templates_c/*<br />
<br />
}<br />
<br />
post_upgrade() {<br />
<br />
# Remove lock file -- allows Tiki installer to be used.<br />
rm --force /usr/share/webapps/tikiwiki/db/lock<br />
<br />
echo &quot;:: To complete the upgrade of Tiki Wiki CMS Groupware, you need to follow the&quot;<br />
echo &quot; instructions starting at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Choose_your_update_path'&quot;<br />
<br />
}<br />
<br />
pre_remove() {<br />
<br />
# Clear out Tiki caches -- cached files may interfere with the upgrade process (if doing remove-then-install).<br />
rm --force --recursive /usr/share/webapps/tikiwiki/modules/cache/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/cache/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/public/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/templates_c/*<br />
<br />
}<br />
<br />
post_remove() {<br />
<br />
echo &quot;:: If you're removing Tiki Wiki CMS Groupware for good, remember to:&quot;<br />
echo &quot; (1) Remove Tiki's database (and database user account, if applicable).&quot;<br />
echo &quot; (2) Remove any residual files under /usr/share/webapps/tikiwiki/.&quot;<br />
<br />
}<br />
&lt;/nowiki&gt;}}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492770User:Aexoxea/Tiki Wiki CMS Groupware2017-10-09T12:51:15Z<p>Aexoxea: Miscellaneous updates.</p>
<hr />
<div>{{warning|This is a work in progress and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a web-based content management system with collaboration features written in PHP.<br />
<br />
== Package Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) mostly works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once made, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] (for new installs) or [[#Choose your update path|Choose your update path]] (for updates) below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Install Tiki ===<br />
<br />
Install the Tiki package that you made above.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, use Apache.<br />
<br />
{{note|Tiki won't be accessible after setting up the web server, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to:<br />
<br />
# Install Apache per the instructions at [[Apache HTTP Server#Installation]].<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is enabled (it is by default).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other web server ====<br />
<br />
Essentially the same steps as for Apache. You will need to consult the relevant ArchWiki page (or other documentation) for your web server in order to:<br />
<br />
# Install your web server.<br />
# Configure your web server to run PHP.<br />
# Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
# Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or MySQL, so you need to install '''one''' of {{pkg|mariadb}} or {{aur|mysql}}. It's recommended to install MariaDB unless you have a specific need for something else.<br />
<br />
Once installed, you need to set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. If your PHP install is new, this should already be enabled.<br />
* Enable the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|If using Apache, you will need to restart the web server now for these changes to take effect. Reloading or restarting the web server may also be needed for other web servers; consult your documentation.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your updated Tiki site. Once there, continue with [[#After updating|After updating]] below.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before continuing if you need to!}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== Choose your update path ===<br />
<br />
Make the new package (see [[#Package Tiki|Package Tiki]] above), then choose '''one''' of the following paths to install it:<br />
<br />
* '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then install the new package.<br />
* '''Update-in-place:''' Install the new package over the existing package.<br />
<br />
The remove-then-install path is strongly recommended, as this helps to ensure that package files from different versions are not mixed together (which ''will'' happen due to the way Tiki operates and [[Pacman]] handles updates), while leaving runtime files -- such as configurations and non-database uploads -- intact.<br />
<br />
The update-in-place path is not recommended, but is appealing if you have customised the package files. Be aware that undefined behaviour may occur where files from different versions become mixed together. You can check if this has happened using the files check feature in the [https://doc.tiki.org/Security+Admin System &gt; Security Admin] Control Panel.<br />
<br />
{{tip|You should consider storing any package file changes in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system], then [[List of applications/Utilities#Comparison, diff, merge|merging]] them back after updating. Doing this in concert with the remove-then-install path will prove more robust over time. Additionally, you can consider submitting generally useful changes upstream.}}<br />
<br />
Once you've installed the new package, continue with [[#Configure Tiki|Configure Tiki]] above.<br />
<br />
=== After updating ===<br />
<br />
Log in to your site, check that everything is as it should be, and when you're ready, re-open the site (if you closed it before). Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under Tiki's &quot;[https://doc.tiki.org/New-in-version New in version]&quot; page.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel etc. as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. The [[Security]] ArchWiki page complements this in respect of securing the underlying operating system. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}} (or equivalent), enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. Make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. At a minimum, you should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or equivalent).<br />
# Enable {{ic|1=extension=iconv.so}} and {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
=== Timeout updating database on large sites ===<br />
<br />
If you have a large site, PHP timeout values may be exceeded when updating the database (as part of updating Tiki to a new version) in the web-based workflow. Should this occur, you have two choices:<br />
<br />
# Extend PHP's timeout values, then try again.<br />
# Run the database update from the command line, then manually lock the installer (you ''should'' then be able to skip the web-based workflow, and continue from [[#After updating|After updating]]):<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# '''php''' console.php database:update<br />
# touch db/lock}}<br />
<br />
Substitute '''{{ic|php}}''' in the command line example above if using a version from PHP from the AUR.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
If running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492584User:Aexoxea/Tiki Wiki CMS Groupware2017-10-08T04:17:16Z<p>Aexoxea: /* Troubleshooting */ Added &quot;Timeout updating database on large sites&quot;</p>
<hr />
<div>{{warning|This is a work in progress and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Make Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) mostly works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once made, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] (for new installs) or [[#Choose your update path|Choose your update path]] (for updates) below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Install Tiki ===<br />
<br />
Install the Tiki package that you made above.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, use Apache.<br />
<br />
{{note|Tiki won't be accessible yet, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to install {{pkg|apache}} and {{pkg|php-apache}}.<br />
<br />
After install, you need to:<br />
<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented with a leading '{{ic|#}}', uncomment it).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other ====<br />
<br />
Consult the relevant ArchWiki page (or other documentation) to:<br />
<br />
* Install your web server.<br />
* Configure your web server to run PHP.<br />
* Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
* Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or MySQL, so you need to install '''one''' of {{pkg|mariadb}} or {{aur|mysql}}. It's recommended to install MariaDB unless you have a specific need for something else.<br />
<br />
Once installed, you need to set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Uncomment (remove the leading '{{ic|;}}') and set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Uncomment and set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Uncomment (i.e. enable) the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Uncomment the {{ic|zip.so}} extension. If your PHP install is new, this should already be uncommented.<br />
* Uncomment the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your updated Tiki site. Once there, continue with [[#After updating|After updating]] below.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before continuing if you need to!}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== Choose your update path ===<br />
<br />
Make the new package (see [[#Make Tiki|Make Tiki]] above), then choose '''one''' of the following paths to install it:<br />
<br />
* '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then install the new package.<br />
* '''Update-in-place:''' Install the new package over the existing package.<br />
<br />
The remove-then-install path is strongly recommended, as this helps to ensure that package files from different versions are not mixed together (which ''will'' happen due to the way Tiki operates), while leaving runtime files (e.g. configurations and non-database uploads) intact.<br />
<br />
The update-in-place path is not recommended, but is appealing if you have customised the package files. Be aware that undefined behaviour may occur where files from different versions become mixed together.<br />
<br />
{{tip|You should consider storing any package file changes in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system], then [[List of applications/Utilities#Comparison, diff, merge|merging]] them back after updating. Doing this in concert with the remove-then-install path will prove more robust over time. Additionally, you can consider submitting generally useful changes upstream.}}<br />
<br />
Once you've installed the new package, continue with [[#Configure Tiki|Configure Tiki]] above.<br />
<br />
=== After updating ===<br />
<br />
Log in to your site, check that everything is as it should be, and when you're ready, re-open the site (if you closed it before). Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under Tiki's &quot;[https://doc.tiki.org/New-in-version New in version]&quot; page.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel etc. as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. The [[Security]] ArchWiki page complements this in respect of securing the underlying operating system. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}} (or equivalent), enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or equivalent).<br />
# Enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
=== Timeout updating database on large sites ===<br />
<br />
If you have a large site, PHP timeout values may be exceeded when updating the database (as part of updating Tiki to a new version) in the web-based workflow. Should this occur, you have two choices:<br />
<br />
# Extend PHP's timeout values, then try again.<br />
# Run the database update from the command line, then manually lock the installer (you ''should'' then be able to skip the web-based workflow, and continue from [[#After updating|After updating]]):<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# '''php''' console.php database:update<br />
# touch db/lock}}<br />
<br />
Substitute '''{{ic|php}}''' in the command line example above if using a version from PHP from the AUR.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
If running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware/Files_Stable&diff=492583User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable2017-10-08T04:03:00Z<p>Aexoxea: Refactored cache clearing to use console.php.</p>
<hr />
<div>These files can be used to build and install the latest stable release of [[User:Aexoxea/Tiki Wiki CMS Groupware|Tiki Wiki CMS Groupware]].<br />
<br />
{{note|This page exists in lieu of a package in AUR for now. I still consider these files to be experimental and I can't yet commit to keeping them updated.}}<br />
<br />
{{hc|PKGBUILD|2=&lt;nowiki&gt;<br />
pkgname=tikiwiki<br />
pkgver=17.1<br />
pkgrel=1<br />
_relcodename=&quot;17.x_Zeta_Bootis&quot;<br />
_minphpver=&quot;5.6&quot;<br />
_maxphpver=&quot;7.2&quot; # Maximum will be the minor release behind this version.<br />
pkgdesc=&quot;Tiki Wiki CMS Groupware, normal version.&quot;<br />
arch=('any')<br />
url=&quot;https://tiki.org/&quot;<br />
license=('LGPL2.1')<br />
depends=(&quot;php-intl&gt;=${_minphpver}&quot; &quot;php-intl&lt;${_maxphpver}&quot;)<br />
optdepends=(&quot;php-gd&gt;=${_minphpver}: image processing and CAPTCHAs&quot;<br />
&quot;php-gd&lt;${_maxphpver}: image processing and CAPTCHAs&quot;<br />
&quot;mariadb: supported database server&quot;<br />
&quot;mysql: supported database server&quot;)<br />
makedepends=(&quot;php-mcrypt&gt;=${_minphpver}&quot; &quot;php-mcrypt&lt;${_maxphpver}&quot;<br />
&quot;unzip&quot;)<br />
conflicts=('tikiwiki-lts' 'tikiwiki-lts-lag')<br />
source=(&quot;tiki-${pkgver}.tar.gz::https://sourceforge.net/projects/tikiwiki/files/Tiki_${_relcodename}/${pkgver}/tiki-${pkgver}.tar.gz/download&quot;<br />
&quot;apache.example.conf&quot;<br />
&quot;setup-6460.diff&quot;)<br />
options=('emptydirs' '!strip')<br />
install=&quot;${pkgname}.install&quot;<br />
md5sums=('a40161bae2d4da33658d6d52235cb8aa'<br />
'f761900ca84055a145a68ad10551aced'<br />
'9b58ddd811948cc059863101790454d9')<br />
sha1sums=('5dff1f418f9d982232187d6364d0a34ecfbd34a8'<br />
'db56b4e1960f16a595a6b309a77d0fee46b48bf0'<br />
'98052a54f98c6bfe4a651c71c5860190a47d0483')<br />
<br />
package() {<br />
# Copy the main package files into place.<br />
mkdir --parents &quot;${pkgdir}/usr/share/webapps/&quot;<br />
cp --archive --force &quot;${srcdir}/tiki-${pkgver}&quot; &quot;${pkgdir}/usr/share/webapps/tikiwiki&quot;<br />
<br />
# Install the Apache example configuration.<br />
install -D --mode=&quot;644&quot; --target-directory=&quot;${pkgdir}/etc/webapps/tikiwiki/&quot; &quot;${srcdir}/apache.example.conf&quot;<br />
<br />
# Ready the setup script for use.<br />
chmod a+rx,u+w &quot;${pkgdir}/usr/share/webapps/tikiwiki/setup.sh&quot;<br />
patch &quot;${pkgdir}/usr/share/webapps/tikiwiki/setup.sh&quot; &quot;${srcdir}/setup-6460.diff&quot; # Workaround for 'https://dev.tiki.org/item6460'.<br />
<br />
# Run the setup script.<br />
cd &quot;${pkgdir}/usr/share/webapps/tikiwiki/&quot;<br />
if [ -e &quot;/usr/bin/php&quot; ]; then<br />
./setup.sh -u root -g root -n fix<br />
elif [ -e &quot;/usr/bin/php71&quot; ]; then<br />
./setup.sh -u root -g root -p php71 -n fix<br />
elif [ -e &quot;/usr/bin/php70&quot; ]; then<br />
./setup.sh -u root -g root -p php70 -n fix<br />
elif [ -e &quot;/usr/bin/php56&quot; ]; then<br />
./setup.sh -u root -g root -p php56 -n fix<br />
else<br />
echo &quot;:: WARNING: Setup script not run as no supported PHP binary could be found.&quot;<br />
fi<br />
}<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|apache.example.conf|2=&lt;nowiki&gt;<br />
&lt;IfModule mod_alias.c&gt;<br />
Alias /tiki /usr/share/webapps/tikiwiki/<br />
&lt;/IfModule&gt;<br />
<br />
&lt;Directory /usr/share/webapps/tikiwiki/&gt;<br />
Options FollowSymlinks<br />
AllowOverride all<br />
Require all granted<br />
php_admin_value open_basedir &quot;/srv/http/:/dev/urandom:/tmp/:/usr/share/pear/:/usr/share/webapps/tikiwiki/:/etc/webapps/tikiwiki/&quot;<br />
&lt;/Directory&gt;<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|setup-6460.diff|2=&lt;nowiki&gt;<br />
--- setup.sh<br />
+++ setup.sh<br />
@@ -539,10 +539,10 @@<br />
then<br />
if exists curl;<br />
then<br />
- curl -s https://getcomposer.org/installer | php -- --install-dir=temp<br />
+ curl -s https://getcomposer.org/installer | &quot;${PHPCLI}&quot; -- --install-dir=temp<br />
else<br />
# todo : if exists php;<br />
- php -r &quot;eval('?&gt;'.file_get_contents('https://getcomposer.org/installer'));&quot; -- --install-dir=temp<br />
+ &quot;${PHPCLI}&quot; -r &quot;eval('?&gt;'.file_get_contents('https://getcomposer.org/installer'));&quot; -- --install-dir=temp<br />
fi<br />
# if PATCHCOMPOSERFLAG then modify temp/composer.phar to avoid the warnings<br />
# this hack is not yet possible because of a self signature check in temp/composer.phar<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|tikiwiki.install|2=&lt;nowiki&gt;<br />
post_install() {<br />
<br />
echo &quot;:: Be aware that if using Tiki Wiki CMS Groupware on PHP 7.1, there are a few&quot;<br />
echo &quot; minor known issues (see 'https://doc.tiki.org/Requirements'). If these impact&quot;<br />
echo &quot; you, consider downgrading to PHP 7.0.&quot;<br />
echo &quot; &quot;<br />
echo &quot;:: To complete the setup of Tiki Wiki CMS Groupware, you need to follow the&quot;<br />
echo &quot; instructions starting at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Install_and_set_up_prerequisites'&quot;<br />
<br />
}<br />
<br />
pre_upgrade() {<br />
<br />
echo &quot;:: Prior to upgrading Tiki Wiki CMS Groupware, you should consider the actions&quot;<br />
echo &quot; listed at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Before_updating'&quot;<br />
<br />
# Clear out Tiki caches -- cached files may interfere with the upgrade process.<br />
if [ -e &quot;/usr/bin/php&quot; ]; then<br />
php /usr/share/webapps/tikiwiki/console.php cache:clear<br />
elif [ -e &quot;/usr/bin/php71&quot; ]; then<br />
php71 /usr/share/webapps/tikiwiki/console.php cache:clear<br />
elif [ -e &quot;/usr/bin/php70&quot; ]; then<br />
php70 /usr/share/webapps/tikiwiki/console.php cache:clear<br />
elif [ -e &quot;/usr/bin/php56&quot; ]; then<br />
php56 /usr/share/webapps/tikiwiki/console.php cache:clear<br />
else<br />
echo &quot;:: WARNING: Caches not cleared as no supported PHP binary could be found.&quot;<br />
fi<br />
<br />
}<br />
<br />
post_upgrade() {<br />
<br />
# Remove lock file -- allows Tiki installer to be used.<br />
rm --force /usr/share/webapps/tikiwiki/db/lock<br />
<br />
echo &quot;:: To complete the upgrade of Tiki Wiki CMS Groupware, you need to follow the&quot;<br />
echo &quot; instructions starting at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Choose_your_update_path'&quot;<br />
<br />
}<br />
<br />
pre_remove() {<br />
<br />
# Clear out Tiki caches -- cached files may interfere with the upgrade process (if doing remove-then-install).<br />
if [ -e &quot;/usr/bin/php&quot; ]; then<br />
php /usr/share/webapps/tikiwiki/console.php cache:clear<br />
elif [ -e &quot;/usr/bin/php71&quot; ]; then<br />
php71 /usr/share/webapps/tikiwiki/console.php cache:clear<br />
elif [ -e &quot;/usr/bin/php70&quot; ]; then<br />
php70 /usr/share/webapps/tikiwiki/console.php cache:clear<br />
elif [ -e &quot;/usr/bin/php56&quot; ]; then<br />
php56 /usr/share/webapps/tikiwiki/console.php cache:clear<br />
else<br />
echo &quot;:: WARNING: Caches not cleared as no supported PHP binary could be found.&quot;<br />
fi<br />
<br />
}<br />
<br />
post_remove() {<br />
<br />
echo &quot;:: If you're removing Tiki Wiki CMS Groupware for good, remember to:&quot;<br />
echo &quot; (1) Remove Tiki's database (and database user account, if applicable).&quot;<br />
echo &quot; (2) Remove any residual files under /usr/share/webapps/tikiwiki/.&quot;<br />
<br />
}<br />
&lt;/nowiki&gt;}}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware/Files_Stable&diff=492582User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable2017-10-08T03:52:55Z<p>Aexoxea: Fix term.</p>
<hr />
<div>These files can be used to build and install the latest stable release of [[User:Aexoxea/Tiki Wiki CMS Groupware|Tiki Wiki CMS Groupware]].<br />
<br />
{{note|This page exists in lieu of a package in AUR for now. I still consider these files to be experimental and I can't yet commit to keeping them updated.}}<br />
<br />
{{hc|PKGBUILD|2=&lt;nowiki&gt;<br />
pkgname=tikiwiki<br />
pkgver=17.1<br />
pkgrel=1<br />
_relcodename=&quot;17.x_Zeta_Bootis&quot;<br />
_minphpver=&quot;5.6&quot;<br />
_maxphpver=&quot;7.2&quot; # Maximum will be the minor release behind this version.<br />
pkgdesc=&quot;Tiki Wiki CMS Groupware, normal version.&quot;<br />
arch=('any')<br />
url=&quot;https://tiki.org/&quot;<br />
license=('LGPL2.1')<br />
depends=(&quot;php-intl&gt;=${_minphpver}&quot; &quot;php-intl&lt;${_maxphpver}&quot;)<br />
optdepends=(&quot;php-gd&gt;=${_minphpver}: image processing and CAPTCHAs&quot;<br />
&quot;php-gd&lt;${_maxphpver}: image processing and CAPTCHAs&quot;<br />
&quot;mariadb: supported database server&quot;<br />
&quot;mysql: supported database server&quot;)<br />
makedepends=(&quot;php-mcrypt&gt;=${_minphpver}&quot; &quot;php-mcrypt&lt;${_maxphpver}&quot;<br />
&quot;unzip&quot;)<br />
conflicts=('tikiwiki-lts' 'tikiwiki-lts-lag')<br />
source=(&quot;tiki-${pkgver}.tar.gz::https://sourceforge.net/projects/tikiwiki/files/Tiki_${_relcodename}/${pkgver}/tiki-${pkgver}.tar.gz/download&quot;<br />
&quot;apache.example.conf&quot;<br />
&quot;setup-6460.diff&quot;)<br />
options=('emptydirs' '!strip')<br />
install=&quot;${pkgname}.install&quot;<br />
md5sums=('a40161bae2d4da33658d6d52235cb8aa'<br />
'f761900ca84055a145a68ad10551aced'<br />
'9b58ddd811948cc059863101790454d9')<br />
sha1sums=('5dff1f418f9d982232187d6364d0a34ecfbd34a8'<br />
'db56b4e1960f16a595a6b309a77d0fee46b48bf0'<br />
'98052a54f98c6bfe4a651c71c5860190a47d0483')<br />
<br />
package() {<br />
# Copy the main package files into place.<br />
mkdir --parents &quot;${pkgdir}/usr/share/webapps/&quot;<br />
cp --archive --force &quot;${srcdir}/tiki-${pkgver}&quot; &quot;${pkgdir}/usr/share/webapps/tikiwiki&quot;<br />
<br />
# Install the Apache example configuration.<br />
install -D --mode=&quot;644&quot; --target-directory=&quot;${pkgdir}/etc/webapps/tikiwiki/&quot; &quot;${srcdir}/apache.example.conf&quot;<br />
<br />
# Ready the setup script for use.<br />
chmod a+rx,u+w &quot;${pkgdir}/usr/share/webapps/tikiwiki/setup.sh&quot;<br />
patch &quot;${pkgdir}/usr/share/webapps/tikiwiki/setup.sh&quot; &quot;${srcdir}/setup-6460.diff&quot; # Workaround for 'https://dev.tiki.org/item6460'.<br />
<br />
# Run the setup script.<br />
cd &quot;${pkgdir}/usr/share/webapps/tikiwiki/&quot;<br />
if [ -e &quot;/usr/bin/php&quot; ]; then<br />
./setup.sh -u root -g root -n fix<br />
elif [ -e &quot;/usr/bin/php71&quot; ]; then<br />
./setup.sh -u root -g root -p php71 -n fix<br />
elif [ -e &quot;/usr/bin/php70&quot; ]; then<br />
./setup.sh -u root -g root -p php70 -n fix<br />
elif [ -e &quot;/usr/bin/php56&quot; ]; then<br />
./setup.sh -u root -g root -p php56 -n fix<br />
else<br />
echo &quot;:: WARNING: Setup script not run as no supported PHP binary could be found.&quot;<br />
fi<br />
}<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|apache.example.conf|2=&lt;nowiki&gt;<br />
&lt;IfModule mod_alias.c&gt;<br />
Alias /tiki /usr/share/webapps/tikiwiki/<br />
&lt;/IfModule&gt;<br />
<br />
&lt;Directory /usr/share/webapps/tikiwiki/&gt;<br />
Options FollowSymlinks<br />
AllowOverride all<br />
Require all granted<br />
php_admin_value open_basedir &quot;/srv/http/:/dev/urandom:/tmp/:/usr/share/pear/:/usr/share/webapps/tikiwiki/:/etc/webapps/tikiwiki/&quot;<br />
&lt;/Directory&gt;<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|setup-6460.diff|2=&lt;nowiki&gt;<br />
--- setup.sh<br />
+++ setup.sh<br />
@@ -539,10 +539,10 @@<br />
then<br />
if exists curl;<br />
then<br />
- curl -s https://getcomposer.org/installer | php -- --install-dir=temp<br />
+ curl -s https://getcomposer.org/installer | &quot;${PHPCLI}&quot; -- --install-dir=temp<br />
else<br />
# todo : if exists php;<br />
- php -r &quot;eval('?&gt;'.file_get_contents('https://getcomposer.org/installer'));&quot; -- --install-dir=temp<br />
+ &quot;${PHPCLI}&quot; -r &quot;eval('?&gt;'.file_get_contents('https://getcomposer.org/installer'));&quot; -- --install-dir=temp<br />
fi<br />
# if PATCHCOMPOSERFLAG then modify temp/composer.phar to avoid the warnings<br />
# this hack is not yet possible because of a self signature check in temp/composer.phar<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|tikiwiki.install|2=&lt;nowiki&gt;<br />
post_install() {<br />
<br />
echo &quot;:: Be aware that if using Tiki Wiki CMS Groupware on PHP 7.1, there are a few&quot;<br />
echo &quot; minor known issues (see 'https://doc.tiki.org/Requirements'). If these impact&quot;<br />
echo &quot; you, consider downgrading to PHP 7.0.&quot;<br />
echo &quot; &quot;<br />
echo &quot;:: To complete the setup of Tiki Wiki CMS Groupware, you need to follow the&quot;<br />
echo &quot; instructions starting at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Install_and_set_up_prerequisites'&quot;<br />
<br />
}<br />
<br />
pre_upgrade() {<br />
<br />
echo &quot;:: Prior to upgrading Tiki Wiki CMS Groupware, you should consider the actions&quot;<br />
echo &quot; listed at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Before_updating'&quot;<br />
<br />
# Clear out Tiki caches -- cached files may interfere with the upgrade process.<br />
rm --force --recursive /usr/share/webapps/tikiwiki/modules/cache/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/cache/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/public/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/templates_c/*<br />
<br />
}<br />
<br />
post_upgrade() {<br />
<br />
# Remove lock file -- allows Tiki installer to be used.<br />
rm --force /usr/share/webapps/tikiwiki/db/lock<br />
<br />
echo &quot;:: To complete the upgrade of Tiki Wiki CMS Groupware, you need to follow the&quot;<br />
echo &quot; instructions starting at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Choose_your_update_path'&quot;<br />
<br />
}<br />
<br />
post_remove() {<br />
<br />
echo &quot;:: If you're removing Tiki Wiki CMS Groupware for good, remember to:&quot;<br />
echo &quot; (1) Remove Tiki's database (and database user account, if applicable).&quot;<br />
echo &quot; (2) Remove any residual files under /usr/share/webapps/tikiwiki/.&quot;<br />
<br />
}<br />
&lt;/nowiki&gt;}}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492581User:Aexoxea/Tiki Wiki CMS Groupware2017-10-08T03:40:23Z<p>Aexoxea: /* Apache */ Remove nested parentheses.</p>
<hr />
<div>{{warning|This is a work in progress and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Make Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) mostly works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once made, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] (for new installs) or [[#Choose your update path|Choose your update path]] (for updates) below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Install Tiki ===<br />
<br />
Install the Tiki package that you made above.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, use Apache.<br />
<br />
{{note|Tiki won't be accessible yet, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to install {{pkg|apache}} and {{pkg|php-apache}}.<br />
<br />
After install, you need to:<br />
<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented with a leading '{{ic|#}}', uncomment it).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other ====<br />
<br />
Consult the relevant ArchWiki page (or other documentation) to:<br />
<br />
* Install your web server.<br />
* Configure your web server to run PHP.<br />
* Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
* Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or MySQL, so you need to install '''one''' of {{pkg|mariadb}} or {{aur|mysql}}. It's recommended to install MariaDB unless you have a specific need for something else.<br />
<br />
Once installed, you need to set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Uncomment (remove the leading '{{ic|;}}') and set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Uncomment and set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Uncomment (i.e. enable) the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Uncomment the {{ic|zip.so}} extension. If your PHP install is new, this should already be uncommented.<br />
* Uncomment the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your updated Tiki site. Once there, continue with [[#After updating|After updating]] below.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before continuing if you need to!}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== Choose your update path ===<br />
<br />
Make the new package (see [[#Make Tiki|Make Tiki]] above), then choose '''one''' of the following paths to install it:<br />
<br />
* '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then install the new package.<br />
* '''Update-in-place:''' Install the new package over the existing package.<br />
<br />
The remove-then-install path is strongly recommended, as this helps to ensure that package files from different versions are not mixed together (which ''will'' happen due to the way Tiki operates), while leaving runtime files (e.g. configurations and non-database uploads) intact.<br />
<br />
The update-in-place path is not recommended, but is appealing if you have customised the package files. Be aware that undefined behaviour may occur where files from different versions become mixed together.<br />
<br />
{{tip|You should consider storing any package file changes in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system], then [[List of applications/Utilities#Comparison, diff, merge|merging]] them back after updating. Doing this in concert with the remove-then-install path will prove more robust over time. Additionally, you can consider submitting generally useful changes upstream.}}<br />
<br />
Once you've installed the new package, continue with [[#Configure Tiki|Configure Tiki]] above.<br />
<br />
=== After updating ===<br />
<br />
Log in to your site, check that everything is as it should be, and when you're ready, re-open the site (if you closed it before). Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under Tiki's &quot;[https://doc.tiki.org/New-in-version New in version]&quot; page.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel etc. as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. The [[Security]] ArchWiki page complements this in respect of securing the underlying operating system. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}} (or equivalent), enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or equivalent).<br />
# Enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
If running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware/Files_Stable&diff=492578User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable2017-10-08T03:08:28Z<p>Aexoxea: Commenting.</p>
<hr />
<div>These files can be used to build and install the latest stable release of [[User:Aexoxea/Tiki Wiki CMS Groupware|Tiki Wiki CMS Groupware]].<br />
<br />
{{note|This page exists in lieu of a package in AUR for now. I still consider these files to be experimental and I can't yet commit to keeping them updated.}}<br />
<br />
{{hc|PKGBUILD|2=&lt;nowiki&gt;<br />
pkgname=tikiwiki<br />
pkgver=17.1<br />
pkgrel=1<br />
_relcodename=&quot;17.x_Zeta_Bootis&quot;<br />
_minphpver=&quot;5.6&quot;<br />
_maxphpver=&quot;7.2&quot; # Maximum will be the minor release behind this version.<br />
pkgdesc=&quot;Tiki Wiki CMS Groupware, normal version.&quot;<br />
arch=('any')<br />
url=&quot;https://tiki.org/&quot;<br />
license=('LGPL2.1')<br />
depends=(&quot;php-intl&gt;=${_minphpver}&quot; &quot;php-intl&lt;${_maxphpver}&quot;)<br />
optdepends=(&quot;php-gd&gt;=${_minphpver}: image processing and CAPTCHAs&quot;<br />
&quot;php-gd&lt;${_maxphpver}: image processing and CAPTCHAs&quot;<br />
&quot;mariadb: supported database server&quot;<br />
&quot;mysql: supported database server&quot;)<br />
makedepends=(&quot;php-mcrypt&gt;=${_minphpver}&quot; &quot;php-mcrypt&lt;${_maxphpver}&quot;<br />
&quot;unzip&quot;)<br />
conflicts=('tikiwiki-lts' 'tikiwiki-lts-lag')<br />
source=(&quot;tiki-${pkgver}.tar.gz::https://sourceforge.net/projects/tikiwiki/files/Tiki_${_relcodename}/${pkgver}/tiki-${pkgver}.tar.gz/download&quot;<br />
&quot;apache.example.conf&quot;<br />
&quot;setup-6460.diff&quot;)<br />
options=('emptydirs' '!strip')<br />
install=&quot;${pkgname}.install&quot;<br />
md5sums=('a40161bae2d4da33658d6d52235cb8aa'<br />
'f761900ca84055a145a68ad10551aced'<br />
'9b58ddd811948cc059863101790454d9')<br />
sha1sums=('5dff1f418f9d982232187d6364d0a34ecfbd34a8'<br />
'db56b4e1960f16a595a6b309a77d0fee46b48bf0'<br />
'98052a54f98c6bfe4a651c71c5860190a47d0483')<br />
<br />
package() {<br />
# Copy the main package files into place.<br />
mkdir --parents &quot;${pkgdir}/usr/share/webapps/&quot;<br />
cp --archive --force &quot;${srcdir}/tiki-${pkgver}&quot; &quot;${pkgdir}/usr/share/webapps/tikiwiki&quot;<br />
<br />
# Install the Apache example configuration.<br />
install -D --mode=&quot;644&quot; --target-directory=&quot;${pkgdir}/etc/webapps/tikiwiki/&quot; &quot;${srcdir}/apache.example.conf&quot;<br />
<br />
# Ready the setup script for use.<br />
chmod a+rx,u+w &quot;${pkgdir}/usr/share/webapps/tikiwiki/setup.sh&quot;<br />
patch &quot;${pkgdir}/usr/share/webapps/tikiwiki/setup.sh&quot; &quot;${srcdir}/setup-6460.diff&quot; # Workaround for 'https://dev.tiki.org/item6460'.<br />
<br />
# Run the setup script.<br />
cd &quot;${pkgdir}/usr/share/webapps/tikiwiki/&quot;<br />
if [ -e &quot;/usr/bin/php&quot; ]; then<br />
./setup.sh -u root -g root -n fix<br />
elif [ -e &quot;/usr/bin/php71&quot; ]; then<br />
./setup.sh -u root -g root -p php71 -n fix<br />
elif [ -e &quot;/usr/bin/php70&quot; ]; then<br />
./setup.sh -u root -g root -p php70 -n fix<br />
elif [ -e &quot;/usr/bin/php56&quot; ]; then<br />
./setup.sh -u root -g root -p php56 -n fix<br />
else<br />
echo &quot;:: WARNING: Setup script not run as no supported PHP binary could be found.&quot;<br />
fi<br />
}<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|apache.example.conf|2=&lt;nowiki&gt;<br />
&lt;IfModule mod_alias.c&gt;<br />
Alias /tiki /usr/share/webapps/tikiwiki/<br />
&lt;/IfModule&gt;<br />
<br />
&lt;Directory /usr/share/webapps/tikiwiki/&gt;<br />
Options FollowSymlinks<br />
AllowOverride all<br />
Require all granted<br />
php_admin_value open_basedir &quot;/srv/http/:/dev/urandom:/tmp/:/usr/share/pear/:/usr/share/webapps/tikiwiki/:/etc/webapps/tikiwiki/&quot;<br />
&lt;/Directory&gt;<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|setup-6460.diff|2=&lt;nowiki&gt;<br />
--- setup.sh<br />
+++ setup.sh<br />
@@ -539,10 +539,10 @@<br />
then<br />
if exists curl;<br />
then<br />
- curl -s https://getcomposer.org/installer | php -- --install-dir=temp<br />
+ curl -s https://getcomposer.org/installer | &quot;${PHPCLI}&quot; -- --install-dir=temp<br />
else<br />
# todo : if exists php;<br />
- php -r &quot;eval('?&gt;'.file_get_contents('https://getcomposer.org/installer'));&quot; -- --install-dir=temp<br />
+ &quot;${PHPCLI}&quot; -r &quot;eval('?&gt;'.file_get_contents('https://getcomposer.org/installer'));&quot; -- --install-dir=temp<br />
fi<br />
# if PATCHCOMPOSERFLAG then modify temp/composer.phar to avoid the warnings<br />
# this hack is not yet possible because of a self signature check in temp/composer.phar<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|tikiwiki.install|2=&lt;nowiki&gt;<br />
post_install() {<br />
<br />
echo &quot;:: Be aware that if using Tiki Wiki CMS Groupware on PHP 7.1, there are a few&quot;<br />
echo &quot; minor known issues (see 'https://doc.tiki.org/Requirements'). If these impact&quot;<br />
echo &quot; you, consider downgrading to PHP 7.0.&quot;<br />
echo &quot; &quot;<br />
echo &quot;:: To complete the setup of Tiki Wiki CMS Groupware, you need to follow the&quot;<br />
echo &quot; instructions starting at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Install_and_set_up_prerequisites'&quot;<br />
<br />
}<br />
<br />
pre_upgrade() {<br />
<br />
echo &quot;:: Prior to upgrading Tiki Wiki CMS Groupware, you should consider the actions&quot;<br />
echo &quot; listed at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Before_upgrading'&quot;<br />
<br />
# Clear out Tiki caches -- cached files may interfere with the upgrade process.<br />
rm --force --recursive /usr/share/webapps/tikiwiki/modules/cache/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/cache/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/public/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/templates_c/*<br />
<br />
}<br />
<br />
post_upgrade() {<br />
<br />
# Remove lock file -- allows Tiki installer to be used.<br />
rm --force /usr/share/webapps/tikiwiki/db/lock<br />
<br />
echo &quot;:: To complete the upgrade of Tiki Wiki CMS Groupware, you need to follow the&quot;<br />
echo &quot; instructions starting at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Choose_your_update_path'&quot;<br />
<br />
}<br />
<br />
post_remove() {<br />
<br />
echo &quot;:: If you're removing Tiki Wiki CMS Groupware for good, remember to:&quot;<br />
echo &quot; (1) Remove Tiki's database (and database user account, if applicable).&quot;<br />
echo &quot; (2) Remove any residual files under /usr/share/webapps/tikiwiki/.&quot;<br />
<br />
}<br />
&lt;/nowiki&gt;}}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User_talk:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492543User talk:Aexoxea/Tiki Wiki CMS Groupware2017-10-07T15:17:25Z<p>Aexoxea: /* To Do */ Updated.</p>
<hr />
<div>== To Do ==<br />
<br />
The following needs to happen before this can go into main space (if it ever does):<br />
<br />
* &lt;s&gt;''(Added 23-Sep-2017)'' Consider adding a {{ic|tikiwiki-lts-lag}} package as well, that would avoid the first few LTS point releases.&lt;/s&gt; ''(Abandoned for now)''<br />
* &lt;s&gt;''(Added 27-Sep-2017)'' Need to test building the packages in a fresh Arch, so that any missing makedepends can be found.&lt;/s&gt; ''(Done 28-Sep-2017)''<br />
* &lt;s&gt;Need to go through at least one minor '''and''' one major upgrade to Tiki, since there are very likely caveats and possibly updates needed to the {{ic|.install}} files as well.&lt;/s&gt; ''(Done 02-Oct-2017)''<br />
* &lt;s&gt;Need to do a first setup in a fresh Arch, so that any missing prerequisites can be found.&lt;/s&gt; ''(Done 27-Sep-2017)''<br />
* &lt;s&gt;Need to update the packages to reflect best package practice (e.g. should install to {{ic|/usr/share/webapps/}} with a redirect file, not {{ic|/srv/http/}}).&lt;/s&gt; ''(Done 07-Oct-2017)''<br />
* &lt;s&gt;''(Added 05-Oct-2017)'' Need to look at Permission Check details (relates to setup.sh).&lt;/s&gt; ''(Done 06-Oct-2017)''<br />
* Need to run it in this configuration for &quot;awhile&quot; to see if anything strange comes up.<br />
* Need to put the packages on [[AUR]] (requires [a] learning [[Git]] and [b] a commitment to keep them updated there).<br />
<br />
This list will be updated (and added to) as appropriate. [[User:Aexoxea|aexoxea]] ([[User_talk:Aexoxea|talk]]) 03:37, 10 September 2017 (UTC)</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware/Files_Stable&diff=492542User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable2017-10-07T15:15:52Z<p>Aexoxea: Fix install file references.</p>
<hr />
<div>These files can be used to build and install the latest stable release of [[User:Aexoxea/Tiki Wiki CMS Groupware|Tiki Wiki CMS Groupware]].<br />
<br />
{{note|This page exists in lieu of a package in AUR for now. I still consider these files to be experimental and I can't yet commit to keeping them updated.}}<br />
<br />
{{hc|PKGBUILD|2=&lt;nowiki&gt;<br />
pkgname=tikiwiki<br />
pkgver=17.1<br />
pkgrel=1<br />
_relcodename=&quot;17.x_Zeta_Bootis&quot;<br />
_minphpver=&quot;5.6&quot;<br />
_maxphpver=&quot;7.2&quot;<br />
pkgdesc=&quot;Tiki Wiki CMS Groupware, normal version.&quot;<br />
arch=('any')<br />
url=&quot;https://tiki.org/&quot;<br />
license=('LGPL2.1')<br />
depends=(&quot;php-intl&gt;=${_minphpver}&quot; &quot;php-intl&lt;${_maxphpver}&quot;)<br />
optdepends=(&quot;php-gd&gt;=${_minphpver}: image processing and CAPTCHAs&quot;<br />
&quot;php-gd&lt;${_maxphpver}: image processing and CAPTCHAs&quot;<br />
&quot;mariadb: supported database server&quot;<br />
&quot;mysql: supported database server&quot;)<br />
makedepends=(&quot;php-mcrypt&gt;=${_minphpver}&quot; &quot;php-mcrypt&lt;${_maxphpver}&quot;<br />
&quot;unzip&quot;)<br />
conflicts=('tikiwiki-lts' 'tikiwiki-lts-lag')<br />
source=(&quot;tiki-${pkgver}.tar.gz::https://sourceforge.net/projects/tikiwiki/files/Tiki_${_relcodename}/${pkgver}/tiki-${pkgver}.tar.gz/download&quot;<br />
&quot;apache.example.conf&quot;<br />
&quot;setup-6460.diff&quot;)<br />
options=('emptydirs' '!strip')<br />
install=&quot;${pkgname}.install&quot;<br />
md5sums=('a40161bae2d4da33658d6d52235cb8aa'<br />
'f761900ca84055a145a68ad10551aced'<br />
'9b58ddd811948cc059863101790454d9')<br />
sha1sums=('5dff1f418f9d982232187d6364d0a34ecfbd34a8'<br />
'db56b4e1960f16a595a6b309a77d0fee46b48bf0'<br />
'98052a54f98c6bfe4a651c71c5860190a47d0483')<br />
<br />
package() {<br />
# Copy the main package files into place.<br />
mkdir --parents &quot;${pkgdir}/usr/share/webapps/&quot;<br />
cp --archive --force &quot;${srcdir}/tiki-${pkgver}&quot; &quot;${pkgdir}/usr/share/webapps/tikiwiki&quot;<br />
<br />
# Install the Apache example configuration.<br />
install -D --mode=&quot;644&quot; --target-directory=&quot;${pkgdir}/etc/webapps/tikiwiki/&quot; &quot;${srcdir}/apache.example.conf&quot;<br />
<br />
# Ready the setup script for use.<br />
chmod a+rx,u+w &quot;${pkgdir}/usr/share/webapps/tikiwiki/setup.sh&quot;<br />
patch &quot;${pkgdir}/usr/share/webapps/tikiwiki/setup.sh&quot; &quot;${srcdir}/setup-6460.diff&quot; # (workaround for 'https://dev.tiki.org/item6460')<br />
<br />
# Run the setup script.<br />
cd &quot;${pkgdir}/usr/share/webapps/tikiwiki/&quot;<br />
if [ -e &quot;/usr/bin/php&quot; ]; then<br />
./setup.sh -u root -g root -n fix<br />
elif [ -e &quot;/usr/bin/php71&quot; ]; then<br />
./setup.sh -u root -g root -p php71 -n fix<br />
elif [ -e &quot;/usr/bin/php70&quot; ]; then<br />
./setup.sh -u root -g root -p php70 -n fix<br />
elif [ -e &quot;/usr/bin/php56&quot; ]; then<br />
./setup.sh -u root -g root -p php56 -n fix<br />
else<br />
echo &quot;:: WARNING: Setup script not run as no supported PHP binary could be found.&quot;<br />
fi<br />
}<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|apache.example.conf|2=&lt;nowiki&gt;<br />
&lt;IfModule mod_alias.c&gt;<br />
Alias /tiki /usr/share/webapps/tikiwiki/<br />
&lt;/IfModule&gt;<br />
<br />
&lt;Directory /usr/share/webapps/tikiwiki/&gt;<br />
Options FollowSymlinks<br />
AllowOverride all<br />
Require all granted<br />
php_admin_value open_basedir &quot;/srv/http/:/dev/urandom:/tmp/:/usr/share/pear/:/usr/share/webapps/tikiwiki/:/etc/webapps/tikiwiki/&quot;<br />
&lt;/Directory&gt;<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|setup-6460.diff|2=&lt;nowiki&gt;<br />
--- setup.sh<br />
+++ setup.sh<br />
@@ -539,10 +539,10 @@<br />
then<br />
if exists curl;<br />
then<br />
- curl -s https://getcomposer.org/installer | php -- --install-dir=temp<br />
+ curl -s https://getcomposer.org/installer | &quot;${PHPCLI}&quot; -- --install-dir=temp<br />
else<br />
# todo : if exists php;<br />
- php -r &quot;eval('?&gt;'.file_get_contents('https://getcomposer.org/installer'));&quot; -- --install-dir=temp<br />
+ &quot;${PHPCLI}&quot; -r &quot;eval('?&gt;'.file_get_contents('https://getcomposer.org/installer'));&quot; -- --install-dir=temp<br />
fi<br />
# if PATCHCOMPOSERFLAG then modify temp/composer.phar to avoid the warnings<br />
# this hack is not yet possible because of a self signature check in temp/composer.phar<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|tikiwiki.install|2=&lt;nowiki&gt;<br />
post_install() {<br />
<br />
echo &quot;:: Be aware that if using Tiki Wiki CMS Groupware on PHP 7.1, there are a few&quot;<br />
echo &quot; minor known issues (see 'https://doc.tiki.org/Requirements'). If these impact&quot;<br />
echo &quot; you, consider downgrading to PHP 7.0.&quot;<br />
echo &quot; &quot;<br />
echo &quot;:: To complete the setup of Tiki Wiki CMS Groupware, you need to follow the&quot;<br />
echo &quot; instructions starting at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Install_and_set_up_prerequisites'&quot;<br />
<br />
}<br />
<br />
pre_upgrade() {<br />
<br />
echo &quot;:: Prior to upgrading Tiki Wiki CMS Groupware, you should consider the actions&quot;<br />
echo &quot; listed at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Before_upgrading'&quot;<br />
<br />
# Clear out Tiki caches -- cached files may interfere with the upgrade process.<br />
rm --force --recursive /usr/share/webapps/tikiwiki/modules/cache/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/cache/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/public/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/templates_c/*<br />
<br />
}<br />
<br />
post_upgrade() {<br />
<br />
# Remove lock file -- allows Tiki installer to be used.<br />
rm --force /usr/share/webapps/tikiwiki/db/lock<br />
<br />
echo &quot;:: To complete the upgrade of Tiki Wiki CMS Groupware, you need to follow the&quot;<br />
echo &quot; instructions starting at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Choose_your_update_path'&quot;<br />
<br />
}<br />
<br />
post_remove() {<br />
<br />
echo &quot;:: If you're removing Tiki Wiki CMS Groupware for good, remember to:&quot;<br />
echo &quot; (1) Remove Tiki's database (and database user account, if applicable).&quot;<br />
echo &quot; (2) Remove any residual files under /usr/share/webapps/tikiwiki/.&quot;<br />
<br />
}<br />
&lt;/nowiki&gt;}}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware/Files_Meta&diff=492541User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta2017-10-07T15:11:57Z<p>Aexoxea: Someone will need to tell me if this isn't acceptable.</p>
<hr />
<div>These files can be used to build and install convenience packages that support [[User:Aexoxea/Tiki Wiki CMS Groupware|Tiki Wiki CMS Groupware]].<br />
<br />
{{note|This page exists in lieu of packages in AUR for now. I still consider these files to be experimental and I can't yet commit to keeping them updated.}}<br />
<br />
== File indexing ==<br />
<br />
{{hc|PKGBUILD|2=&lt;nowiki&gt;<br />
pkgname=tikiwiki-indexing-meta<br />
pkgver=20170909<br />
pkgrel=1<br />
pkgdesc=&quot;File indexing dependencies for Tiki Wiki CMS Groupware.&quot;<br />
arch=('any')<br />
url=&quot;https://tiki.org/&quot;<br />
license=('LGPLv2.1')<br />
depends=('binutils' 'catdoc' 'docx2txt' 'elinks' 'man-db' 'odt2txt' 'poppler' 'pstotext' 'unzip' 'util-linux')<br />
<br />
package() {<br />
# NOTE: This package depends on 'man-db' (provides 'man') and 'util-linux' (provides 'col'), however these packages should already be installed as they are part of the 'base' group.<br />
# NOTE: This package depends on 'binutils' (provides 'strings') and 'poppler' (provides 'pdftotext'), which may be used as alternatives to 'util-linux' (provides 'col') and 'pstotext' (provides 'pstotext') respectively.<br />
true<br />
}<br />
&lt;/nowiki&gt;}}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware/Files_Stable&diff=492540User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable2017-10-07T15:08:07Z<p>Aexoxea: This is as close to good packaging practice as we can get for now.</p>
<hr />
<div>These files can be used to build and install the latest stable release of [[User:Aexoxea/Tiki Wiki CMS Groupware|Tiki Wiki CMS Groupware]].<br />
<br />
{{note|This page exists in lieu of a package in AUR for now. I still consider these files to be experimental and I can't yet commit to keeping them updated.}}<br />
<br />
{{hc|PKGBUILD|2=&lt;nowiki&gt;<br />
pkgname=tikiwiki<br />
pkgver=17.1<br />
pkgrel=1<br />
_relcodename=&quot;17.x_Zeta_Bootis&quot;<br />
_minphpver=&quot;5.6&quot;<br />
_maxphpver=&quot;7.2&quot;<br />
pkgdesc=&quot;Tiki Wiki CMS Groupware, normal version.&quot;<br />
arch=('any')<br />
url=&quot;https://tiki.org/&quot;<br />
license=('LGPL2.1')<br />
depends=(&quot;php-intl&gt;=${_minphpver}&quot; &quot;php-intl&lt;${_maxphpver}&quot;)<br />
optdepends=(&quot;php-gd&gt;=${_minphpver}: image processing and CAPTCHAs&quot;<br />
&quot;php-gd&lt;${_maxphpver}: image processing and CAPTCHAs&quot;<br />
&quot;mariadb: supported database server&quot;<br />
&quot;mysql: supported database server&quot;)<br />
makedepends=(&quot;php-mcrypt&gt;=${_minphpver}&quot; &quot;php-mcrypt&lt;${_maxphpver}&quot;<br />
&quot;unzip&quot;)<br />
conflicts=('tikiwiki-lts' 'tikiwiki-lts-lag')<br />
source=(&quot;tiki-${pkgver}.tar.gz::https://sourceforge.net/projects/tikiwiki/files/Tiki_${_relcodename}/${pkgver}/tiki-${pkgver}.tar.gz/download&quot;<br />
&quot;apache.example.conf&quot;<br />
&quot;setup-6460.diff&quot;)<br />
options=('emptydirs' '!strip')<br />
install=&quot;${pkgname}.install&quot;<br />
md5sums=('a40161bae2d4da33658d6d52235cb8aa'<br />
'f761900ca84055a145a68ad10551aced'<br />
'9b58ddd811948cc059863101790454d9')<br />
sha1sums=('5dff1f418f9d982232187d6364d0a34ecfbd34a8'<br />
'db56b4e1960f16a595a6b309a77d0fee46b48bf0'<br />
'98052a54f98c6bfe4a651c71c5860190a47d0483')<br />
<br />
package() {<br />
# Copy the main package files into place.<br />
mkdir --parents &quot;${pkgdir}/usr/share/webapps/&quot;<br />
cp --archive --force &quot;${srcdir}/tiki-${pkgver}&quot; &quot;${pkgdir}/usr/share/webapps/tikiwiki&quot;<br />
<br />
# Install the Apache example configuration.<br />
install -D --mode=&quot;644&quot; --target-directory=&quot;${pkgdir}/etc/webapps/tikiwiki/&quot; &quot;${srcdir}/apache.example.conf&quot;<br />
<br />
# Ready the setup script for use.<br />
chmod a+rx,u+w &quot;${pkgdir}/usr/share/webapps/tikiwiki/setup.sh&quot;<br />
patch &quot;${pkgdir}/usr/share/webapps/tikiwiki/setup.sh&quot; &quot;${srcdir}/setup-6460.diff&quot; # (workaround for 'https://dev.tiki.org/item6460')<br />
<br />
# Run the setup script.<br />
cd &quot;${pkgdir}/usr/share/webapps/tikiwiki/&quot;<br />
if [ -e &quot;/usr/bin/php&quot; ]; then<br />
./setup.sh -u root -g root -n fix<br />
elif [ -e &quot;/usr/bin/php71&quot; ]; then<br />
./setup.sh -u root -g root -p php71 -n fix<br />
elif [ -e &quot;/usr/bin/php70&quot; ]; then<br />
./setup.sh -u root -g root -p php70 -n fix<br />
elif [ -e &quot;/usr/bin/php56&quot; ]; then<br />
./setup.sh -u root -g root -p php56 -n fix<br />
else<br />
echo &quot;:: WARNING: Setup script not run as no supported PHP binary could be found.&quot;<br />
fi<br />
}<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|apache.example.conf|2=&lt;nowiki&gt;<br />
&lt;IfModule mod_alias.c&gt;<br />
Alias /tiki /usr/share/webapps/tikiwiki/<br />
&lt;/IfModule&gt;<br />
<br />
&lt;Directory /usr/share/webapps/tikiwiki/&gt;<br />
Options FollowSymlinks<br />
AllowOverride all<br />
Require all granted<br />
php_admin_value open_basedir &quot;/srv/http/:/dev/urandom:/tmp/:/usr/share/pear/:/usr/share/webapps/tikiwiki/:/etc/webapps/tikiwiki/&quot;<br />
&lt;/Directory&gt;<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|setup-6460.diff|2=&lt;nowiki&gt;<br />
--- setup.sh<br />
+++ setup.sh<br />
@@ -539,10 +539,10 @@<br />
then<br />
if exists curl;<br />
then<br />
- curl -s https://getcomposer.org/installer | php -- --install-dir=temp<br />
+ curl -s https://getcomposer.org/installer | &quot;${PHPCLI}&quot; -- --install-dir=temp<br />
else<br />
# todo : if exists php;<br />
- php -r &quot;eval('?&gt;'.file_get_contents('https://getcomposer.org/installer'));&quot; -- --install-dir=temp<br />
+ &quot;${PHPCLI}&quot; -r &quot;eval('?&gt;'.file_get_contents('https://getcomposer.org/installer'));&quot; -- --install-dir=temp<br />
fi<br />
# if PATCHCOMPOSERFLAG then modify temp/composer.phar to avoid the warnings<br />
# this hack is not yet possible because of a self signature check in temp/composer.phar<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|tikiwiki.install|2=&lt;nowiki&gt;<br />
post_install() {<br />
<br />
echo &quot;:: Be aware that if using Tiki Wiki CMS Groupware on PHP 7.1, there are a few&quot;<br />
echo &quot; minor known issues (see 'https://doc.tiki.org/Requirements'). If these impact&quot;<br />
echo &quot; you, consider downgrading to PHP 7.0.&quot;<br />
echo &quot; &quot;<br />
echo &quot;:: To complete the setup of Tiki Wiki CMS Groupware, you need to follow the&quot;<br />
echo &quot; instructions at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Configuration'&quot;<br />
<br />
}<br />
<br />
pre_upgrade() {<br />
<br />
echo &quot;:: Prior to upgrading Tiki Wiki CMS Groupware, you may wish to consider the&quot;<br />
echo &quot; actions listed at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Before_upgrading'&quot;<br />
<br />
# Clear out Tiki caches -- cached files may interfere with the upgrade process.<br />
rm --force --recursive /usr/share/webapps/tikiwiki/modules/cache/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/cache/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/public/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/templates_c/*<br />
<br />
}<br />
<br />
post_upgrade() {<br />
<br />
# Remove lock file -- allows Tiki installer to be used.<br />
rm --force /usr/share/webapps/tikiwiki/db/lock<br />
<br />
echo &quot;:: To complete the upgrade of Tiki Wiki CMS Groupware, you need to follow the&quot;<br />
echo &quot; instructions at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#After_upgrading'&quot;<br />
<br />
}<br />
<br />
post_remove() {<br />
<br />
echo &quot;:: If you're removing Tiki Wiki CMS Groupware for good, remember to:&quot;<br />
echo &quot; (1) Remove Tiki's database (and database user, if applicable).&quot;<br />
echo &quot; (2) Remove any residual files under /usr/share/webapps/tikiwiki/.&quot;<br />
<br />
}<br />
&lt;/nowiki&gt;}}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492539User:Aexoxea/Tiki Wiki CMS Groupware2017-10-07T15:07:26Z<p>Aexoxea: This is a close to good packaging practice as we can get for now.</p>
<hr />
<div>{{warning|This is a work in progress and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Make Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) mostly works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once made, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] (for new installs) or [[#Choose your update path|Choose your update path]] (for updates) below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Install Tiki ===<br />
<br />
Install the Tiki package that you made above.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, use Apache.<br />
<br />
{{note|Tiki won't be accessible yet, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to install {{pkg|apache}} and {{pkg|php-apache}}.<br />
<br />
After install, you need to:<br />
<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented (has a leading '{{ic|#}}'), uncomment it).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other ====<br />
<br />
Consult the relevant ArchWiki page (or other documentation) to:<br />
<br />
* Install your web server.<br />
* Configure your web server to run PHP.<br />
* Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
* Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or MySQL, so you need to install '''one''' of {{pkg|mariadb}} or {{aur|mysql}}. It's recommended to install MariaDB unless you have a specific need for something else.<br />
<br />
Once installed, you need to set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Uncomment (remove the leading '{{ic|;}}') and set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Uncomment and set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Uncomment (i.e. enable) the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Uncomment the {{ic|zip.so}} extension. If your PHP install is new, this should already be uncommented.<br />
* Uncomment the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your updated Tiki site. Once there, continue with [[#After updating|After updating]] below.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before continuing if you need to!}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== Choose your update path ===<br />
<br />
Make the new package (see [[#Make Tiki|Make Tiki]] above), then choose '''one''' of the following paths to install it:<br />
<br />
* '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then install the new package.<br />
* '''Update-in-place:''' Install the new package over the existing package.<br />
<br />
The remove-then-install path is strongly recommended, as this helps to ensure that package files from different versions are not mixed together (which ''will'' happen due to the way Tiki operates), while leaving runtime files (e.g. configurations and non-database uploads) intact.<br />
<br />
The update-in-place path is not recommended, but is appealing if you have customised the package files. Be aware that undefined behaviour may occur where files from different versions become mixed together.<br />
<br />
{{tip|You should consider storing any package file changes in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system], then [[List of applications/Utilities#Comparison, diff, merge|merging]] them back after updating. Doing this in concert with the remove-then-install path will prove more robust over time. Additionally, you can consider submitting generally useful changes upstream.}}<br />
<br />
Once you've installed the new package, continue with [[#Configure Tiki|Configure Tiki]] above.<br />
<br />
=== After updating ===<br />
<br />
Log in to your site, check that everything is as it should be, and when you're ready, re-open the site (if you closed it before). Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under Tiki's &quot;[https://doc.tiki.org/New-in-version New in version]&quot; page.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel etc. as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. The [[Security]] ArchWiki page complements this in respect of securing the underlying operating system. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}} (or equivalent), enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or equivalent).<br />
# Enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
If running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492537User:Aexoxea/Tiki Wiki CMS Groupware2017-10-07T15:03:14Z<p>Aexoxea: /* Updates */ Make consistent.</p>
<hr />
<div>{{warning|This is a work in progress, does not currently reflect packaging best practice and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Make Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) mostly works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once made, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] (for new installs) or [[#Choose your update path|Choose your update path]] (for updates) below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Install Tiki ===<br />
<br />
Install the Tiki package that you made above.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, use Apache.<br />
<br />
{{note|Tiki won't be accessible yet, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to install {{pkg|apache}} and {{pkg|php-apache}}.<br />
<br />
After install, you need to:<br />
<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented (has a leading '{{ic|#}}'), uncomment it).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other ====<br />
<br />
Consult the relevant ArchWiki page (or other documentation) to:<br />
<br />
* Install your web server.<br />
* Configure your web server to run PHP.<br />
* Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
* Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or MySQL, so you need to install '''one''' of {{pkg|mariadb}} or {{aur|mysql}}. It's recommended to install MariaDB unless you have a specific need for something else.<br />
<br />
Once installed, you need to set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Uncomment (remove the leading '{{ic|;}}') and set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Uncomment and set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Uncomment (i.e. enable) the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Uncomment the {{ic|zip.so}} extension. If your PHP install is new, this should already be uncommented.<br />
* Uncomment the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your updated Tiki site. Once there, continue with [[#After updating|After updating]] below.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before continuing if you need to!}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== Choose your update path ===<br />
<br />
Make the new package (see [[#Make Tiki|Make Tiki]] above), then choose '''one''' of the following paths to install it:<br />
<br />
* '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then install the new package.<br />
* '''Update-in-place:''' Install the new package over the existing package.<br />
<br />
The remove-then-install path is strongly recommended, as this helps to ensure that package files from different versions are not mixed together (which ''will'' happen due to the way Tiki operates), while leaving runtime files (e.g. configurations and non-database uploads) intact.<br />
<br />
The update-in-place path is not recommended, but is appealing if you have customised the package files. Be aware that undefined behaviour may occur where files from different versions become mixed together.<br />
<br />
{{tip|You should consider storing any package file changes in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system], then [[List of applications/Utilities#Comparison, diff, merge|merging]] them back after updating. Doing this in concert with the remove-then-install path will prove more robust over time. Additionally, you can consider submitting generally useful changes upstream.}}<br />
<br />
Once you've installed the new package, continue with [[#Configure Tiki|Configure Tiki]] above.<br />
<br />
=== After updating ===<br />
<br />
Log in to your site, check that everything is as it should be, and when you're ready, re-open the site (if you closed it before). Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under Tiki's &quot;[https://doc.tiki.org/New-in-version New in version]&quot; page.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel etc. as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. The [[Security]] ArchWiki page complements this in respect of securing the underlying operating system. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}} (or equivalent), enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or equivalent).<br />
# Enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
When running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492536User:Aexoxea/Tiki Wiki CMS Groupware2017-10-07T15:02:09Z<p>Aexoxea: /* Make Tiki */ Fit in to the workflows.</p>
<hr />
<div>{{warning|This is a work in progress, does not currently reflect packaging best practice and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Make Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) mostly works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once made, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] (for new installs) or [[#Choose your update path|Choose your update path]] (for updates) below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Install Tiki ===<br />
<br />
Install the Tiki package that you made above.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, use Apache.<br />
<br />
{{note|Tiki won't be accessible yet, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to install {{pkg|apache}} and {{pkg|php-apache}}.<br />
<br />
After install, you need to:<br />
<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented (has a leading '{{ic|#}}'), uncomment it).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other ====<br />
<br />
Consult the relevant ArchWiki page (or other documentation) to:<br />
<br />
* Install your web server.<br />
* Configure your web server to run PHP.<br />
* Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
* Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or MySQL, so you need to install '''one''' of {{pkg|mariadb}} or {{aur|mysql}}. It's recommended to install MariaDB unless you have a specific need for something else.<br />
<br />
Once installed, you need to set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Uncomment (remove the leading '{{ic|;}}') and set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Uncomment and set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Uncomment (i.e. enable) the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Uncomment the {{ic|zip.so}} extension. If your PHP install is new, this should already be uncommented.<br />
* Uncomment the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your updated Tiki site. Once there, continue with [[#After updating|After updating]] below.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before continuing if you need to!}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
Once you've done what you need to here, continue with [[#Choose your update path|Choose your update path]] below.<br />
<br />
=== Choose your update path ===<br />
<br />
Make the new package (see [[#Make Tiki|Make Tiki]] above), then choose '''one''' of the following paths to install it:<br />
<br />
* '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then install the new package.<br />
* '''Update-in-place:''' Install the new package over the existing package.<br />
<br />
The remove-then-install path is strongly recommended, as this helps to ensure that package files from different versions are not mixed together (which ''will'' happen due to the way Tiki operates), while leaving runtime files (e.g. configurations and non-database uploads) intact.<br />
<br />
The update-in-place path is not recommended, but is appealing if you have customised the package files. Be aware that undefined behaviour may occur where files from different versions become mixed together.<br />
<br />
{{tip|You should consider storing any package file changes in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system], then [[List of applications/Utilities#Comparison, diff, merge|merging]] them back after updating. Doing this in concert with the remove-then-install path will prove more robust over time. Additionally, you can consider submitting generally useful changes upstream.}}<br />
<br />
Once you've installed the new package, continue with [[#Configure Tiki|Configure Tiki]] above.<br />
<br />
=== After updating ===<br />
<br />
Log in to your site, check that everything is as it should be, and when you're ready, re-open the site (if you closed it before). Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under Tiki's &quot;[https://doc.tiki.org/New-in-version New in version]&quot; page.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel etc. as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. The [[Security]] ArchWiki page complements this in respect of securing the underlying operating system. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}} (or equivalent), enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or equivalent).<br />
# Enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
When running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492535User:Aexoxea/Tiki Wiki CMS Groupware2017-10-07T14:59:36Z<p>Aexoxea: Major refactoring, part three beta.</p>
<hr />
<div>{{warning|This is a work in progress, does not currently reflect packaging best practice and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Make Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) mostly works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once made, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Install Tiki ===<br />
<br />
Install the Tiki package that you made above.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, use Apache.<br />
<br />
{{note|Tiki won't be accessible yet, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to install {{pkg|apache}} and {{pkg|php-apache}}.<br />
<br />
After install, you need to:<br />
<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented (has a leading '{{ic|#}}'), uncomment it).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other ====<br />
<br />
Consult the relevant ArchWiki page (or other documentation) to:<br />
<br />
* Install your web server.<br />
* Configure your web server to run PHP.<br />
* Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
* Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or MySQL, so you need to install '''one''' of {{pkg|mariadb}} or {{aur|mysql}}. It's recommended to install MariaDB unless you have a specific need for something else.<br />
<br />
Once installed, you need to set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Uncomment (remove the leading '{{ic|;}}') and set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Uncomment and set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Uncomment (i.e. enable) the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Uncomment the {{ic|zip.so}} extension. If your PHP install is new, this should already be uncommented.<br />
* Uncomment the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your updated Tiki site. Once there, continue with [[#After updating|After updating]] below.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before continuing if you need to!}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
Once you've done what you need to here, continue with [[#Choose your update path|Choose your update path]] below.<br />
<br />
=== Choose your update path ===<br />
<br />
Make the new package (see [[#Make Tiki|Make Tiki]] above), then choose '''one''' of the following paths to install it:<br />
<br />
* '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then install the new package.<br />
* '''Update-in-place:''' Install the new package over the existing package.<br />
<br />
The remove-then-install path is strongly recommended, as this helps to ensure that package files from different versions are not mixed together (which ''will'' happen due to the way Tiki operates), while leaving runtime files (e.g. configurations and non-database uploads) intact.<br />
<br />
The update-in-place path is not recommended, but is appealing if you have customised the package files. Be aware that undefined behaviour may occur where files from different versions become mixed together.<br />
<br />
{{tip|You should consider storing any package file changes in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system], then [[List of applications/Utilities#Comparison, diff, merge|merging]] them back after updating. Doing this in concert with the remove-then-install path will prove more robust over time. Additionally, you can consider submitting generally useful changes upstream.}}<br />
<br />
Once you've installed the new package, continue with [[#Configure Tiki|Configure Tiki]] above.<br />
<br />
=== After updating ===<br />
<br />
Log in to your site, check that everything is as it should be, and when you're ready, re-open the site (if you closed it before). Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under Tiki's &quot;[https://doc.tiki.org/New-in-version New in version]&quot; page.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel etc. as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. The [[Security]] ArchWiki page complements this in respect of securing the underlying operating system. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}} (or equivalent), enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent) and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or equivalent).<br />
# Enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
When running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492532User:Aexoxea/Tiki Wiki CMS Groupware2017-10-07T14:35:40Z<p>Aexoxea: /* Upgrades */ Major refactoring, part three alpha.</p>
<hr />
<div>{{warning|This is a work in progress, does not currently reflect packaging best practice and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Install Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make and install a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) mostly works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once installed, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, install Apache.<br />
<br />
{{note|Tiki won't be accessible yet, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to install {{pkg|apache}} and {{pkg|php-apache}}.<br />
<br />
After install, you need to:<br />
<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented (has a leading '{{ic|#}}'), uncomment it).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other ====<br />
<br />
Consult the relevant ArchWiki page (or other documentation) to:<br />
<br />
* Install your web server.<br />
* Configure your web server to run PHP.<br />
* Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
* Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or MySQL, so you need to install '''one''' of {{pkg|mariadb}} or {{aur|mysql}}. It's recommended to install MariaDB unless you have a specific need for something else.<br />
<br />
Once installed, you need to set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Uncomment (remove the leading '{{ic|;}}') and set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Uncomment and set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Uncomment (i.e. enable) the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Uncomment the {{ic|zip.so}} extension. If your PHP install is new, this should already be uncommented.<br />
* Uncomment the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your closed (but upgraded) Tiki site.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before continuing if you need to!}}<br />
<br />
== Updates ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before updating ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''Revert to a built-in theme (if using a custom theme).''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== Choose your update path ===<br />
<br />
There are two paths to updating Tiki:<br />
<br />
# '''Remove-then-install:''' [[Pacman#Removing_packages|Remove]] the existing package, then make and install the [[#Install Tiki|new package]].<br />
# '''Update-in-place:''' Make the new package, then install it over the existing package.<br />
<br />
The remove-then-install path is strongly recommended, as this helps to ensure that package files from different versions are not mixed together (which ''will'' happen due to the way Tiki operates), while leaving runtime files (e.g. configurations and non-database uploads) intact.<br />
<br />
The update-in-place path is not recommended, but is appealing if you have customised the package files. Be aware that undefined behaviour may occur where files from different versions become mixed together.<br />
<br />
{{tip|You should consider storing any package file changes in a [https://wiki.archlinux.org/index.php/Category:Version_Control_System version control system], then [[List of applications/Utilities#Comparison, diff, merge|merging]] them back after updating. Doing this in concert with the remove-then-install path will prove more robust over time. Additionally, you can consider submitting generally useful changes upstream.}}<br />
<br />
=== After upgrading ===<br />
<br />
Log in to your closed site, check that everything is as it should be, and when you're ready, re-open the site. Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under the &quot;[https://doc.tiki.org/New-in-version new in version]&quot; page in Tiki's online documentation.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel (or other relevant methods) as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or whichever PHP configuration file they're disabled in) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}}, enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or compatible equivalent from AUR).<br />
# Enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent, if using an AUR PHP version).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
When running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware/Files_Stable&diff=492528User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable2017-10-07T13:51:03Z<p>Aexoxea: Copy, not move.</p>
<hr />
<div>These files can be used to build and install the latest stable release of [[User:Aexoxea/Tiki Wiki CMS Groupware|Tiki Wiki CMS Groupware]].<br />
<br />
{{note|This page exists in lieu of a package in AUR for now. I still consider these files to be experimental, they don't yet follow good packaging practice, and I can't yet commit to keeping them updated in the AUR.}}<br />
<br />
{{hc|PKGBUILD|2=&lt;nowiki&gt;<br />
pkgname=tikiwiki<br />
pkgver=17.1<br />
pkgrel=1<br />
_relcodename=&quot;17.x_Zeta_Bootis&quot;<br />
_minphpver=&quot;5.6&quot;<br />
_maxphpver=&quot;7.2&quot;<br />
pkgdesc=&quot;Tiki Wiki CMS Groupware, normal version.&quot;<br />
arch=('any')<br />
url=&quot;https://tiki.org/&quot;<br />
license=('LGPL2.1')<br />
depends=(&quot;php-intl&gt;=${_minphpver}&quot; &quot;php-intl&lt;${_maxphpver}&quot;)<br />
optdepends=(&quot;php-gd&gt;=${_minphpver}: image processing and CAPTCHAs&quot;<br />
&quot;php-gd&lt;${_maxphpver}: image processing and CAPTCHAs&quot;<br />
&quot;mariadb: supported database server&quot;<br />
&quot;mysql: supported database server&quot;)<br />
makedepends=(&quot;php-mcrypt&gt;=${_minphpver}&quot; &quot;php-mcrypt&lt;${_maxphpver}&quot;<br />
&quot;unzip&quot;)<br />
conflicts=('tikiwiki-lts' 'tikiwiki-lts-lag')<br />
source=(&quot;tiki-${pkgver}.tar.gz::https://sourceforge.net/projects/tikiwiki/files/Tiki_${_relcodename}/${pkgver}/tiki-${pkgver}.tar.gz/download&quot;<br />
&quot;apache.example.conf&quot;<br />
&quot;setup-6460.diff&quot;)<br />
options=('emptydirs' '!strip')<br />
install=&quot;${pkgname}.install&quot;<br />
md5sums=('a40161bae2d4da33658d6d52235cb8aa'<br />
'f761900ca84055a145a68ad10551aced'<br />
'9b58ddd811948cc059863101790454d9')<br />
sha1sums=('5dff1f418f9d982232187d6364d0a34ecfbd34a8'<br />
'db56b4e1960f16a595a6b309a77d0fee46b48bf0'<br />
'98052a54f98c6bfe4a651c71c5860190a47d0483')<br />
<br />
package() {<br />
# Copy the main package files into place.<br />
mkdir --parents &quot;${pkgdir}/usr/share/webapps/&quot;<br />
cp --archive --force &quot;${srcdir}/tiki-${pkgver}&quot; &quot;${pkgdir}/usr/share/webapps/tikiwiki&quot;<br />
<br />
# Install the Apache example configuration.<br />
install -D --mode=&quot;644&quot; --target-directory=&quot;${pkgdir}/etc/webapps/tikiwiki/&quot; &quot;${srcdir}/apache.example.conf&quot;<br />
<br />
# Ready the setup script for use.<br />
chmod a+rx,u+w &quot;${pkgdir}/usr/share/webapps/tikiwiki/setup.sh&quot;<br />
patch &quot;${pkgdir}/usr/share/webapps/tikiwiki/setup.sh&quot; &quot;${srcdir}/setup-6460.diff&quot; # (workaround for 'https://dev.tiki.org/item6460')<br />
<br />
# Run the setup script.<br />
cd &quot;${pkgdir}/usr/share/webapps/tikiwiki/&quot;<br />
if [ -e &quot;/usr/bin/php&quot; ]; then<br />
./setup.sh -u root -g root -n fix<br />
elif [ -e &quot;/usr/bin/php71&quot; ]; then<br />
./setup.sh -u root -g root -p php71 -n fix<br />
elif [ -e &quot;/usr/bin/php70&quot; ]; then<br />
./setup.sh -u root -g root -p php70 -n fix<br />
elif [ -e &quot;/usr/bin/php56&quot; ]; then<br />
./setup.sh -u root -g root -p php56 -n fix<br />
else<br />
echo &quot;:: WARNING: Setup script not run as no supported PHP binary could be found.&quot;<br />
fi<br />
}<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|apache.example.conf|2=&lt;nowiki&gt;<br />
&lt;IfModule mod_alias.c&gt;<br />
Alias /tiki /usr/share/webapps/tikiwiki/<br />
&lt;/IfModule&gt;<br />
<br />
&lt;Directory /usr/share/webapps/tikiwiki/&gt;<br />
Options FollowSymlinks<br />
AllowOverride all<br />
Require all granted<br />
php_admin_value open_basedir &quot;/srv/http/:/dev/urandom:/tmp/:/usr/share/pear/:/usr/share/webapps/tikiwiki/:/etc/webapps/tikiwiki/&quot;<br />
&lt;/Directory&gt;<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|setup-6460.diff|2=&lt;nowiki&gt;<br />
--- setup.sh<br />
+++ setup.sh<br />
@@ -539,10 +539,10 @@<br />
then<br />
if exists curl;<br />
then<br />
- curl -s https://getcomposer.org/installer | php -- --install-dir=temp<br />
+ curl -s https://getcomposer.org/installer | &quot;${PHPCLI}&quot; -- --install-dir=temp<br />
else<br />
# todo : if exists php;<br />
- php -r &quot;eval('?&gt;'.file_get_contents('https://getcomposer.org/installer'));&quot; -- --install-dir=temp<br />
+ &quot;${PHPCLI}&quot; -r &quot;eval('?&gt;'.file_get_contents('https://getcomposer.org/installer'));&quot; -- --install-dir=temp<br />
fi<br />
# if PATCHCOMPOSERFLAG then modify temp/composer.phar to avoid the warnings<br />
# this hack is not yet possible because of a self signature check in temp/composer.phar<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|tikiwiki.install|2=&lt;nowiki&gt;<br />
post_install() {<br />
<br />
echo &quot;:: Be aware that if using Tiki Wiki CMS Groupware on PHP 7.1, there are a few&quot;<br />
echo &quot; minor known issues (see 'https://doc.tiki.org/Requirements'). If these impact&quot;<br />
echo &quot; you, consider downgrading to PHP 7.0.&quot;<br />
echo &quot; &quot;<br />
echo &quot;:: To complete the setup of Tiki Wiki CMS Groupware, you need to follow the&quot;<br />
echo &quot; instructions at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Configuration'&quot;<br />
<br />
}<br />
<br />
pre_upgrade() {<br />
<br />
echo &quot;:: Prior to upgrading Tiki Wiki CMS Groupware, you may wish to consider the&quot;<br />
echo &quot; actions listed at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Before_upgrading'&quot;<br />
<br />
# Clear out Tiki caches -- cached files may interfere with the upgrade process.<br />
rm --force --recursive /usr/share/webapps/tikiwiki/modules/cache/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/cache/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/public/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/templates_c/*<br />
<br />
}<br />
<br />
post_upgrade() {<br />
<br />
# Remove lock file -- allows Tiki installer to be used.<br />
rm --force /usr/share/webapps/tikiwiki/db/lock<br />
<br />
echo &quot;:: To complete the upgrade of Tiki Wiki CMS Groupware, you need to follow the&quot;<br />
echo &quot; instructions at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#After_upgrading'&quot;<br />
<br />
}<br />
<br />
post_remove() {<br />
<br />
echo &quot;:: If you're removing Tiki Wiki CMS Groupware for good, remember to:&quot;<br />
echo &quot; (1) Remove Tiki's database (and database user, if applicable).&quot;<br />
echo &quot; (2) Remove any residual files under /usr/share/webapps/tikiwiki/.&quot;<br />
<br />
}<br />
&lt;/nowiki&gt;}}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492527User:Aexoxea/Tiki Wiki CMS Groupware2017-10-07T13:45:04Z<p>Aexoxea: /* Configure Tiki */ Major refactoring, part two.</p>
<hr />
<div>{{warning|This is a work in progress, does not currently reflect packaging best practice and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Install Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make and install a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) mostly works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once installed, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, install Apache.<br />
<br />
{{note|Tiki won't be accessible yet, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to install {{pkg|apache}} and {{pkg|php-apache}}.<br />
<br />
After install, you need to:<br />
<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented (has a leading '{{ic|#}}'), uncomment it).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other ====<br />
<br />
Consult the relevant ArchWiki page (or other documentation) to:<br />
<br />
* Install your web server.<br />
* Configure your web server to run PHP.<br />
* Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
* Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or MySQL, so you need to install '''one''' of {{pkg|mariadb}} or {{aur|mysql}}. It's recommended to install MariaDB unless you have a specific need for something else.<br />
<br />
Once installed, you need to set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Uncomment (remove the leading '{{ic|;}}') and set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Uncomment and set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Uncomment (i.e. enable) the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Uncomment the {{ic|zip.so}} extension. If your PHP install is new, this should already be uncommented.<br />
* Uncomment the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
See Tiki's [https://doc.tiki.org/Installation Installation] and [https://doc.tiki.org/Linux Linux] pages for specific information.<br />
<br />
=== Set up Tiki's files ===<br />
<br />
Tiki ships with a setup script ({{ic|setup.sh}}) that both fixes its file permissions and downloads any extra items needed using Composer (if these weren't captured when the package was made).<br />
<br />
If you're using the version of PHP that ships in the main repositories, you need to run this from the command line:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} options change the user and group of Tiki's files, with {{ic|http:http}} being the default user and group most web servers run as. Of course, change these values if you're using something else.<br />
<br />
If you're using a version of PHP from the AUR, you need to add the {{ic|-p}} option with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See [[#Permission check|permission check]] below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Run Tiki's install workflow ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address and path if needed.<br />
<br />
For new installs, a web-based workflow will appear to perform the final configuration steps (including setting up the database). Run through this workflow; when complete, you can start using Tiki normally.<br />
<br />
For updates, you'll first be prompted to enter the username and password for Tiki's database user account. When the web-based workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the database. Run through the workflow steps from there; when complete, you will be taken to your closed (but upgraded) Tiki site.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before continuing if you need to!}}<br />
<br />
== Upgrades ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before upgrading ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''If using a custom theme, revert to a built-in theme.''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== The upgrade itself ===<br />
<br />
First, make and install the updated package.<br />
<br />
''[Editor's Note: Need to confirm if setup.sh has to be run at this point.]''<br />
<br />
Second, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed. As a security measure, you will be prompted to enter the username and password for Tiki's database user account.<br />
<br />
When the install workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the existing database. Complete the upgrade, follow the last steps to complete the workflow, and you should then be taken to your closed (but upgraded) Tiki site.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before following the upgrade link if you need to!}}<br />
<br />
=== After upgrading ===<br />
<br />
Log in to your closed site, check that everything is as it should be, and when you're ready, re-open the site. Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under the &quot;[https://doc.tiki.org/New-in-version new in version]&quot; page in Tiki's online documentation.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel (or other relevant methods) as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or whichever PHP configuration file they're disabled in) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}}, enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or compatible equivalent from AUR).<br />
# Enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent, if using an AUR PHP version).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
When running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492523User:Aexoxea/Tiki Wiki CMS Groupware2017-10-07T13:19:31Z<p>Aexoxea: /* Set up PHP */ Adjusted for consistency.</p>
<hr />
<div>{{warning|This is a work in progress, does not currently reflect packaging best practice and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Install Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make and install a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) mostly works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once installed, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, install Apache.<br />
<br />
{{note|Tiki won't be accessible yet, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to install {{pkg|apache}} and {{pkg|php-apache}}.<br />
<br />
After install, you need to:<br />
<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented (has a leading '{{ic|#}}'), uncomment it).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other ====<br />
<br />
Consult the relevant ArchWiki page (or other documentation) to:<br />
<br />
* Install your web server.<br />
* Configure your web server to run PHP.<br />
* Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
* Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or MySQL, so you need to install '''one''' of {{pkg|mariadb}} or {{aur|mysql}}. It's recommended to install MariaDB unless you have a specific need for something else.<br />
<br />
Once installed, you need to set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} (or equivalent) and, at a minimum:<br />
<br />
* Uncomment (remove the leading '{{ic|;}}') and set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Uncomment and set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Uncomment (i.e. enable) the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Uncomment the {{ic|zip.so}} extension. If your PHP install is new, this should already be uncommented.<br />
* Uncomment the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or equivalent) it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
=== Tiki Files ===<br />
<br />
Fourth, you need to run Tiki's setup script; this will fix permissions on files and download any extra items needed using Composer that weren't captured at build time. To do this with the version of PHP from the main repositories:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} directives set the user and group of files to {{ic|http:http}} in the above; if your web server is running under a different username and/or group, alter these values as appropriate.<br />
<br />
If you're using a version of PHP from AUR, you need to add the {{ic|-p}} directive with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See the [[#Permission check|permission check]] section below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Tiki Application ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed.<br />
<br />
This will bring up a workflow to perform the final configuration steps (including setting up the database). Once finished, you should be able to start using Tiki normally.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Upgrades ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before upgrading ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''If using a custom theme, revert to a built-in theme.''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== The upgrade itself ===<br />
<br />
First, make and install the updated package.<br />
<br />
''[Editor's Note: Need to confirm if setup.sh has to be run at this point.]''<br />
<br />
Second, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed. As a security measure, you will be prompted to enter the username and password for Tiki's database user account.<br />
<br />
When the install workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the existing database. Complete the upgrade, follow the last steps to complete the workflow, and you should then be taken to your closed (but upgraded) Tiki site.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before following the upgrade link if you need to!}}<br />
<br />
=== After upgrading ===<br />
<br />
Log in to your closed site, check that everything is as it should be, and when you're ready, re-open the site. Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under the &quot;[https://doc.tiki.org/New-in-version new in version]&quot; page in Tiki's online documentation.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel (or other relevant methods) as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or whichever PHP configuration file they're disabled in) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}}, enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or compatible equivalent from AUR).<br />
# Enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent, if using an AUR PHP version).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
When running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492521User:Aexoxea/Tiki Wiki CMS Groupware2017-10-07T12:57:41Z<p>Aexoxea: /* Installation */ Major refactoring, part one.</p>
<hr />
<div>{{warning|This is a work in progress, does not currently reflect packaging best practice and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Install Tiki ==<br />
<br />
Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You need to choose from one of the following, then make and install a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|As at October 2017, the Tiki stable series (17.x) mostly works with PHP v7.1 (which is shipped in the main repositories), though there there are some minor known issues as documented on Tiki's [https://doc.tiki.org/Requirements Requirements] page. If these affect you, you can downgrade to PHP v7.0 using the {{aur|php70}} AUR package.}}<br />
<br />
Once installed, continue with [[#Install and set up prerequisites|Install and set up prerequisites]] below.<br />
<br />
== Install and set up prerequisites ==<br />
<br />
Tiki relies on a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific prerequisites.<br />
<br />
=== Set up a web server ===<br />
<br />
You need a [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, install Apache.<br />
<br />
{{note|Tiki won't be accessible yet, as file permissions need to be fixed; this will happen later.}}<br />
<br />
==== Apache ====<br />
<br />
To use Tiki on [[Apache]], you need to install {{pkg|apache}} and {{pkg|php-apache}}.<br />
<br />
After install, you need to:<br />
<br />
# Configure Apache to use PHP per the instructions at [[Apache HTTP Server#PHP]].<br />
# Copy {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Edit {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented (has a leading '{{ic|#}}'), uncomment it).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
# Start the Apache service (e.g. {{ic|httpd.service}} using [[Systemd]]).<br />
<br />
==== Other ====<br />
<br />
Consult the relevant ArchWiki page (or other documentation) to:<br />
<br />
* Install your web server.<br />
* Configure your web server to run PHP.<br />
* Configure your web server with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options.<br />
* Start your web server.<br />
<br />
=== Set up a database server ===<br />
<br />
Tiki supports either MariaDB or MySQL, so you need to install '''one''' of {{pkg|mariadb}} or {{aur|mysql}}. It's recommended to install MariaDB unless you have a specific need for something else.<br />
<br />
Once installed, you need to set up and start the database server per the instructions at [[MySQL#Installation]].<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down for later: <br />
<br />
* The database server host name (if not on localhost),<br />
* The username and password of a database user account (e.g. {{ic|root}}) with access to create new databases and new user accounts.<br />
<br />
If you want or need to create these manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== Set up PHP ===<br />
<br />
[[PHP]] should have been pulled in as a dependency when Tiki was installed earlier.<br />
<br />
You need to edit {{ic|/etc/php/php.ini}} and, at a minimum:<br />
<br />
* Uncomment (remove the leading '{{ic|;}}') and set the default timezone ({{ic|1=date.timezone=}}, see [https://secure.php.net/manual/en/timezones.php PHP's List of Supported Timezones] for valid options).<br />
* Uncomment and set the session data path ({{ic|1=session.save_path=}}, the default {{ic|&quot;/tmp&quot;}} works as a starting point).<br />
* Uncomment (i.e. enable) the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry).<br />
<br />
It is also recommended to:<br />
<br />
* Uncomment the {{ic|zip.so}} extension. If your PHP install is new, this should already be uncommented.<br />
* Uncomment the {{ic|gd.so}} extension, then install the {{pkg|php-gd}} package (or older equivalent from AUR) it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Next steps ===<br />
<br />
Once the prerequisites are set up, continue with [[#Configure Tiki|Configure Tiki]] below.<br />
<br />
== Configure Tiki ==<br />
<br />
=== Tiki Files ===<br />
<br />
Fourth, you need to run Tiki's setup script; this will fix permissions on files and download any extra items needed using Composer that weren't captured at build time. To do this with the version of PHP from the main repositories:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} directives set the user and group of files to {{ic|http:http}} in the above; if your web server is running under a different username and/or group, alter these values as appropriate.<br />
<br />
If you're using a version of PHP from AUR, you need to add the {{ic|-p}} directive with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See the [[#Permission check|permission check]] section below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Tiki Application ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed.<br />
<br />
This will bring up a workflow to perform the final configuration steps (including setting up the database). Once finished, you should be able to start using Tiki normally.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Upgrades ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before upgrading ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''If using a custom theme, revert to a built-in theme.''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== The upgrade itself ===<br />
<br />
First, make and install the updated package.<br />
<br />
''[Editor's Note: Need to confirm if setup.sh has to be run at this point.]''<br />
<br />
Second, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed. As a security measure, you will be prompted to enter the username and password for Tiki's database user account.<br />
<br />
When the install workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the existing database. Complete the upgrade, follow the last steps to complete the workflow, and you should then be taken to your closed (but upgraded) Tiki site.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before following the upgrade link if you need to!}}<br />
<br />
=== After upgrading ===<br />
<br />
Log in to your closed site, check that everything is as it should be, and when you're ready, re-open the site. Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under the &quot;[https://doc.tiki.org/New-in-version new in version]&quot; page in Tiki's online documentation.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel (or other relevant methods) as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or whichever PHP configuration file they're disabled in) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}}, enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or compatible equivalent from AUR).<br />
# Enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent, if using an AUR PHP version).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
When running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User_talk:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492461User talk:Aexoxea/Tiki Wiki CMS Groupware2017-10-06T15:55:43Z<p>Aexoxea: /* To Do */ Updated.</p>
<hr />
<div>== To Do ==<br />
<br />
The following needs to happen before this can go into main space (if it ever does):<br />
<br />
* &lt;s&gt;''(Added 23-Sep-2017)'' Consider adding a {{ic|tikiwiki-lts-lag}} package as well, that would avoid the first few LTS point releases.&lt;/s&gt; ''(Abandoned for now)''<br />
* &lt;s&gt;''(Added 27-Sep-2017)'' Need to test building the packages in a fresh Arch, so that any missing makedepends can be found.&lt;/s&gt; ''(Done 28-Sep-2017)''<br />
* &lt;s&gt;Need to go through at least one minor '''and''' one major upgrade to Tiki, since there are very likely caveats and possibly updates needed to the {{ic|.install}} files as well.&lt;/s&gt; ''(Done 02-Oct-2017)''<br />
* &lt;s&gt;Need to do a first setup in a fresh Arch, so that any missing prerequisites can be found.&lt;/s&gt; ''(Done 27-Sep-2017)''<br />
* Need to update the packages to reflect best package practice (e.g. should install to {{ic|/usr/share/webapps/}} with a redirect file, not {{ic|/srv/http/}}). ''(In progress 04-Oct-2017)''<br />
* &lt;s&gt;''(Added 05-Oct-2017)'' Need to look at Permission Check details (relates to setup.sh).&lt;/s&gt; ''(Done 06-Oct-2017)''<br />
* Need to run it in this configuration for &quot;awhile&quot; to see if anything strange comes up.<br />
* Need to put the packages on [[AUR]] (requires [a] learning [[Git]] and [b] a commitment to keep them updated there).<br />
<br />
This list will be updated (and added to) as appropriate. [[User:Aexoxea|aexoxea]] ([[User_talk:Aexoxea|talk]]) 03:37, 10 September 2017 (UTC)</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492460User:Aexoxea/Tiki Wiki CMS Groupware2017-10-06T15:54:19Z<p>Aexoxea: /* Tiki Files */ Expand slightly.</p>
<hr />
<div>{{warning|This is a work in progress, does not currently reflect packaging best practice and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Installation ==<br />
<br />
First, you will need to separately install:<br />
<br />
* A [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, install {{pkg|apache}} and {{pkg|php-apache}}.<br />
* Either {{pkg|mariadb}} or {{aur|mysql}} for a database server. It's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Second, Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You must choose from one of the following, then make and install a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|The latest stable series (17.x) will mostly work with PHP 7.1, but there are some known minor issues (see Tiki's [https://doc.tiki.org/Requirements Requirements] page). If these impact you, you can downgrade to PHP 7.0 by using this AUR package: {{aur|php70}}.}}<br />
<br />
Once everything is installed, proceed with [[#Configuration|Configuration]] below.<br />
<br />
== Configuration ==<br />
<br />
Tiki uses a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack configuration. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific details.<br />
<br />
=== Web server ===<br />
<br />
First, the web server needs to be set up and configured to run PHP. As there is a choice of web servers, you will need to consult the relevant ArchWiki page (e.g. [[Apache]]) or other documentation for how to do this.<br />
<br />
The web server then needs to be configured with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options. If you're using Apache, you can get up and running quickly by just:<br />
<br />
# Copying {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Editing {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented (has a leading '{{ic|#}}'), uncomment it).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
<br />
If you're not using Apache, the {{ic|/etc/webapps/tikiwiki/apache.example.conf}} should give an indication of what options you need to set for your web server.<br />
<br />
Once you're ready, start the web server.<br />
<br />
{{note|Tiki won't be accessible yet, as permissions need to be fixed; this will happen at a later step.}}<br />
<br />
=== Database server ===<br />
<br />
Second, the database server -- either [[MariaDB]] or [[MySQL]] -- needs to be set up and started.<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down the database server host name (if not on localhost), along with the username and password of a database user with access to create new databases and new users for later.<br />
<br />
If you want or need to create the database and/or user manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== PHP ===<br />
<br />
Third, [[PHP]] needs to be set up, then some edits need to be made to {{ic|/etc/php/php.ini}}. At a minimum, you need to uncomment (remove the leading '{{ic|;}}') and:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}).<br />
* Set the session data path ({{ic|1=session.save_path=}}, using the default {{ic|&quot;/tmp&quot;}} should work as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry, just uncomment it to enable).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. This is enabled by default in new PHP installs.<br />
* Enable the {{ic|gd.so}} extension, and install the {{pkg|php-gd}} package (or compatible equivalent from AUR) it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Tiki Files ===<br />
<br />
Fourth, you need to run Tiki's setup script; this will fix permissions on files and download any extra items needed using Composer that weren't captured at build time. To do this with the version of PHP from the main repositories:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} directives set the user and group of files to {{ic|http:http}} in the above; if your web server is running under a different username and/or group, alter these values as appropriate.<br />
<br />
If you're using a version of PHP from AUR, you need to add the {{ic|-p}} directive with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See the [[#Permission check|permission check]] section below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Tiki Application ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed.<br />
<br />
This will bring up a workflow to perform the final configuration steps (including setting up the database). Once finished, you should be able to start using Tiki normally.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Upgrades ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before upgrading ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''If using a custom theme, revert to a built-in theme.''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== The upgrade itself ===<br />
<br />
First, make and install the updated package.<br />
<br />
''[Editor's Note: Need to confirm if setup.sh has to be run at this point.]''<br />
<br />
Second, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed. As a security measure, you will be prompted to enter the username and password for Tiki's database user account.<br />
<br />
When the install workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the existing database. Complete the upgrade, follow the last steps to complete the workflow, and you should then be taken to your closed (but upgraded) Tiki site.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before following the upgrade link if you need to!}}<br />
<br />
=== After upgrading ===<br />
<br />
Log in to your closed site, check that everything is as it should be, and when you're ready, re-open the site. Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under the &quot;[https://doc.tiki.org/New-in-version new in version]&quot; page in Tiki's online documentation.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel (or other relevant methods) as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or whichever PHP configuration file they're disabled in) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}}, enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or compatible equivalent from AUR).<br />
# Enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent, if using an AUR PHP version).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
When running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492459User:Aexoxea/Tiki Wiki CMS Groupware2017-10-06T15:51:55Z<p>Aexoxea: /* Tiki Files */ Tipped about the permission check section.</p>
<hr />
<div>{{warning|This is a work in progress, does not currently reflect packaging best practice and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Installation ==<br />
<br />
First, you will need to separately install:<br />
<br />
* A [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, install {{pkg|apache}} and {{pkg|php-apache}}.<br />
* Either {{pkg|mariadb}} or {{aur|mysql}} for a database server. It's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Second, Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You must choose from one of the following, then make and install a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|The latest stable series (17.x) will mostly work with PHP 7.1, but there are some known minor issues (see Tiki's [https://doc.tiki.org/Requirements Requirements] page). If these impact you, you can downgrade to PHP 7.0 by using this AUR package: {{aur|php70}}.}}<br />
<br />
Once everything is installed, proceed with [[#Configuration|Configuration]] below.<br />
<br />
== Configuration ==<br />
<br />
Tiki uses a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack configuration. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific details.<br />
<br />
=== Web server ===<br />
<br />
First, the web server needs to be set up and configured to run PHP. As there is a choice of web servers, you will need to consult the relevant ArchWiki page (e.g. [[Apache]]) or other documentation for how to do this.<br />
<br />
The web server then needs to be configured with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options. If you're using Apache, you can get up and running quickly by just:<br />
<br />
# Copying {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Editing {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented (has a leading '{{ic|#}}'), uncomment it).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
<br />
If you're not using Apache, the {{ic|/etc/webapps/tikiwiki/apache.example.conf}} should give an indication of what options you need to set for your web server.<br />
<br />
Once you're ready, start the web server.<br />
<br />
{{note|Tiki won't be accessible yet, as permissions need to be fixed; this will happen at a later step.}}<br />
<br />
=== Database server ===<br />
<br />
Second, the database server -- either [[MariaDB]] or [[MySQL]] -- needs to be set up and started.<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down the database server host name (if not on localhost), along with the username and password of a database user with access to create new databases and new users for later.<br />
<br />
If you want or need to create the database and/or user manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== PHP ===<br />
<br />
Third, [[PHP]] needs to be set up, then some edits need to be made to {{ic|/etc/php/php.ini}}. At a minimum, you need to uncomment (remove the leading '{{ic|;}}') and:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}).<br />
* Set the session data path ({{ic|1=session.save_path=}}, using the default {{ic|&quot;/tmp&quot;}} should work as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry, just uncomment it to enable).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. This is enabled by default in new PHP installs.<br />
* Enable the {{ic|gd.so}} extension, and install the {{pkg|php-gd}} package (or compatible equivalent from AUR) it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Tiki Files ===<br />
<br />
Fourth, you need to run Tiki's setup script; this will fix permissions on files and download any extra items needed using Composer. To do this with the version of PHP from the main repositories:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} directives set the user and group of files to {{ic|http:http}} in the above; if your web server is running under a different username and/or group, alter these values as appropriate.<br />
<br />
If you're using a version of PHP from AUR, you need to add the {{ic|-p}} directive with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
{{tip|See the [[#Permission check|permission check]] section below for more options around {{ic|setup.sh}}.}}<br />
<br />
=== Tiki Application ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed.<br />
<br />
This will bring up a workflow to perform the final configuration steps (including setting up the database). Once finished, you should be able to start using Tiki normally.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Upgrades ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before upgrading ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''If using a custom theme, revert to a built-in theme.''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== The upgrade itself ===<br />
<br />
First, make and install the updated package.<br />
<br />
''[Editor's Note: Need to confirm if setup.sh has to be run at this point.]''<br />
<br />
Second, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed. As a security measure, you will be prompted to enter the username and password for Tiki's database user account.<br />
<br />
When the install workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the existing database. Complete the upgrade, follow the last steps to complete the workflow, and you should then be taken to your closed (but upgraded) Tiki site.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before following the upgrade link if you need to!}}<br />
<br />
=== After upgrading ===<br />
<br />
Log in to your closed site, check that everything is as it should be, and when you're ready, re-open the site. Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under the &quot;[https://doc.tiki.org/New-in-version new in version]&quot; page in Tiki's online documentation.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel (or other relevant methods) as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or whichever PHP configuration file they're disabled in) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}}, enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or compatible equivalent from AUR).<br />
# Enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent, if using an AUR PHP version).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
When running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492458User:Aexoxea/Tiki Wiki CMS Groupware2017-10-06T15:50:37Z<p>Aexoxea: /* Permission check */ Noted about classic commands and user/group assignment changes.</p>
<hr />
<div>{{warning|This is a work in progress, does not currently reflect packaging best practice and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Installation ==<br />
<br />
First, you will need to separately install:<br />
<br />
* A [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, install {{pkg|apache}} and {{pkg|php-apache}}.<br />
* Either {{pkg|mariadb}} or {{aur|mysql}} for a database server. It's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Second, Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You must choose from one of the following, then make and install a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|The latest stable series (17.x) will mostly work with PHP 7.1, but there are some known minor issues (see Tiki's [https://doc.tiki.org/Requirements Requirements] page). If these impact you, you can downgrade to PHP 7.0 by using this AUR package: {{aur|php70}}.}}<br />
<br />
Once everything is installed, proceed with [[#Configuration|Configuration]] below.<br />
<br />
== Configuration ==<br />
<br />
Tiki uses a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack configuration. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific details.<br />
<br />
=== Web server ===<br />
<br />
First, the web server needs to be set up and configured to run PHP. As there is a choice of web servers, you will need to consult the relevant ArchWiki page (e.g. [[Apache]]) or other documentation for how to do this.<br />
<br />
The web server then needs to be configured with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options. If you're using Apache, you can get up and running quickly by just:<br />
<br />
# Copying {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Editing {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented (has a leading '{{ic|#}}'), uncomment it).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
<br />
If you're not using Apache, the {{ic|/etc/webapps/tikiwiki/apache.example.conf}} should give an indication of what options you need to set for your web server.<br />
<br />
Once you're ready, start the web server.<br />
<br />
{{note|Tiki won't be accessible yet, as permissions need to be fixed; this will happen at a later step.}}<br />
<br />
=== Database server ===<br />
<br />
Second, the database server -- either [[MariaDB]] or [[MySQL]] -- needs to be set up and started.<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down the database server host name (if not on localhost), along with the username and password of a database user with access to create new databases and new users for later.<br />
<br />
If you want or need to create the database and/or user manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== PHP ===<br />
<br />
Third, [[PHP]] needs to be set up, then some edits need to be made to {{ic|/etc/php/php.ini}}. At a minimum, you need to uncomment (remove the leading '{{ic|;}}') and:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}).<br />
* Set the session data path ({{ic|1=session.save_path=}}, using the default {{ic|&quot;/tmp&quot;}} should work as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry, just uncomment it to enable).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. This is enabled by default in new PHP installs.<br />
* Enable the {{ic|gd.so}} extension, and install the {{pkg|php-gd}} package (or compatible equivalent from AUR) it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Tiki Files ===<br />
<br />
Fourth, you need to run Tiki's setup script; this will fix permissions on files and download any extra items needed using Composer. To do this with the version of PHP from the main repositories:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} directives set the user and group of files to {{ic|http:http}} in the above; if your web server is running under a different username and/or group, alter these values as appropriate.<br />
<br />
If you're using a version of PHP from AUR, you need to add the {{ic|-p}} directive with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
=== Tiki Application ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed.<br />
<br />
This will bring up a workflow to perform the final configuration steps (including setting up the database). Once finished, you should be able to start using Tiki normally.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Upgrades ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before upgrading ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''If using a custom theme, revert to a built-in theme.''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== The upgrade itself ===<br />
<br />
First, make and install the updated package.<br />
<br />
''[Editor's Note: Need to confirm if setup.sh has to be run at this point.]''<br />
<br />
Second, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed. As a security measure, you will be prompted to enter the username and password for Tiki's database user account.<br />
<br />
When the install workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the existing database. Complete the upgrade, follow the last steps to complete the workflow, and you should then be taken to your closed (but upgraded) Tiki site.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before following the upgrade link if you need to!}}<br />
<br />
=== After upgrading ===<br />
<br />
Log in to your closed site, check that everything is as it should be, and when you're ready, re-open the site. Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under the &quot;[https://doc.tiki.org/New-in-version new in version]&quot; page in Tiki's online documentation.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel (or other relevant methods) as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
{{note|Only the 'classic' commands will change user and group assignments of the files, or ask for this information interactively.}}<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or whichever PHP configuration file they're disabled in) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}}, enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or compatible equivalent from AUR).<br />
# Enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent, if using an AUR PHP version).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
When running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492456User:Aexoxea/Tiki Wiki CMS Groupware2017-10-06T15:31:23Z<p>Aexoxea: Note versions in use.</p>
<hr />
<div>{{warning|This is a work in progress, does not currently reflect packaging best practice and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Installation ==<br />
<br />
First, you will need to separately install:<br />
<br />
* A [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, install {{pkg|apache}} and {{pkg|php-apache}}.<br />
* Either {{pkg|mariadb}} or {{aur|mysql}} for a database server. It's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Second, Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You must choose from one of the following, then make and install a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|The latest stable series (17.x) will mostly work with PHP 7.1, but there are some known minor issues (see Tiki's [https://doc.tiki.org/Requirements Requirements] page). If these impact you, you can downgrade to PHP 7.0 by using this AUR package: {{aur|php70}}.}}<br />
<br />
Once everything is installed, proceed with [[#Configuration|Configuration]] below.<br />
<br />
== Configuration ==<br />
<br />
Tiki uses a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack configuration. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific details.<br />
<br />
=== Web server ===<br />
<br />
First, the web server needs to be set up and configured to run PHP. As there is a choice of web servers, you will need to consult the relevant ArchWiki page (e.g. [[Apache]]) or other documentation for how to do this.<br />
<br />
The web server then needs to be configured with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options. If you're using Apache, you can get up and running quickly by just:<br />
<br />
# Copying {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Editing {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented (has a leading '{{ic|#}}'), uncomment it).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
<br />
If you're not using Apache, the {{ic|/etc/webapps/tikiwiki/apache.example.conf}} should give an indication of what options you need to set for your web server.<br />
<br />
Once you're ready, start the web server.<br />
<br />
{{note|Tiki won't be accessible yet, as permissions need to be fixed; this will happen at a later step.}}<br />
<br />
=== Database server ===<br />
<br />
Second, the database server -- either [[MariaDB]] or [[MySQL]] -- needs to be set up and started.<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down the database server host name (if not on localhost), along with the username and password of a database user with access to create new databases and new users for later.<br />
<br />
If you want or need to create the database and/or user manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== PHP ===<br />
<br />
Third, [[PHP]] needs to be set up, then some edits need to be made to {{ic|/etc/php/php.ini}}. At a minimum, you need to uncomment (remove the leading '{{ic|;}}') and:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}).<br />
* Set the session data path ({{ic|1=session.save_path=}}, using the default {{ic|&quot;/tmp&quot;}} should work as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry, just uncomment it to enable).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. This is enabled by default in new PHP installs.<br />
* Enable the {{ic|gd.so}} extension, and install the {{pkg|php-gd}} package (or compatible equivalent from AUR) it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Tiki Files ===<br />
<br />
Fourth, you need to run Tiki's setup script; this will fix permissions on files and download any extra items needed using Composer. To do this with the version of PHP from the main repositories:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} directives set the user and group of files to {{ic|http:http}} in the above; if your web server is running under a different username and/or group, alter these values as appropriate.<br />
<br />
If you're using a version of PHP from AUR, you need to add the {{ic|-p}} directive with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
=== Tiki Application ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed.<br />
<br />
This will bring up a workflow to perform the final configuration steps (including setting up the database). Once finished, you should be able to start using Tiki normally.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Upgrades ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before upgrading ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''If using a custom theme, revert to a built-in theme.''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== The upgrade itself ===<br />
<br />
First, make and install the updated package.<br />
<br />
''[Editor's Note: Need to confirm if setup.sh has to be run at this point.]''<br />
<br />
Second, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed. As a security measure, you will be prompted to enter the username and password for Tiki's database user account.<br />
<br />
When the install workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the existing database. Complete the upgrade, follow the last steps to complete the workflow, and you should then be taken to your closed (but upgraded) Tiki site.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before following the upgrade link if you need to!}}<br />
<br />
=== After upgrading ===<br />
<br />
Log in to your closed site, check that everything is as it should be, and when you're ready, re-open the site. Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under the &quot;[https://doc.tiki.org/New-in-version new in version]&quot; page in Tiki's online documentation.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel (or other relevant methods) as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or whichever PHP configuration file they're disabled in) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}}, enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}} (or compatible equivalent from AUR).<br />
# Enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} (or equivalent, if using an AUR PHP version).<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
When running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware/Files_Stable&diff=492455User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable2017-10-06T15:28:40Z<p>Aexoxea: Reintroduce the setup script.</p>
<hr />
<div>These files can be used to build and install the latest stable release of [[User:Aexoxea/Tiki Wiki CMS Groupware|Tiki Wiki CMS Groupware]].<br />
<br />
{{note|This page exists in lieu of a package in AUR for now. I still consider these files to be experimental, they don't yet follow good packaging practice, and I can't yet commit to keeping them updated in the AUR.}}<br />
<br />
{{hc|PKGBUILD|2=&lt;nowiki&gt;<br />
pkgname=tikiwiki<br />
pkgver=17.1<br />
pkgrel=1<br />
_relcodename=&quot;17.x_Zeta_Bootis&quot;<br />
_minphpver=&quot;5.6&quot;<br />
_maxphpver=&quot;7.2&quot;<br />
pkgdesc=&quot;Tiki Wiki CMS Groupware, normal version.&quot;<br />
arch=('any')<br />
url=&quot;https://tiki.org/&quot;<br />
license=('LGPL2.1')<br />
depends=(&quot;php-intl&gt;=${_minphpver}&quot; &quot;php-intl&lt;${_maxphpver}&quot;)<br />
optdepends=(&quot;php-gd&gt;=${_minphpver}: image processing and CAPTCHAs&quot;<br />
&quot;php-gd&lt;${_maxphpver}: image processing and CAPTCHAs&quot;<br />
&quot;mariadb: supported database server&quot;<br />
&quot;mysql: supported database server&quot;)<br />
makedepends=(&quot;php-mcrypt&gt;=${_minphpver}&quot; &quot;php-mcrypt&lt;${_maxphpver}&quot;<br />
&quot;unzip&quot;)<br />
conflicts=('tikiwiki-lts' 'tikiwiki-lts-lag')<br />
source=(&quot;tiki-${pkgver}.tar.gz::https://sourceforge.net/projects/tikiwiki/files/Tiki_${_relcodename}/${pkgver}/tiki-${pkgver}.tar.gz/download&quot;<br />
&quot;apache.example.conf&quot;<br />
&quot;setup-6460.diff&quot;)<br />
options=('emptydirs' '!strip')<br />
install=&quot;${pkgname}.install&quot;<br />
md5sums=('a40161bae2d4da33658d6d52235cb8aa'<br />
'f761900ca84055a145a68ad10551aced'<br />
'9b58ddd811948cc059863101790454d9')<br />
sha1sums=('5dff1f418f9d982232187d6364d0a34ecfbd34a8'<br />
'db56b4e1960f16a595a6b309a77d0fee46b48bf0'<br />
'98052a54f98c6bfe4a651c71c5860190a47d0483')<br />
<br />
package() {<br />
# Move the main package files into place.<br />
mkdir --parents &quot;${pkgdir}/usr/share/webapps/&quot;<br />
cp --archive --force &quot;${srcdir}/tiki-${pkgver}&quot; &quot;${pkgdir}/usr/share/webapps/tikiwiki&quot;<br />
<br />
# Install the Apache example configuration.<br />
install -D --mode=&quot;644&quot; --target-directory=&quot;${pkgdir}/etc/webapps/tikiwiki/&quot; &quot;${srcdir}/apache.example.conf&quot;<br />
<br />
# Ready the setup script for use.<br />
chmod a+rx,u+w &quot;${pkgdir}/usr/share/webapps/tikiwiki/setup.sh&quot;<br />
patch &quot;${pkgdir}/usr/share/webapps/tikiwiki/setup.sh&quot; &quot;${srcdir}/setup-6460.diff&quot; # (workaround for 'https://dev.tiki.org/item6460')<br />
<br />
# Run the setup script.<br />
cd &quot;${pkgdir}/usr/share/webapps/tikiwiki/&quot;<br />
if [ -e &quot;/usr/bin/php&quot; ]; then<br />
./setup.sh -u root -g root -n fix<br />
elif [ -e &quot;/usr/bin/php71&quot; ]; then<br />
./setup.sh -u root -g root -p php71 -n fix<br />
elif [ -e &quot;/usr/bin/php70&quot; ]; then<br />
./setup.sh -u root -g root -p php70 -n fix<br />
elif [ -e &quot;/usr/bin/php56&quot; ]; then<br />
./setup.sh -u root -g root -p php56 -n fix<br />
else<br />
echo &quot;:: WARNING: Setup script not run as no supported PHP binary could be found.&quot;<br />
fi<br />
}<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|apache.example.conf|2=&lt;nowiki&gt;<br />
&lt;IfModule mod_alias.c&gt;<br />
Alias /tiki /usr/share/webapps/tikiwiki/<br />
&lt;/IfModule&gt;<br />
<br />
&lt;Directory /usr/share/webapps/tikiwiki/&gt;<br />
Options FollowSymlinks<br />
AllowOverride all<br />
Require all granted<br />
php_admin_value open_basedir &quot;/srv/http/:/dev/urandom:/tmp/:/usr/share/pear/:/usr/share/webapps/tikiwiki/:/etc/webapps/tikiwiki/&quot;<br />
&lt;/Directory&gt;<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|setup-6460.diff|2=&lt;nowiki&gt;<br />
--- setup.sh<br />
+++ setup.sh<br />
@@ -539,10 +539,10 @@<br />
then<br />
if exists curl;<br />
then<br />
- curl -s https://getcomposer.org/installer | php -- --install-dir=temp<br />
+ curl -s https://getcomposer.org/installer | &quot;${PHPCLI}&quot; -- --install-dir=temp<br />
else<br />
# todo : if exists php;<br />
- php -r &quot;eval('?&gt;'.file_get_contents('https://getcomposer.org/installer'));&quot; -- --install-dir=temp<br />
+ &quot;${PHPCLI}&quot; -r &quot;eval('?&gt;'.file_get_contents('https://getcomposer.org/installer'));&quot; -- --install-dir=temp<br />
fi<br />
# if PATCHCOMPOSERFLAG then modify temp/composer.phar to avoid the warnings<br />
# this hack is not yet possible because of a self signature check in temp/composer.phar<br />
&lt;/nowiki&gt;}}<br />
<br />
{{hc|tikiwiki.install|2=&lt;nowiki&gt;<br />
post_install() {<br />
<br />
echo &quot;:: Be aware that if using Tiki Wiki CMS Groupware on PHP 7.1, there are a few&quot;<br />
echo &quot; minor known issues (see 'https://doc.tiki.org/Requirements'). If these impact&quot;<br />
echo &quot; you, consider downgrading to PHP 7.0.&quot;<br />
echo &quot; &quot;<br />
echo &quot;:: To complete the setup of Tiki Wiki CMS Groupware, you need to follow the&quot;<br />
echo &quot; instructions at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Configuration'&quot;<br />
<br />
}<br />
<br />
pre_upgrade() {<br />
<br />
echo &quot;:: Prior to upgrading Tiki Wiki CMS Groupware, you may wish to consider the&quot;<br />
echo &quot; actions listed at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#Before_upgrading'&quot;<br />
<br />
# Clear out Tiki caches -- cached files may interfere with the upgrade process.<br />
rm --force --recursive /usr/share/webapps/tikiwiki/modules/cache/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/cache/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/public/*<br />
rm --force --recursive /usr/share/webapps/tikiwiki/temp/templates_c/*<br />
<br />
}<br />
<br />
post_upgrade() {<br />
<br />
# Remove lock file -- allows Tiki installer to be used.<br />
rm --force /usr/share/webapps/tikiwiki/db/lock<br />
<br />
echo &quot;:: To complete the upgrade of Tiki Wiki CMS Groupware, you need to follow the&quot;<br />
echo &quot; instructions at:&quot;<br />
echo &quot; 'https://wiki.archlinux.org/index.php/User:Aexoxea/Tiki_Wiki_CMS_Groupware#After_upgrading'&quot;<br />
<br />
}<br />
<br />
post_remove() {<br />
<br />
echo &quot;:: If you're removing Tiki Wiki CMS Groupware for good, remember to:&quot;<br />
echo &quot; (1) Remove Tiki's database (and database user, if applicable).&quot;<br />
echo &quot; (2) Remove any residual files under /usr/share/webapps/tikiwiki/.&quot;<br />
<br />
}<br />
&lt;/nowiki&gt;}}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492394User:Aexoxea/Tiki Wiki CMS Groupware2017-10-05T11:05:17Z<p>Aexoxea: /* Security */ Added Permission Check information.</p>
<hr />
<div>{{warning|This is a work in progress, does not currently reflect packaging best practice and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Installation ==<br />
<br />
First, you will need to separately install:<br />
<br />
* A [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, install {{pkg|apache}} and {{pkg|php-apache}}.<br />
* Either {{pkg|mariadb}} or {{aur|mysql}} for a database server. It's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Second, Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You must choose from one of the following, then make and install a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|The latest stable series (17.x) will mostly work with PHP 7.1, but there are some known minor issues (see Tiki's [https://doc.tiki.org/Requirements Requirements] page). If these impact you, you can downgrade to PHP 7.0 by using this AUR package: {{aur|php70}}.}}<br />
<br />
Once everything is installed, proceed with [[#Configuration|Configuration]] below.<br />
<br />
== Configuration ==<br />
<br />
Tiki uses a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack configuration. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific details.<br />
<br />
=== Web server ===<br />
<br />
First, the web server needs to be set up and configured to run PHP. As there is a choice of web servers, you will need to consult the relevant ArchWiki page (e.g. [[Apache]]) or other documentation for how to do this.<br />
<br />
The web server then needs to be configured with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options. If you're using Apache, you can get up and running quickly by just:<br />
<br />
# Copying {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Editing {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented (has a leading '{{ic|#}}'), uncomment it).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
<br />
If you're not using Apache, the {{ic|/etc/webapps/tikiwiki/apache.example.conf}} should give an indication of what options you need to set for your web server.<br />
<br />
Once you're ready, start the web server.<br />
<br />
{{note|Tiki won't be accessible yet, as permissions need to be fixed; this will happen at a later step.}}<br />
<br />
=== Database server ===<br />
<br />
Second, the database server -- either [[MariaDB]] or [[MySQL]] -- needs to be set up and started.<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down the database server host name (if not on localhost), along with the username and password of a database user with access to create new databases and new users for later.<br />
<br />
If you want or need to create the database and/or user manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== PHP ===<br />
<br />
Third, [[PHP]] needs to be set up, then some edits need to be made to {{ic|/etc/php/php.ini}}. At a minimum, you need to uncomment (remove the leading '{{ic|;}}') and:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}).<br />
* Set the session data path ({{ic|1=session.save_path=}}, using the default {{ic|&quot;/tmp&quot;}} should work as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry, just uncomment it to enable).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. This is enabled by default in new PHP installs.<br />
* Enable the {{ic|gd.so}} extension, and install the {{pkg|php-gd}} package it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Tiki Files ===<br />
<br />
Fourth, you need to run Tiki's setup script; this will fix permissions on files and download any extra items needed using Composer. To do this with the version of PHP from the main repositories:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} directives set the user and group of files to {{ic|http:http}} in the above; if your web server is running under a different username and/or group, alter these values as appropriate.<br />
<br />
If you're using a version of PHP from AUR, you need to add the {{ic|-p}} directive with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
=== Tiki Application ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed.<br />
<br />
This will bring up a workflow to perform the final configuration steps (including setting up the database). Once finished, you should be able to start using Tiki normally.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Upgrades ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before upgrading ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''If using a custom theme, revert to a built-in theme.''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== The upgrade itself ===<br />
<br />
First, make and install the updated package.<br />
<br />
''[Editor's Note: Need to confirm if setup.sh has to be run at this point.]''<br />
<br />
Second, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed. As a security measure, you will be prompted to enter the username and password for Tiki's database user account.<br />
<br />
When the install workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the existing database. Complete the upgrade, follow the last steps to complete the workflow, and you should then be taken to your closed (but upgraded) Tiki site.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before following the upgrade link if you need to!}}<br />
<br />
=== After upgrading ===<br />
<br />
Log in to your closed site, check that everything is as it should be, and when you're ready, re-open the site. Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under the &quot;[https://doc.tiki.org/New-in-version new in version]&quot; page in Tiki's online documentation.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel (or other relevant methods) as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. These will all be of interest for any site that is exposed to untrusted networks, devices or users.<br />
<br />
In addition to this, the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} and reloading or restarting your web server as needed.<br />
<br />
=== Permission check ===<br />
<br />
The {{ic|setup.sh}} script can be used after the initial configuration to lock down local file permissions, which can be helpful in some circumstances. The file at {{ic|/usr/share/webapps/tikiwiki/permissioncheck/usecases.txt}} shows the permission names that the script will accept, along with the numeric permission levels that are set for directories and files respectively.<br />
<br />
The script can be run interactively by just entering:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh}}<br />
<br />
Alternatively, the list of directives that the script will accept directly at invocation can be seen through the printed help information:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -h}}<br />
<br />
See Tiki's [https://doc.tiki.org/Permission+Check Permission Check] page for more information.<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or whichever PHP configuration file they're disabled in) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}}, enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}}.<br />
# Enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}}.<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
When running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492393User:Aexoxea/Tiki Wiki CMS Groupware2017-10-05T10:14:19Z<p>Aexoxea: /* Tiki Files */ Populated initial details on running the script.</p>
<hr />
<div>{{warning|This is a work in progress, does not currently reflect packaging best practice and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Installation ==<br />
<br />
First, you will need to separately install:<br />
<br />
* A [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, install {{pkg|apache}} and {{pkg|php-apache}}.<br />
* Either {{pkg|mariadb}} or {{aur|mysql}} for a database server. It's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Second, Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You must choose from one of the following, then make and install a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|The latest stable series (17.x) will mostly work with PHP 7.1, but there are some known minor issues (see Tiki's [https://doc.tiki.org/Requirements Requirements] page). If these impact you, you can downgrade to PHP 7.0 by using this AUR package: {{aur|php70}}.}}<br />
<br />
Once everything is installed, proceed with [[#Configuration|Configuration]] below.<br />
<br />
== Configuration ==<br />
<br />
Tiki uses a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack configuration. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific details.<br />
<br />
=== Web server ===<br />
<br />
First, the web server needs to be set up and configured to run PHP. As there is a choice of web servers, you will need to consult the relevant ArchWiki page (e.g. [[Apache]]) or other documentation for how to do this.<br />
<br />
The web server then needs to be configured with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options. If you're using Apache, you can get up and running quickly by just:<br />
<br />
# Copying {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Editing {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented (has a leading '{{ic|#}}'), uncomment it).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
<br />
If you're not using Apache, the {{ic|/etc/webapps/tikiwiki/apache.example.conf}} should give an indication of what options you need to set for your web server.<br />
<br />
Once you're ready, start the web server.<br />
<br />
{{note|Tiki won't be accessible yet, as permissions need to be fixed; this will happen at a later step.}}<br />
<br />
=== Database server ===<br />
<br />
Second, the database server -- either [[MariaDB]] or [[MySQL]] -- needs to be set up and started.<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down the database server host name (if not on localhost), along with the username and password of a database user with access to create new databases and new users for later.<br />
<br />
If you want or need to create the database and/or user manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== PHP ===<br />
<br />
Third, [[PHP]] needs to be set up, then some edits need to be made to {{ic|/etc/php/php.ini}}. At a minimum, you need to uncomment (remove the leading '{{ic|;}}') and:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}).<br />
* Set the session data path ({{ic|1=session.save_path=}}, using the default {{ic|&quot;/tmp&quot;}} should work as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry, just uncomment it to enable).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. This is enabled by default in new PHP installs.<br />
* Enable the {{ic|gd.so}} extension, and install the {{pkg|php-gd}} package it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Tiki Files ===<br />
<br />
Fourth, you need to run Tiki's setup script; this will fix permissions on files and download any extra items needed using Composer. To do this with the version of PHP from the main repositories:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -n fix}}<br />
<br />
The {{ic|-u}} and {{ic|-g}} directives set the user and group of files to {{ic|http:http}} in the above; if your web server is running under a different username and/or group, alter these values as appropriate.<br />
<br />
If you're using a version of PHP from AUR, you need to add the {{ic|-p}} directive with the truncated name of the binary, e.g. if using {{aur|php70}}:<br />
<br />
{{bc|# cd /usr/share/webapps/tikiwiki/<br />
# sh setup.sh -u '''http''' -g '''http''' -p '''php70''' -n fix}}<br />
<br />
=== Tiki Application ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed.<br />
<br />
This will bring up a workflow to perform the final configuration steps (including setting up the database). Once finished, you should be able to start using Tiki normally.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Upgrades ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before upgrading ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''If using a custom theme, revert to a built-in theme.''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== The upgrade itself ===<br />
<br />
First, make and install the updated package.<br />
<br />
''[Editor's Note: Need to confirm if setup.sh has to be run at this point.]''<br />
<br />
Second, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed. As a security measure, you will be prompted to enter the username and password for Tiki's database user account.<br />
<br />
When the install workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the existing database. Complete the upgrade, follow the last steps to complete the workflow, and you should then be taken to your closed (but upgraded) Tiki site.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before following the upgrade link if you need to!}}<br />
<br />
=== After upgrading ===<br />
<br />
Log in to your closed site, check that everything is as it should be, and when you're ready, re-open the site. Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under the &quot;[https://doc.tiki.org/New-in-version new in version]&quot; page in Tiki's online documentation.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel (or other relevant methods) as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. These will be of interest where the site is exposed to untrusted networks, devices or users.<br />
<br />
One item not mentioned on there is that the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} and reloading or restarting your web server as needed.<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or whichever PHP configuration file they're disabled in) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}}, enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}}.<br />
# Enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}}.<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
When running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492392User:Aexoxea/Tiki Wiki CMS Groupware2017-10-05T10:06:30Z<p>Aexoxea: /* Web server */ Firmed this up.</p>
<hr />
<div>{{warning|This is a work in progress, does not currently reflect packaging best practice and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Installation ==<br />
<br />
First, you will need to separately install:<br />
<br />
* A [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, install {{pkg|apache}} and {{pkg|php-apache}}.<br />
* Either {{pkg|mariadb}} or {{aur|mysql}} for a database server. It's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Second, Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You must choose from one of the following, then make and install a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|The latest stable series (17.x) will mostly work with PHP 7.1, but there are some known minor issues (see Tiki's [https://doc.tiki.org/Requirements Requirements] page). If these impact you, you can downgrade to PHP 7.0 by using this AUR package: {{aur|php70}}.}}<br />
<br />
Once everything is installed, proceed with [[#Configuration|Configuration]] below.<br />
<br />
== Configuration ==<br />
<br />
Tiki uses a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack configuration. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific details.<br />
<br />
=== Web server ===<br />
<br />
First, the web server needs to be set up and configured to run PHP. As there is a choice of web servers, you will need to consult the relevant ArchWiki page (e.g. [[Apache]]) or other documentation for how to do this.<br />
<br />
The web server then needs to be configured with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options. If you're using Apache, you can get up and running quickly by just:<br />
<br />
# Copying {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Editing {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented (has a leading '{{ic|#}}'), uncomment it).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
<br />
If you're not using Apache, the {{ic|/etc/webapps/tikiwiki/apache.example.conf}} should give an indication of what options you need to set for your web server.<br />
<br />
Once you're ready, start the web server.<br />
<br />
{{note|Tiki won't be accessible yet, as permissions need to be fixed; this will happen at a later step.}}<br />
<br />
=== Database server ===<br />
<br />
Second, the database server -- either [[MariaDB]] or [[MySQL]] -- needs to be set up and started.<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down the database server host name (if not on localhost), along with the username and password of a database user with access to create new databases and new users for later.<br />
<br />
If you want or need to create the database and/or user manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== PHP ===<br />
<br />
Third, [[PHP]] needs to be set up, then some edits need to be made to {{ic|/etc/php/php.ini}}. At a minimum, you need to uncomment (remove the leading '{{ic|;}}') and:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}).<br />
* Set the session data path ({{ic|1=session.save_path=}}, using the default {{ic|&quot;/tmp&quot;}} should work as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry, just uncomment it to enable).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. This is enabled by default in new PHP installs.<br />
* Enable the {{ic|gd.so}} extension, and install the {{pkg|php-gd}} package it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Tiki Files ===<br />
<br />
''[Editor's note: Need to include here '''running the script'''.]''<br />
<br />
=== Tiki Application ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed.<br />
<br />
This will bring up a workflow to perform the final configuration steps (including setting up the database). Once finished, you should be able to start using Tiki normally.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Upgrades ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before upgrading ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''If using a custom theme, revert to a built-in theme.''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== The upgrade itself ===<br />
<br />
First, make and install the updated package.<br />
<br />
''[Editor's Note: Need to confirm if setup.sh has to be run at this point.]''<br />
<br />
Second, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed. As a security measure, you will be prompted to enter the username and password for Tiki's database user account.<br />
<br />
When the install workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the existing database. Complete the upgrade, follow the last steps to complete the workflow, and you should then be taken to your closed (but upgraded) Tiki site.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before following the upgrade link if you need to!}}<br />
<br />
=== After upgrading ===<br />
<br />
Log in to your closed site, check that everything is as it should be, and when you're ready, re-open the site. Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under the &quot;[https://doc.tiki.org/New-in-version new in version]&quot; page in Tiki's online documentation.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel (or other relevant methods) as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. These will be of interest where the site is exposed to untrusted networks, devices or users.<br />
<br />
One item not mentioned on there is that the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} and reloading or restarting your web server as needed.<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or whichever PHP configuration file they're disabled in) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}}, enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}}.<br />
# Enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}}.<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
When running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492383User:Aexoxea/Tiki Wiki CMS Groupware2017-10-05T04:39:11Z<p>Aexoxea: /* Troubleshooting */ Refactored for recent changes.</p>
<hr />
<div>{{warning|This is a work in progress, does not currently reflect packaging best practice and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Installation ==<br />
<br />
First, you will need to separately install:<br />
<br />
* A [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, install {{pkg|apache}} and {{pkg|php-apache}}.<br />
* Either {{pkg|mariadb}} or {{aur|mysql}} for a database server. It's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Second, Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You must choose from one of the following, then make and install a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|The latest stable series (17.x) will mostly work with PHP 7.1, but there are some known minor issues (see Tiki's [https://doc.tiki.org/Requirements Requirements] page). If these impact you, you can downgrade to PHP 7.0 by using this AUR package: {{aur|php70}}.}}<br />
<br />
Once everything is installed, proceed with [[#Configuration|Configuration]] below.<br />
<br />
== Configuration ==<br />
<br />
Tiki uses a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack configuration. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific details.<br />
<br />
=== Web server ===<br />
<br />
First, the web server needs to be set up and configured to run PHP. As there is a choice of web servers, you will need to consult the relevant ArchWiki page (e.g. [[Apache]]) or other documentation for how to do this.<br />
<br />
The web server then needs to be configured with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options. If you're using Apache, you can get up and running quickly by just:<br />
<br />
# Copying {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Editing {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented (has a leading '{{ic|#}}'), uncomment it).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
<br />
If you're not using Apache, the {{ic|/etc/webapps/tikiwiki/apache.example.conf}} should give an indication of what options you need to set for your web server.<br />
<br />
Once you're ready, start the web server.<br />
<br />
{{note|Tiki application probably won't be accessible yet, as permissions need to be fixed; this will happen at a later step.}}<br />
<br />
=== Database server ===<br />
<br />
Second, the database server -- either [[MariaDB]] or [[MySQL]] -- needs to be set up and started.<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down the database server host name (if not on localhost), along with the username and password of a database user with access to create new databases and new users for later.<br />
<br />
If you want or need to create the database and/or user manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== PHP ===<br />
<br />
Third, [[PHP]] needs to be set up, then some edits need to be made to {{ic|/etc/php/php.ini}}. At a minimum, you need to uncomment (remove the leading '{{ic|;}}') and:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}).<br />
* Set the session data path ({{ic|1=session.save_path=}}, using the default {{ic|&quot;/tmp&quot;}} should work as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry, just uncomment it to enable).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. This is enabled by default in new PHP installs.<br />
* Enable the {{ic|gd.so}} extension, and install the {{pkg|php-gd}} package it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Tiki Files ===<br />
<br />
''[Editor's note: Need to include here '''running the script'''.]''<br />
<br />
=== Tiki Application ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed.<br />
<br />
This will bring up a workflow to perform the final configuration steps (including setting up the database). Once finished, you should be able to start using Tiki normally.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Upgrades ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before upgrading ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''If using a custom theme, revert to a built-in theme.''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== The upgrade itself ===<br />
<br />
First, make and install the updated package.<br />
<br />
''[Editor's Note: Need to confirm if setup.sh has to be run at this point.]''<br />
<br />
Second, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed. As a security measure, you will be prompted to enter the username and password for Tiki's database user account.<br />
<br />
When the install workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the existing database. Complete the upgrade, follow the last steps to complete the workflow, and you should then be taken to your closed (but upgraded) Tiki site.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before following the upgrade link if you need to!}}<br />
<br />
=== After upgrading ===<br />
<br />
Log in to your closed site, check that everything is as it should be, and when you're ready, re-open the site. Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under the &quot;[https://doc.tiki.org/New-in-version new in version]&quot; page in Tiki's online documentation.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel (or other relevant methods) as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. These will be of interest where the site is exposed to untrusted networks, devices or users.<br />
<br />
One item not mentioned on there is that the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} and reloading or restarting your web server as needed.<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or whichever PHP configuration file they're disabled in) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}}, enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during setup.sh: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to:<br />
<br />
# Install {{pkg|php-mcrypt}}.<br />
# Enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}}.<br />
# Run {{ic|setup.sh}} again.<br />
<br />
Once successful, you should consider reversing the first two steps, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
When running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492382User:Aexoxea/Tiki Wiki CMS Groupware2017-10-05T04:33:52Z<p>Aexoxea: /* The upgrade itself */ Check this later...</p>
<hr />
<div>{{warning|This is a work in progress, does not currently reflect packaging best practice and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Installation ==<br />
<br />
First, you will need to separately install:<br />
<br />
* A [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, install {{pkg|apache}} and {{pkg|php-apache}}.<br />
* Either {{pkg|mariadb}} or {{aur|mysql}} for a database server. It's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Second, Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You must choose from one of the following, then make and install a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|The latest stable series (17.x) will mostly work with PHP 7.1, but there are some known minor issues (see Tiki's [https://doc.tiki.org/Requirements Requirements] page). If these impact you, you can downgrade to PHP 7.0 by using this AUR package: {{aur|php70}}.}}<br />
<br />
Once everything is installed, proceed with [[#Configuration|Configuration]] below.<br />
<br />
== Configuration ==<br />
<br />
Tiki uses a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack configuration. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific details.<br />
<br />
=== Web server ===<br />
<br />
First, the web server needs to be set up and configured to run PHP. As there is a choice of web servers, you will need to consult the relevant ArchWiki page (e.g. [[Apache]]) or other documentation for how to do this.<br />
<br />
The web server then needs to be configured with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options. If you're using Apache, you can get up and running quickly by just:<br />
<br />
# Copying {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Editing {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented (has a leading '{{ic|#}}'), uncomment it).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
<br />
If you're not using Apache, the {{ic|/etc/webapps/tikiwiki/apache.example.conf}} should give an indication of what options you need to set for your web server.<br />
<br />
Once you're ready, start the web server.<br />
<br />
{{note|Tiki application probably won't be accessible yet, as permissions need to be fixed; this will happen at a later step.}}<br />
<br />
=== Database server ===<br />
<br />
Second, the database server -- either [[MariaDB]] or [[MySQL]] -- needs to be set up and started.<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down the database server host name (if not on localhost), along with the username and password of a database user with access to create new databases and new users for later.<br />
<br />
If you want or need to create the database and/or user manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== PHP ===<br />
<br />
Third, [[PHP]] needs to be set up, then some edits need to be made to {{ic|/etc/php/php.ini}}. At a minimum, you need to uncomment (remove the leading '{{ic|;}}') and:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}).<br />
* Set the session data path ({{ic|1=session.save_path=}}, using the default {{ic|&quot;/tmp&quot;}} should work as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry, just uncomment it to enable).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. This is enabled by default in new PHP installs.<br />
* Enable the {{ic|gd.so}} extension, and install the {{pkg|php-gd}} package it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Tiki Files ===<br />
<br />
''[Editor's note: Need to include here '''running the script'''.]''<br />
<br />
=== Tiki Application ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed.<br />
<br />
This will bring up a workflow to perform the final configuration steps (including setting up the database). Once finished, you should be able to start using Tiki normally.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Upgrades ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before upgrading ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''If using a custom theme, revert to a built-in theme.''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== The upgrade itself ===<br />
<br />
First, make and install the updated package.<br />
<br />
''[Editor's Note: Need to confirm if setup.sh has to be run at this point.]''<br />
<br />
Second, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed. As a security measure, you will be prompted to enter the username and password for Tiki's database user account.<br />
<br />
When the install workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the existing database. Complete the upgrade, follow the last steps to complete the workflow, and you should then be taken to your closed (but upgraded) Tiki site.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before following the upgrade link if you need to!}}<br />
<br />
=== After upgrading ===<br />
<br />
Log in to your closed site, check that everything is as it should be, and when you're ready, re-open the site. Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under the &quot;[https://doc.tiki.org/New-in-version new in version]&quot; page in Tiki's online documentation.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel (or other relevant methods) as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. These will be of interest where the site is exposed to untrusted networks, devices or users.<br />
<br />
One item not mentioned on there is that the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} and reloading or restarting your web server as needed.<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or whichever PHP configuration file they're disabled in) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}}, enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during packaging: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to enable {{ic|1=extension=iconv.so}} and {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}}, then make the package again.<br />
<br />
Once made successfully, you should consider disabling {{ic|1=extension=mcrypt.so}} and removing {{pkg|php-mcrypt}}, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
When running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User_talk:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492381User talk:Aexoxea/Tiki Wiki CMS Groupware2017-10-05T04:32:56Z<p>Aexoxea: /* To Do */ Updated.</p>
<hr />
<div>== To Do ==<br />
<br />
The following needs to happen before this can go into main space (if it ever does):<br />
<br />
* &lt;s&gt;''(Added 23-Sep-2017)'' Consider adding a {{ic|tikiwiki-lts-lag}} package as well, that would avoid the first few LTS point releases.&lt;/s&gt; ''(Abandoned for now)''<br />
* &lt;s&gt;''(Added 27-Sep-2017)'' Need to test building the packages in a fresh Arch, so that any missing makedepends can be found.&lt;/s&gt; ''(Done 28-Sep-2017)''<br />
* &lt;s&gt;Need to go through at least one minor '''and''' one major upgrade to Tiki, since there are very likely caveats and possibly updates needed to the {{ic|.install}} files as well.&lt;/s&gt; ''(Done 02-Oct-2017)''<br />
* &lt;s&gt;Need to do a first setup in a fresh Arch, so that any missing prerequisites can be found.&lt;/s&gt; ''(Done 27-Sep-2017)''<br />
* Need to update the packages to reflect best package practice (e.g. should install to {{ic|/usr/share/webapps/}} with a redirect file, not {{ic|/srv/http/}}). ''(In progress 04-Oct-2017)''<br />
* ''(Added 05-Oct-2017)'' Need to look at Permission Check details (relates to setup.sh).<br />
* Need to run it in this configuration for &quot;awhile&quot; to see if anything strange comes up.<br />
* Need to put the packages on [[AUR]] (requires [a] learning [[Git]] and [b] a commitment to keep them updated there).<br />
<br />
This list will be updated (and added to) as appropriate. [[User:Aexoxea|aexoxea]] ([[User_talk:Aexoxea|talk]]) 03:37, 10 September 2017 (UTC)</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492380User:Aexoxea/Tiki Wiki CMS Groupware2017-10-05T04:31:41Z<p>Aexoxea: /* Web server */ A few clarifications.</p>
<hr />
<div>{{warning|This is a work in progress, does not currently reflect packaging best practice and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Installation ==<br />
<br />
First, you will need to separately install:<br />
<br />
* A [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, install {{pkg|apache}} and {{pkg|php-apache}}.<br />
* Either {{pkg|mariadb}} or {{aur|mysql}} for a database server. It's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Second, Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You must choose from one of the following, then make and install a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|The latest stable series (17.x) will mostly work with PHP 7.1, but there are some known minor issues (see Tiki's [https://doc.tiki.org/Requirements Requirements] page). If these impact you, you can downgrade to PHP 7.0 by using this AUR package: {{aur|php70}}.}}<br />
<br />
Once everything is installed, proceed with [[#Configuration|Configuration]] below.<br />
<br />
== Configuration ==<br />
<br />
Tiki uses a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack configuration. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific details.<br />
<br />
=== Web server ===<br />
<br />
First, the web server needs to be set up and configured to run PHP. As there is a choice of web servers, you will need to consult the relevant ArchWiki page (e.g. [[Apache]]) or other documentation for how to do this.<br />
<br />
The web server then needs to be configured with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate server options. If you're using Apache, you can get up and running quickly by just:<br />
<br />
# Copying {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Editing {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented (has a leading '{{ic|#}}'), uncomment it).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
<br />
If you're not using Apache, the {{ic|/etc/webapps/tikiwiki/apache.example.conf}} should give an indication of what options you need to set for your web server.<br />
<br />
Once you're ready, start the web server.<br />
<br />
{{note|Tiki application probably won't be accessible yet, as permissions need to be fixed; this will happen at a later step.}}<br />
<br />
=== Database server ===<br />
<br />
Second, the database server -- either [[MariaDB]] or [[MySQL]] -- needs to be set up and started.<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down the database server host name (if not on localhost), along with the username and password of a database user with access to create new databases and new users for later.<br />
<br />
If you want or need to create the database and/or user manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== PHP ===<br />
<br />
Third, [[PHP]] needs to be set up, then some edits need to be made to {{ic|/etc/php/php.ini}}. At a minimum, you need to uncomment (remove the leading '{{ic|;}}') and:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}).<br />
* Set the session data path ({{ic|1=session.save_path=}}, using the default {{ic|&quot;/tmp&quot;}} should work as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry, just uncomment it to enable).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. This is enabled by default in new PHP installs.<br />
* Enable the {{ic|gd.so}} extension, and install the {{pkg|php-gd}} package it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Tiki Files ===<br />
<br />
''[Editor's note: Need to include here '''running the script'''.]''<br />
<br />
=== Tiki Application ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed.<br />
<br />
This will bring up a workflow to perform the final configuration steps (including setting up the database). Once finished, you should be able to start using Tiki normally.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Upgrades ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before upgrading ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''If using a custom theme, revert to a built-in theme.''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== The upgrade itself ===<br />
<br />
First, make and install the updated package.<br />
<br />
Second, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed. As a security measure, you will be prompted to enter the username and password for Tiki's database user account.<br />
<br />
When the install workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the existing database. Complete the upgrade, follow the last steps to complete the workflow, and you should then be taken to your closed (but upgraded) Tiki site.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before following the upgrade link if you need to!}}<br />
<br />
=== After upgrading ===<br />
<br />
Log in to your closed site, check that everything is as it should be, and when you're ready, re-open the site. Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under the &quot;[https://doc.tiki.org/New-in-version new in version]&quot; page in Tiki's online documentation.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel (or other relevant methods) as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. These will be of interest where the site is exposed to untrusted networks, devices or users.<br />
<br />
One item not mentioned on there is that the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} and reloading or restarting your web server as needed.<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or whichever PHP configuration file they're disabled in) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}}, enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during packaging: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to enable {{ic|1=extension=iconv.so}} and {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}}, then make the package again.<br />
<br />
Once made successfully, you should consider disabling {{ic|1=extension=mcrypt.so}} and removing {{pkg|php-mcrypt}}, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
When running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492344User:Aexoxea/Tiki Wiki CMS Groupware2017-10-04T12:48:40Z<p>Aexoxea: /* Web server */ Don't surround with quotes on the line to add.</p>
<hr />
<div>{{warning|This is a work in progress, does not currently reflect packaging best practice and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Installation ==<br />
<br />
First, you will need to separately install:<br />
<br />
* A [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, install {{pkg|apache}} and {{pkg|php-apache}}.<br />
* Either {{pkg|mariadb}} or {{aur|mysql}} for a database server. It's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Second, Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You must choose from one of the following, then make and install a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|The latest stable series (17.x) will mostly work with PHP 7.1, but there are some known minor issues (see Tiki's [https://doc.tiki.org/Requirements Requirements] page). If these impact you, you can downgrade to PHP 7.0 by using this AUR package: {{aur|php70}}.}}<br />
<br />
Once everything is installed, proceed with [[#Configuration|Configuration]] below.<br />
<br />
== Configuration ==<br />
<br />
Tiki uses a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack configuration. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific details.<br />
<br />
=== Web server ===<br />
<br />
First, the web server needs to be set up and configured to run PHP. As there is a choice of web servers, you will need to consult the relevant ArchWiki page (e.g. [[Apache]]) or other documentation for how to do this.<br />
<br />
The web server then needs to be configured with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate access options. If you're using Apache, you can get up and running quickly by just:<br />
<br />
# Copying {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Editing {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented (has a leading '{{ic|#}}'), uncomment it).<br />
#* Add this line at the end of the file (or other place as appropriate): {{ic|Include conf/extra/tikiwiki.conf}}.<br />
<br />
If you're not using Apache, the {{ic|/etc/webapps/tikiwiki/apache.example.conf}} should give an indication of what options you need to set for your web server.<br />
<br />
Once you're ready, start the web server.<br />
<br />
=== Database server ===<br />
<br />
Second, the database server -- either [[MariaDB]] or [[MySQL]] -- needs to be set up and started.<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down the database server host name (if not on localhost), along with the username and password of a database user with access to create new databases and new users for later.<br />
<br />
If you want or need to create the database and/or user manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== PHP ===<br />
<br />
Third, [[PHP]] needs to be set up, then some edits need to be made to {{ic|/etc/php/php.ini}}. At a minimum, you need to uncomment (remove the leading '{{ic|;}}') and:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}).<br />
* Set the session data path ({{ic|1=session.save_path=}}, using the default {{ic|&quot;/tmp&quot;}} should work as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry, just uncomment it to enable).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. This is enabled by default in new PHP installs.<br />
* Enable the {{ic|gd.so}} extension, and install the {{pkg|php-gd}} package it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Tiki Files ===<br />
<br />
''[Editor's note: Need to include here '''running the script'''.]''<br />
<br />
=== Tiki Application ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed.<br />
<br />
This will bring up a workflow to perform the final configuration steps (including setting up the database). Once finished, you should be able to start using Tiki normally.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Upgrades ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before upgrading ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''If using a custom theme, revert to a built-in theme.''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== The upgrade itself ===<br />
<br />
First, make and install the updated package.<br />
<br />
Second, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed. As a security measure, you will be prompted to enter the username and password for Tiki's database user account.<br />
<br />
When the install workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the existing database. Complete the upgrade, follow the last steps to complete the workflow, and you should then be taken to your closed (but upgraded) Tiki site.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before following the upgrade link if you need to!}}<br />
<br />
=== After upgrading ===<br />
<br />
Log in to your closed site, check that everything is as it should be, and when you're ready, re-open the site. Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under the &quot;[https://doc.tiki.org/New-in-version new in version]&quot; page in Tiki's online documentation.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel (or other relevant methods) as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. These will be of interest where the site is exposed to untrusted networks, devices or users.<br />
<br />
One item not mentioned on there is that the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} and reloading or restarting your web server as needed.<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or whichever PHP configuration file they're disabled in) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}}, enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during packaging: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to enable {{ic|1=extension=iconv.so}} and {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}}, then make the package again.<br />
<br />
Once made successfully, you should consider disabling {{ic|1=extension=mcrypt.so}} and removing {{pkg|php-mcrypt}}, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
When running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxeahttps://wiki.archlinux.org/index.php?title=User:Aexoxea/Tiki_Wiki_CMS_Groupware&diff=492343User:Aexoxea/Tiki Wiki CMS Groupware2017-10-04T12:46:29Z<p>Aexoxea: /* Web server */ Noted when to start the server.</p>
<hr />
<div>{{warning|This is a work in progress, does not currently reflect packaging best practice and may not ever move to mainspace. Proceed at your own risk!}}<br />
<br />
----<br />
<br />
[https://tiki.org Tiki Wiki CMS Groupware] (referred herein as just &quot;'''Tiki'''&quot;) is a content management system and groupware web application written in PHP.<br />
<br />
== Installation ==<br />
<br />
First, you will need to separately install:<br />
<br />
* A [https://wiki.archlinux.org/index.php/Category:Web_server web server] capable of running PHP. If not sure what to pick, install {{pkg|apache}} and {{pkg|php-apache}}.<br />
* Either {{pkg|mariadb}} or {{aur|mysql}} for a database server. It's recommended to use MariaDB unless you have a specific need for something else.<br />
<br />
Second, Tiki ships both stable and long-term support (LTS) releases (see [https://tiki.org/Versions versioning policy and release roadmap]). You must choose from one of the following, then make and install a package using the files on the linked page:<br />
<br />
* For the latest stable release: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Stable|Files Stable]].<br />
<br />
{{note|The latest stable series (17.x) will mostly work with PHP 7.1, but there are some known minor issues (see Tiki's [https://doc.tiki.org/Requirements Requirements] page). If these impact you, you can downgrade to PHP 7.0 by using this AUR package: {{aur|php70}}.}}<br />
<br />
Once everything is installed, proceed with [[#Configuration|Configuration]] below.<br />
<br />
== Configuration ==<br />
<br />
Tiki uses a typical [https://en.wikipedia.org/wiki/LAMP_(software_bundle) LAMP]-like stack configuration. See Tiki's [https://doc.tiki.org/Requirements Requirements] page for specific details.<br />
<br />
=== Web server ===<br />
<br />
First, the web server needs to be set up and configured to run PHP. As there is a choice of web servers, you will need to consult the relevant ArchWiki page (e.g. [[Apache]]) or other documentation for how to do this.<br />
<br />
The web server then needs to be configured with a path or subdomain alias that points to {{ic|/usr/share/webapps/tikiwiki/}} with appropriate access options. If you're using Apache, you can get up and running quickly by just:<br />
<br />
# Copying {{ic|/etc/webapps/tikiwiki/apache.example.conf}} to {{ic|/etc/httpd/conf/extra/tikiwiki.conf}}.<br />
# Editing {{ic|/etc/httpd/conf/httpd.conf}} to:<br />
#* Ensure that {{ic|LoadModule alias_module modules/mod_alias.so}} is available (it is by default, but if this line is commented (has a leading '{{ic|#}}'), uncomment it).<br />
#* Add a line &quot;{{ic|Include conf/extra/tikiwiki.conf}}&quot; at the end of the file (or other place as appropriate).<br />
<br />
If you're not using Apache, the {{ic|/etc/webapps/tikiwiki/apache.example.conf}} should give an indication of what options you need to set for your web server.<br />
<br />
Once you're ready, start the web server.<br />
<br />
=== Database server ===<br />
<br />
Second, the database server -- either [[MariaDB]] or [[MySQL]] -- needs to be set up and started.<br />
<br />
It is recommended to let Tiki create the database (and optionally -- but recommended for security reasons -- the database user account) that it will use. No configuration is needed now, but you will need to note down the database server host name (if not on localhost), along with the username and password of a database user with access to create new databases and new users for later.<br />
<br />
If you want or need to create the database and/or user manually instead, see [[#Manual creation|Database - Manual creation]] below.<br />
<br />
=== PHP ===<br />
<br />
Third, [[PHP]] needs to be set up, then some edits need to be made to {{ic|/etc/php/php.ini}}. At a minimum, you need to uncomment (remove the leading '{{ic|;}}') and:<br />
<br />
* Set the default timezone ({{ic|1=date.timezone=}}).<br />
* Set the session data path ({{ic|1=session.save_path=}}, using the default {{ic|&quot;/tmp&quot;}} should work as a starting point).<br />
* Enable the {{ic|calendar.so}}, {{ic|iconv.so}}, {{ic|intl.so}}, {{ic|mysqli.so}} and {{ic|pdo_mysql.so}} extensions (each has its own {{ic|1=extension=}} entry, just uncomment it to enable).<br />
<br />
It is also recommended to:<br />
<br />
* Enable the {{ic|zip.so}} extension. This is enabled by default in new PHP installs.<br />
* Enable the {{ic|gd.so}} extension, and install the {{pkg|php-gd}} package it requires to work.<br />
<br />
{{note|You may need to reload or restart the web server in order for these changes to take effect.}}<br />
<br />
=== Tiki Files ===<br />
<br />
''[Editor's note: Need to include here '''running the script'''.]''<br />
<br />
=== Tiki Application ===<br />
<br />
Finally, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed.<br />
<br />
This will bring up a workflow to perform the final configuration steps (including setting up the database). Once finished, you should be able to start using Tiki normally.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language.}}<br />
<br />
== Upgrades ==<br />
<br />
See Tiki's [https://doc.tiki.org/Upgrade Upgrade] page for detailed information about updating between versions.<br />
<br />
=== Before upgrading ===<br />
<br />
It is strongly recommended to:<br />
<br />
* '''Make sure you have a backup in place.''' Tiki does not support downgrades, so this is essential for a site of any importance. As appropriate, take a [[System backup|system backup]] of your Arch, follow one of Tiki's [https://doc.tiki.org/Backup Backup] recommendations (which are mostly concerned with the database), or ideally, do both.<br />
* '''Close the site.''' This prevents non-admin users from interacting with the site while it is being upgraded. The setting can be enabled by a Tiki admin user through the Control Panel (either [https://doc.tiki.org/Navigation General &gt; Navigation] or [https://doc.tiki.org/Site-Access Security &gt; Site Access]).<br />
* '''If using a custom theme, revert to a built-in theme.''' While themes in Tiki only affect appearance, there is no guarantee that custom themes will work correctly between versions, and even a broken appearance can inhibit usability. The theme can be set by a Tiki admin user through the Control Panel ([https://doc.tiki.org/Look-and-Feel-Theme Look &amp; Feel &gt; Theme]).<br />
<br />
=== The upgrade itself ===<br />
<br />
First, make and install the updated package.<br />
<br />
Second, open a [https://wiki.archlinux.org/index.php/Category:Web_browser web browser] and access [https://localhost/tiki/tiki-install.php https://localhost/tiki/tiki-install.php] (or [http://localhost/tiki/tiki-install.php http://localhost/tiki/tiki-install.php], if HTTPS isn't available), substituting the web server address if needed. As a security measure, you will be prompted to enter the username and password for Tiki's database user account.<br />
<br />
When the install workflow appears, there will be a notice about upgrading. Follow the link under that notice; it will take you to the correct part of the workflow to upgrade the existing database. Complete the upgrade, follow the last steps to complete the workflow, and you should then be taken to your closed (but upgraded) Tiki site.<br />
<br />
{{warning|As username and password information will be handled through the workflow, if the server is not on localhost it is recommended to use HTTPS or another secure communication method.}}<br />
<br />
{{tip|The workflow defaults to English, but the first page of the workflow allows you to select a different language. Make sure to set that before following the upgrade link if you need to!}}<br />
<br />
=== After upgrading ===<br />
<br />
Log in to your closed site, check that everything is as it should be, and when you're ready, re-open the site. Points to look out for include:<br />
<br />
* '''Release notes.''' These can be found for each major version under the &quot;[https://doc.tiki.org/New-in-version new in version]&quot; page in Tiki's online documentation.<br />
* '''The {{ic|.htaccess}} file (or the file it's symlinked to, such as {{ic|_htaccess}}).''' If you've made custom changes to this, such as for [https://doc.tiki.org/Apache-Clean-URLs SEFURLs], you may need to re-apply these.<br />
* '''Feature defaults.''' New features will generally be set to default values, and features deemed 'unsafe' (including approvals for editing plugins) may have been reset to 'safe' values. Change these through the Control Panel (or other relevant methods) as needed.<br />
* '''Custom themes.''' If you were using a custom theme (and it supports the upgraded version of Tiki), switch back to it and check if it works OK or not. It's recommended to keep a separate browser window open that shows the ''Look &amp; Feel &gt; Theme'' Control Panel in a built-in theme while testing, so you can revert it easily if needed.<br />
<br />
== Documentation and Support ==<br />
<br />
Extensive documentation is maintained online at [https://doc.tiki.org doc.tiki.org] (sometimes abbreviated &quot;doc.t.o&quot;).<br />
<br />
There are also user forums and the development mailing list at [https://tiki.org/Community tiki.org/Community].<br />
<br />
== Security ==<br />
<br />
Tiki's [https://doc.tiki.org/Security Security] documentation page describes the Security Control Panel, and references other security-related functions as related topics. These will be of interest where the site is exposed to untrusted networks, devices or users.<br />
<br />
One item not mentioned on there is that the [[#Server check|Server Check]] script checks for a number of PHP functions that have security implications. Where enabled, these functions are marked as &quot;Risky&quot;. If your use of Tiki doesn't need those functions (and nothing else on the server does either), you can disable them. This is done by adding them to the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} and reloading or restarting your web server as needed.<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Server check ===<br />
<br />
Tiki ships a [https://doc.tiki.org/Server-Check Server Check] PHP script that allows you confirm aspects of your web server, PHP and (optionally) database setup are compatible with Tiki, or will allow certain optional features of Tiki to be used or not.<br />
<br />
The script is available:<br />
<br />
* Before installation, as a separate download (upload it to a web server with PHP enabled and run it in a web browser, and it will tell you if things are configured OK or not).<br />
* During installation, from the &quot;Review the System Requirements&quot; screen (see the link to &quot;a detailed report about your server&quot;).<br />
* After installation, as an administration tool (you'll need to be logged in to Tiki as an admin user to use it there).<br />
<br />
{{note|Tiki's [https://doc.tiki.org/Requirements Requirements] page lists a number of recommended defaults for PHP, noting the script flags values that will/might be problematic but doesn't always suggest something better.}}<br />
<br />
=== File gallery indexing dependencies ===<br />
<br />
{{warning|File gallery indexing presents a risk if untrusted files can be uploaded, as someone could use a specially crafted file to exploit security vulnerabilities in either Tiki itself or the underlying packages used for indexing.}}<br />
<br />
If you want to use file gallery indexing, you need to do two things:<br />
<br />
First, use the [[#Server check|server check]] script to confirm that the {{ic|popen}} and {{ic|shell_exec}} PHP functions are enabled. If they aren't, remove them from the {{ic|1=disable_functions=}} directive under {{ic|/etc/php/php.ini}} (or whichever PHP configuration file they're disabled in) and reload or restart your web server as needed.<br />
<br />
Second, install the following packages as desired:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Package !! Provides Binaries !! Used For Types<br />
|-<br />
| {{pkg|catdoc}} || {{ic|catdoc}}, {{ic|catppt}}, {{ic|xls2cvs}} || Microsoft Office, RTF<br />
|-<br />
| {{pkg|docx2txt}} || {{ic|docx2txt}} || Microsoft Word (OOXML)<br />
|-<br />
| {{pkg|elinks}} || {{ic|elinks}} || HTML<br />
|-<br />
| {{pkg|odt2txt}} || {{ic|odt2txt}} || OpenDocument<br />
|-<br />
| {{pkg|pstotext}} || {{ic|pstotext}} || PDF, PostScript<br />
|-<br />
| {{pkg|unzip}} || {{ic|unzip}} || Zip<br />
|}<br />
<br />
For convenience, the '''File Indexing''' file on the following page can be used to make and install a meta package that will pull in all packages that support indexing: [[User:Aexoxea/Tiki Wiki CMS Groupware/Files Meta|Files Meta]].<br />
<br />
=== MCrypt ===<br />
<br />
{{warning|MCrypt has been deprecated in PHP, and Tiki will cease using it in a future release (see development page [https://dev.tiki.org/Removing-MCrypt-as-a-dependency removing MCrypt as a dependency]). If you're not already using it, don't start now.}}<br />
<br />
MCrypt is optionally used by Tiki for encrypted data storage in some areas. It's also one of the PHP extensions that will be flagged by the [[#Server check|server check]] script on a default install.<br />
<br />
To enable it, install {{pkg|php-mcrypt}}, enable {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}} and reload or restart your web server as needed.<br />
<br />
=== Database ===<br />
<br />
==== Manual creation ====<br />
<br />
Tiki needs its own database (using a UTF-8 charset) and the ability to log in to a database user with full access to that database. If you can't or don't want to let Tiki create these during its install workflow, you can set these up manually, and just supply the details that Tiki needs directly (i.e. the host name if not on localhost, database name, user account name and password).<br />
<br />
An example of doing this manually through the terminal (that should work in most cases, with '''bolded''' bits configurable) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; CREATE DATABASE `'''tikiwiki'''` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;<br />
mysql&gt; CREATE USER `'''tikiwiki'''`@''''localhost'''' IDENTIFIED BY ''''password'''';<br />
mysql&gt; GRANT ALL PRIVILEGES ON `'''tikiwiki'''`.* TO `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; quit<br />
}}<br />
<br />
{{warning|The '''password''' in the above is the password of the database user account, not the authentication type. For security reasons, make sure you don't accidentally set the password to &quot;password&quot; if you copy/paste!}}<br />
<br />
{{warning|The '''password''' you provide above will be saved to a local command history file at {{ic|~/.mysql_history}}. You should redact that part of the file when finished.}}<br />
<br />
==== Manual removal ====<br />
<br />
If you need or want to remove the Tiki database for any reason, you'll need to do so manually. An example of doing this through the terminal (which should work with the '''bolded''' bits set as appropriate) is:<br />
<br />
{{bc|$ mysql -u '''root''' -p<br />
mysql&gt; DROP USER `'''tikiwiki'''`@''''localhost'''';<br />
mysql&gt; DROP DATABASE `'''tikiwiki'''`;<br />
mysql&gt; quit<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Composer error during packaging: &quot;Your requirements could not be resolved to an installable set of packages&quot; ===<br />
<br />
{{note|This applies to Tiki 17.x.}}<br />
<br />
You need to enable {{ic|1=extension=iconv.so}} and {{ic|1=extension=mcrypt.so}} in {{ic|/etc/php/php.ini}}, then make the package again.<br />
<br />
Once made successfully, you should consider disabling {{ic|1=extension=mcrypt.so}} and removing {{pkg|php-mcrypt}}, per the [[#MCrypt|MCrypt]] section above.<br />
<br />
== Miscellanea ==<br />
<br />
=== Linter Errata ===<br />
<br />
When running {{pkg|namcap}} on the made packages, you will get some or all of the following messages:<br />
<br />
{| class=&quot;wikitable&quot;<br />
! Message !! Remarks<br />
|-<br />
| {{ic|tikiwiki W: Directory (usr/share/webapps/tikiwiki/*) is empty}} || '''Ignore:''' There are a number of empty directories in the package as shipped, and it's not clear which ones are safe to remove and which ones aren't. Consequently, they have all been left in place. You may wish to configure your web server to deny directory listings.<br />
|-<br />
| {{ic|tikiwiki W: Potential non-FHS info page (usr/share/webapps/tikiwiki/vendor_bundled/vendor/fortawesome/font-awesome/src/*/icon/*/index.html) found.}} || '''Ignore:''' All of the [http://fontawesome.io/ Font Awesome] icon subdirectories have an equivalent {{ic|index.html}} file. It's not clear why just some of these being singled out.<br />
|-<br />
| {{ic|tikiwiki W: Referenced library 'node' is an uninstalled dependency}} || '''Ignore:''' It's not clear what's being referred to, or from where. In any case, all [https://doc.tiki.org/Requirements explicit requirements] are satisfied by the package and instructions above.<br />
|-<br />
| {{ic|tikiwiki E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/webapps/tikiwiki/vendor_bundled/vendor/adodb/adodb-php/scripts/*'])}} || '''Ignore:''' These scripts appear to be used to build releases of [http://adodb.org ADOdb], and are not required for normal operation.<br />
|-<br />
| {{ic|tikiwiki W: Dependency included and not needed ('php-intl')}} || '''Ignore:''' Intl module ''is'' [https://doc.tiki.org/Requirements required] (and this is also used to pull in PHP at the same time).<br />
|}</div>Aexoxea