TRIM on Cygwin
Why
- Manage Tikis on your local Windows instance
- It is possible to manage remote Windows instances by SSH but it's out of scope of the current docs.
- From Windows, manage Remote Tikis that are on GNU/Linux
Caveat
- Performance is likely not as good as if running Tiki natively: Apache for Cygwin is not as high-performance as Apache for Windows on the same hardware. This is to be expected, because Cygwin emulates a Unix environment on a "foreign" operating system, while Apache for Windows uses Windows code in its own native environment. First benchmark results have shown that Apache for Cygwin is about 30% slower than native Apache for Windows counterpart.
- But this quote is old, so it deserves to be benchmarked.
- Is this statement about TRIM or really about Tiki?
After some tests and usage...
- Marc Laporte and Jonny Bradley have found issues with the PHP that comes from Cygwin: https://cygwin.com/faq/faq.html#faq.using.anti-virus and thus, we'll revert to native PHP.
- Victor (kroky6) and Marc had similar unreliability with MariaDB (segfaults): so we'll revert to native MariaDB.
- TRIM will be ported to Symfony so we can run as much as possible in PHP
Therefore, this page should probably be updated.
How to install
Install Cygwin normally. If you are behind a corporate firewall, you may need to select "Use System Proxy Settings" for the Internet Connection (instead of "Direct Connection")
And the select the following packages:
Category: Admin
- cron
Category: Archive
- bzip2
Category: Database
- mysql (client)
- sqlite3 (client)
Category: Devel
- make
- subversion (do not install this if you intend to use TortoiseSVN)
Category: Net
- rsync
- openssh
Category: PHP
- php
- php-ctype
- php-curl
- php-iconv
- php-json
- php-mysqli
- php-pdo_sqlite
- php-phar
- php-sqlite3
- php-zip
- php-zlib
For Tiki instances
If you are also going to install Tiki instances in the same Cygwin, you also need:
Category: Database
- mysql-serverpdo
Category: PHP
- php-calendar
- php-fileinfo
- php-gd
- php-intl
- php-mbstring
- php-pdo_mysql
Category:Devel
- patch (This is to patch some of Tiki's external dependencies from Composer)
Nice to have packages
- curl (to query Elasticsearch)
- nano (text editor)
- wget (to fetch files from websites)
- mc (file management)
- opcache (for better performance)
See also: http://techne.alaya.net/?p=13579
Cygdrive and paths
When in the Cygwin shell, you will a familar set of folders, such as /etc /home /var ... To access files in Windows, use the cygdrive
Using TortoiseSVN instead of Subversion from Cygwin
Why use TortoiseSVN?
- Having TortoiseSVN can make it easier for some site admins
- TortoiseSVN gives you both GUI and CLI (when requested during install)
- TortoiseSVN has a Proxy Setting that worked while setting same proxy in Cygwin has not worked for SVN
Either use Cygwin's SVN or TortoiseSVN, but not both.
- "You must not use a native Windows client and the Cygwin client on the same working copy. And if you share a working copy over a network you must not use a Linux and a Windows client on the same working copy."
- "But you can only use different clients if they all use the same version of the Subversion library." -> This is looking for trouble. Best just to use the same for both.
If you intend to use TortoiseSVN instead of the Cygwin packages, ensure that TortoiseSVN svn client is available form Cygwin shell:
- Open the Cygwin shell
- Type "which svn"
- You should see something like: "/cygdrive/c/Program Files/TortoiseSVN/bin/svn"
Once Cygwin is all set up, you can install TRIM normally.
Todo
- Document how to start set Cygwin Apache as a service
- What is the interest of Cygwin Apache?
- Updates are handled by Cygwin
- What is the interest of Cygwin Apache?
- Document how to open firewall for a server, and close firewall for a personal computer
- Document sending mail
- Go through TRIM Test Plan
Ideas for the future
- Make a 1-line command line to copy-paste: https://cygwin.com/faq.html#faq.setup.cli
- And later, when it's all nice and stable, let's make a TRIM package for Cygwin
- Automate to have a locally running copy (make clone) on Windows of a live site (which is on GNU/Linux)
- Test php-opcache to measure performance gain (it would be great to have a quick performance check in tiki-check.php
- Investigate https://github.com/babun/babun