Loading...
 
Skip to main content

History: TRIM on Cygwin

Source of version: 55 (current)

Copy to clipboard
            ^ The "Tiki Remote Instance Manager (TRIM)" will go into maintenance mode, and the code will be forked and revamped to become its replacement, now known as the "((Manager|Tiki Manager))". ^

! TRIM on Cygwin 

!! Why
* Manage Tikis on your local Windows instance
** [https://www.howtogeek.com/howto/41560/how-to-get-ssh-command-line-access-to-windows-7-using-cygwin/|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: [https://httpd.apache.org/docs/1.3/cygwin.html#diff|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?

{REMARKSBOX(type="warning" title="2018-05-11 Update")}
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.{REMARKSBOX}

!! How to install
Install [https://cygwin.com/|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 [https://cygwin.com/cygwin-ug-net/using.html#cygdrive|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 {sign user="marclaporte" datetime="2017-09-21T07:50:50+00:00"}

Either use Cygwin's SVN or TortoiseSVN, but not both.
* [https://tortoisesvn.net/faq.html#multiclients|"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."]
* [https://tortoisesvn.net/faq.html#multiclients|"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? {sign user="Chealer9" datetime="2017-09-26T16:40:47+00:00"}
*** Updates are handled by Cygwin {signature}
* Document how to open firewall for a server, and close firewall for a personal computer
* Document sending mail
* Go through ((dev: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 [https://cygwin.com/packaging-contributors-guide.html|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 ((Check|tiki-check.php))
* Investigate https://github.com/babun/babun

!! Related
* [http://wikisuite.org/How-to-install-WikiSuite-on-Windows#Download_and_install_Tiki|How to install Tiki on Apache and MariaDB for Windows ]