The reference implementation of WikiSuite is with Virtualmin. However, in some corporate environments, the only option is Windows Server. Thus, we developed an alternate recipe to set up parts of WikiSuite on Windows Server 2012 R2 (and we also did some testing on Windows Server 2016). This was for Tiki18.x, using SVN.
The client-project for which this was done later moved to Linux, so the recipe below has not continued to be maintained.
If you need this, please contact Marc Laporte for professional services via his company: EvoluData.
For the instructions below, please use the Command Prompt (which is different than Windows PowerShell)
C:\>setx PATH "%PATH%;D:\PHP5" /M SUCCESS: Specified value was saved. C:\>exit
; extension_dir = "ext" >>> extension_dir = D:\PHP5\ext
;extension=php_mysqli.dll >>> extension=php_mysqli.dll ;extension=php_pdo_mysql.dll >>> extension=php_pdo_mysql.dll
;extension=php_curl.dll >>> extension=php_curl.dll ;extension=php_openssl.dll >>> extension=php_openssl.dll
;extension=php_gd2.dll >>> extension=php_gd2.dll
;extension=php_mbstring ;extension=php_gettext.dll ;extension=php_gmp.dll >>> extension=php_mbstring.dll extension=php_gettext.dll extension=php_gmp.dll
;cgi.fix_pathinfo=1 >>> cgi.fix_pathinfo=1
php -m
memory_limit = 128M >>> memory_limit = 256M upload_max_filesize = 2M >>> upload_max_filesize = 128M post_max_size = 8M >>> post_max_size = 128M ;extension=php_pdo_sqlite.dll ;extension=php_sqlite3.dll >>> extension=php_pdo_sqlite.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
;date.timezone = >>> date.timezone = America/New_York
;session.save_path = "/tmp" >>> session.save_path = "C:\Windows\Temp"
+++ 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
;opcache.enable_cli=0 >>> opcache.enable_cli=1
+++ display_errors=Off >>> display_errors=On
+++ ;extension=php_ldap.dll >>> extension=php_ldap.dll
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>
<IfModule dir_module> DirectoryIndex index.html </IfModule> >>> <IfModule dir_module> DirectoryIndex index.html index.php </IfModule>
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>
D:\MariaDB>copy my-large.ini my.ini 1 file(s) copied. D:\MariaDB>
[client] socket = /tmp/mysql.sock >>> socket = C:\Windows\Temp\mysql.sock [mysqld] socket = /tmp/mysql.sock >>> socket = C:\Windows\Temp\mysql.sock
max_allowed_packet = 1M >>> max_allowed_packet = 128M +++ character_set_server = utf8
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>
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>
C:\>setx PATH "%PATH%;D:\MariaDB\bin" /M SUCCESS: Specified value was saved. C:\>exit
D:\>md www D:\>
#LoadModule rewrite_module modules/mod_rewrite.so >>> LoadModule rewrite_module modules/mod_rewrite.so
DocumentRoot "d:/Apache24/htdocs" <Directory "d:/Apache24/htdocs"> (...) AllowOverride None >>> DocumentRoot "d:/www" <Directory "d:/www"> (...) AllowOverride All
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:\>
C:\>setx PATH "%PATH%;C:\Program Files\TortoiseSVN\bin" /M SUCCESS: Specified value was saved. C:\>exit
Vis the TortoiseGUI, you can also configure a proxy. This proxy will also work on the command line version,
If you prefer to skip this step, just configure Tiki to use an external SMTP server.
;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:\>
D:\www>svn checkout https://svn.code.sf.net/p/tikiwiki/code/branches/17.x .
cd \www\vendor_bundled D:\www>php ..\temp\composer.phar install
allow_url_fopen = On >>> allow_url_fopen = Off
The installer should either link from .htaccess to _htaccess or copy _htaccess to .htaccess. If this doesn't work, you can do manually:
copy _htaccess .htaccess
C:\>setx JAVA_HOME "C:\Program Files\Java\jre1.8.0_144" /M SUCCESS: Specified value was saved. C:\>exit
D:\Elasticsearch\bin>elasticsearch-service install Installing service : "elasticsearch-service-x64" Using JAVA_HOME (64-bit): "C:\Program Files\Java\jdk1.8.0_144" The service 'elasticsearch-service-x64' has been installed. D:\Elasticsearch\bin>elasticsearch-service start The service 'elasticsearch-service-x64' has been started D:\Elasticsearch\bin>elasticsearch-service manager
Successfully started service manager for 'elasticsearch-service-x64'. D:\Elasticsearch\bin>
The procedure would be similar to downgrade. You probably want to upgrade your Java version as well.
Download new Elasticsearch version and unzip into a folder elasticsearch-new
Then, from the Command Prompt (Admin)
D:\>cd\Elasticsearch\bin
D:\Elasticsearch\bin>service stop
The service 'elasticsearch-service-x64' has been stopped
D:\Elasticsearch\bin> service remove
The service 'elasticsearch-service-x64' has been removed
D:\Elasticsearch\bin>cd\
D:\>ren Elasticsearch Elasticsearch-old
D:\>ren elasticsearch-new Elasticsearch
D:\>cd Elasticsearch\bin
D:\>Elasticsearch\bin>elasticsearch-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>elasticsearch-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>
Then, rebuild Tiki index, via command line or web interface
cd \www
php console.php index:rebuild --log
http://127.0.0.1/tiki-admin.php?page=search
- Click on the 'Rebuild Index' button;
- Click on the 'Rebuild' button.
C:\>md D:\Scripts C:\>echo pushd D:\www ^& php console.php index:rebuild --log > "D:\Scripts\Rebuild_Search_Index.bat C:\>schtasks /create /ru SYSTEM /tn "Rebuild Search Index" /tr "D:\Scripts\Rebuild_Search_Index.bat" /sc daily /st 03:00 SUCCESS: The scheduled task "Rebuild Search Index" has successfully been created . C:\>
It is necessary to use a batch file to create a scheduled task with multiple actions.
C:\>netsh advfirewall firewall add rule name="Open Port 80" dir=in action=allow protocol=TCP localport=80 Ok. C:\>
If you have performance issues (can be related to your specific environment), add the following in your httpd.conf file:
AcceptFilter http none AcceptFilter https none EnableMMAP off
A few times in the instructions above, there is "From the Command Prompt (Admin)" -> C:\>setx PATH...
You need to exit after each, and thus open a new command prompt for each.