The reference implementation of WikiSuite is with ClearOS. However, in some corporate environments, the only option is Windows. Thus, we are currently developing an alternate recipe to set up parts of WikiSuite on Windows Server 2012 R2.
Included
Use Windows version instead of Linux
- PHP 5.6
- Apache 2.4
- MariaDB
Replaced
- ClearOS OpenLDAP -> Use Tiki logins as master (So Openfire needs to connect to Tiki instead of ClearOS's OpenLDAP)
- Cron jobs -> Windows Tasks (make sure console.php index:rebuild --log is run from where the Tiki is)
- svn from the command line -> https://tortoisesvn.net/
- ClearOS firewall -> Windows firewall
- https://doc.tiki.org/Search+within+files -> ???
Maybe later
Excluded
- ClearOS, because you are running on Windows Server
- Kolab / Roundcube, because it's not supported on Windows, and we expect that you already have an e-mail system such as Microsoft Exchange
- FusionPBX / FreeSWITCH because we assume you already have a PBX phone system
- Kaltura, because it's not supported on Windows: http://kaltura.github.io/platform-install-packages/
- Xibo, because it's a lesser used component
Download and install latest Apache
- Choose to download 'vc_redist.x64.exe';
- Run 'vc_redist.x64.exe';
- Click on the 'Next' button.
- Unzip and move the 'Apache24' directory to the root of your data drive (example: 'D:');
- Unzip 'mod_fcgid.so' to "D:\Apache24\modules\";
- Run "D:\Apache24\bin\httpd.exe" from a command prompt;
- If you choose to run 'D:', you'll get some error messages and be instructed to fix some lines in 'httpd.conf'. Just replace the paths from 'C:' to 'D:'.
- By navigating to 'http://127.0.0.1/', confirm that "It works!";
- With focus on the command prompt window hold down "Ctrl + C" then release both to stop Apache.
Download and install latest PHP 5
- Download PHP VC11 x64 Non Thread Safe - v5.6.22 as of 2016/06/21;
- Extract the content of this file to the root of your data drive in 'a 'PHP5' directory (example: 'D:\PHP5');
- Add 'php.exe' to the system's path environmental variable:
From the Command Prompt (Admin)
C:\>setx PATH "%PATH%;D:\PHP5" /M
SUCCESS: Specified value was saved.
C:\>
- Choose to download 'vcredist_x64.exe';
- Run 'vcredist_x64.exe';
- Check 'I agree to the license terms and conditions' and click on the 'Install' button;
- Click on the 'Next' button;
- Click on the 'Close' button.
- Navigate to the PHP folder and copy the 'php.ini-production' file to 'php.ini';
- Edit the 'php.ini' file;
- Find the 'extension_dir' directive and change so that it properly locates the 'ext' folder, i.e.:
; extension_dir = "ext"
>>>
extension_dir = D:\PHP5\ext
- Uncomment the Windows Extensions for MySQL / MariaDB by removing the ";":
;extension=php_mysqli.dll
>>>
extension=php_mysqli.dll
;extension=php_pdo_mysql.dll
>>>
extension=php_pdo_mysql.dll
- Uncomment the 'curl' and 'openssl' Windows extensions to be able to use Composer:
;extension=php_curl.dll
>>>
extension=php_curl.dll
;extension=php_openssl.dll
>>>
extension=php_openssl.dll
- Uncomment the 'gd2' Windows extensions to be able to correctly use Tiki:
;extension=php_gd2.dll
>>>
extension=php_gd2.dll
- Uncomment the PATH_INFO/PATH_TRANSLATED support for CGI:
;cgi.fix_pathinfo=1
>>>
cgi.fix_pathinfo=1
- Save the file as 'php.ini'.
- Ensure that you can run PHP from the Windows Command Line:
php -m
- Edit the PHP configuration file ('php.ini') for Tiki's usage:
memory_limit = 128M
>>>
memory_limit = 256M
upload_max_filesize = 2M
>>>
upload_max_filesize = 128M
post_max_size = 8M
>>>
post_max_size = 1288M
;extension=php_sqlite3.dll
>>>
extension=php_sqlite3.dll
;extension=php_fileinfo.dll
>>>
extension=php_fileinfo.dll
;extension=php_intl.dll
>>>
extension=php_intl.dll
disable_functions =
>>>
disable_functions = exec, passthru, shell_exec, system, proc_open, popen, curl_exec, curl_multi_exec, parse_ini_file, show_source, allow_url_fopen
allow_url_fopen = On
>>>
allow_url_fopen = Off
- Edit the PHP configuration file ('php.ini') to add your timezone as recommended by Tiki :
- Here's a configuration example for 'date.timezone':
;date.timezone =
>>>
date.timezone = America/New_York
- Edit the PHP configuration file ('php.ini') to enable OPcache for performance:
+++
zend_extension=php_opcache.dll
;opcache.enable=0
>>>
opcache.enable=1
;opcache.memory_consumption=64
>>>
opcache.memory_consumption=128
;opcache.interned_strings_buffer=4
>>>
opcache.interned_strings_buffer=8
;opcache.max_accelerated_files=2000
>>>
opcache.max_accelerated_files=4000
;opcache.revalidate_freq=2
>>>
opcache.revalidate_freq=60
;opcache.fast_shutdown=0
>>>
opcache.fast_shutdown=1
- Finally, edit the Apache configuration file ('httpd.conf') to make sure you load 'mod_fcgid':
LoadModule fcgid_module modules/mod_fcgid.so
<IfModule fcgid_module>
FcgidMaxProcesses 300
FcgidMaxProcessesPerClass 300
FcgidOutputBufferSize 65536
FcgidConnectTimeout 10
FcgidProcessLifeTime 0
FcgidMaxRequestsPerProcess 0
FcgidMinProcessesPerClass 0
FcgidFixPathinfo 0
FcgidProcessLifeTime 0
FcgidZombieScanInterval 20
FcgidMaxRequestLen 536870912
FcgidIOTimeout 120
FcgidTimeScore 3
FcgidPassHeader Authorization
FcgidInitialEnv PHPRC "D:\\PHP5"
FcgidInitialEnv PATH "D:\\PHP5;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;"
FcgidInitialEnv SystemRoot "C:\\Windows"
FcgidInitialEnv SystemDrive "C:"
FcgidInitialEnv TEMP "C:\\WINDOWS\\TEMP"
FcgidInitialEnv TMP "C:\\WINDOWS\\TEMP"
FcgidInitialEnv windir "C:\\WINDOWS"
<Files ~ "\.php$">
Options Indexes FollowSymLinks ExecCGI
AddHandler fcgid-script .php
FcgidWrapper "D:/PHP5/php-cgi.exe" .php
</Files>
</IfModule>
- If you receive no error, open a command prompt using 'Run as administrator' then navigate to the 'bin' folder of Apache to run Apache as a service. Now, install the service:
D:\Apache24\bin>httpd -k install
Installing the 'Apache2.4' service
The 'Apache2.4' service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.
D:\Apache24\bin>net start Apache2.4
The Apache2.4 service is starting.
The Apache2.4 service was started successfully.
D:\Apache24\bin>
- After that, the service will be automatically restarted every time the server is rebooted.
Download and install latest MariaDB
- Download the current stable relase of MariaDB - v10.1.14 as of 2016/06/21;
- Download the "ZIP file" package type for Windows x86_64;
- Click the 'No thanks, just take me to the download' button if you don't want to be added to their mailing list;
- Extract the content of this file to the root of your data drive and rename the directory to 'MariaDB';
D:\MariaDB>copy my-large.ini my.ini
1 file(s) copied.
D:\MariaDB>
- Edit the default MariaDB configuration file ('my.ini') to change socket location:
[client]
socket = /tmp/mysql.sock
>>>
socket = C:\Windows\Temp\mysql.sock
[mysqld]
socket = /tmp/mysql.sock
>>>
socket = C:\Windows\Temp\mysql.sock
- Edit the MariaDB configuration file ('my.ini') for Tiki's usage:
max_allowed_packet = 1M
>>>
max_allowed_packet = 128M
+++
character_set_server = utf8
- Install 'mysqld.exe' as a Windows service using the following:
D:\MariaDB\bin>mysqld.exe --install
Service successfully installed.
D:\MariaDB\bin>net start MySQL
The MySQL service is starting...
The MySQL service was started successfully.
D:\MariaDB\bin>
- After that, the service will be automatically restarted every time the server is rebooted;
- Assign a password to the root user because by default no password is set:
D:\MariaDB\bin>mysql.exe -u root
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.1.14-MariaDB mariadb.org binary distribution
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new_password');
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('new_password');
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> SET PASSWORD FOR 'root'@'::1' = PASSWORD('new_password');
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> exit
Bye
D:\MariaDB\bin>
Create a new directory that will be used as "DocumentRoot"
- Open a command prompt and navigate to 'D:\';
- Create a 'www' directory that will be used by Apache as "DocumentRoot":
D:\>md www
D:\>
- Edit the Apache configuration file ('httpd.conf') to change "DocumentRoot":
DocumentRoot "c:/Apache24/htdocs"
<Directory "c:/Apache24/htdocs">
>>>
DocumentRoot "d:/www"
<Directory "d:/www">
C:\>net stop Apache2.4
The Apache2.4 service is stopping.....
The Apache2.4 service was stopped successfully.
C:\>net start Apache2.4
The Apache2.4 service is starting.
The Apache2.4 service was started successfully.
C:\>
Download and install Adminer
- Download Adminer - v4.2.5 as of 2016/06/20;
- Copy the downloaded file to "D:\www\" and rename it to 'adminer.php';
- When you are finished, make sure to delete "D:\www\adminer.php".
Download and install TortoiseSVN
- Download TortoiseSVN - v1.9.4 as of 2016/06/16;
- Double-click on the '.msi' file to run the setup;
- Click on the 'Next >' button;
- Click on the 'Next >' button again;
- Select 'Will be installed on local hard drive' for the 'command line client tools' feature;
- Click on the 'Next >' button;
- Click on the 'Install' button;
- Click on the 'Finish' button.
- Add 'svn.exe' to the system's path environmental variable:
C:\>setx PATH "%PATH%;C:\Program Files\TortoiseSVN\bin" /M
SUCCESS: Specified value was saved.
C:\>
Download and install Fake Sendmail (optional)
If you prefer to skip this step, just configure Tiki to use an external SMTP server.
- Download Fake Sendmail;
- Copy 'sendmail.exe' and 'sendmail.ini' from the archive into 'D:\usr\lib';
- Edit 'D:\usr\lib\sendmail.ini' and enter your mail account credentials;
- Edit 'D:\PHP5\php.ini' to configure the 'sendmail_path':
;sendmail_path =
>>>
sendmail_path = D:\usr\lib\sendmail -t -i
C:\>net stop Apache2.4
The Apache2.4 service is stopping.....
The Apache2.4 service was stopped successfully.
C:\>net start Apache2.4
The Apache2.4 service is starting.
The Apache2.4 service was started successfully.
C:\>
Download and install Tiki
- Open a command prompt and navigate to 'D:\www';
- Download the latest Tiki 15.x from SVN:
D:\www>svn checkout https://svn.code.sf.net/p/tikiwiki/code/branches/15.x .
- Download Composer
- Move the 'composer.phar' file to 'D:\Apache24\htdocs\temp';
- Install the project dependencies:
D:\www>php temp\composer.phar install
- Create a user and database with same name for Tiki using Adminer:
- Click on the 'Create new database' link;
- Enter the desired database name and select 'utf8_unicode_ci' for the "collation";
- Click on the 'Save' button;
- Click on the 'Privileges' link;
- Click on the 'Create user' link;
- Enter the desired "User name" and "Password";
- Check 'All privileges' and click on the 'Save' button.
- Initiate the Tiki installation by loading the 'tiki-install.php' script:
- Click on the 'Continue' button;
- Click on the 'Continue' button again;
- Click on the 'Continue' button one more time;
- Under "Database information" enter the "Database name";
- Under "Database user" enter the "User name" and it's "Password";
- Click on the 'Continue' button;
- Select 'InnoDB' for the database engine and click on the 'Install' button;
- Click on the 'Continue' button.
Download and install Elasticsearch
From the Command Prompt (Admin)
C:\>setx JAVA_HOME "C:\Program Files\Java\jdk1.8.0_91" /M
SUCCESS: Specified value was saved.
C:\>
- Double-click on the '.exe' file to run the setup;
- Click on the 'Install >' button;
- Click on the 'Next >' button;
- Click on the 'Next >' button again;
- Click on the 'Close' button;
- Download Elasticsearch - v2.3.3 as of 2016/06/21;
- Unzip the content to "D:\" and rename the directory to 'Elasticsearch';
- Open a command prompt then navigate to "D:\Elasticsearch\bin":
- Install Elasticsearch as a Windows service using the following:
D:\Elasticsearch\bin>service install
Installing service : "elasticsearch-service-x64"
Using JAVA_HOME (64-bit): "C:\Program Files\Java\jdk1.8.0_91"
The service 'elasticsearch-service-x64' has been installed.
D:\Elasticsearch\bin>service start
The service 'elasticsearch-service-x64' has been started
D:\Elasticsearch\bin>service manager
- Change "Startup type" from 'Manual' to 'Automatic';
- Click on the 'Apply' button;
- Click on the 'OK' button.
Successfully started service manager for 'elasticsearch-service-x64'.
D:\Elasticsearch\bin>