Katlas installation notes: Difference between revisions
No edit summary |
|||
Line 117: | Line 117: | ||
Note that this will change in mediawiki 1.5, and become a lot easier. |
Note that this will change in mediawiki 1.5, and become a lot easier. |
||
===Add "tour" box=== |
|||
In skins/MonoBook.php, right above the line beginning with |
|||
<?php if( $this->data['language_urls'] ) |
|||
add lines as follows: |
|||
<div class="portlet" id="p-tour"> |
|||
<h5>tour</h5> |
|||
<div class="pBody"> |
|||
<ul> |
|||
<li> <a href="/wiki/5_2">5_2</a> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
(this will surely change as we understand MediaWiki better) |
|||
===Modifying the logo=== |
===Modifying the logo=== |
Revision as of 14:58, 22 September 2005
Okay... these are our notes while trying to setup the wiki on katlas.
Upgrading MySQL
For better or worse, I decided to upgrade MySQL to version 4.0 before doing anything else. I mostly followed these instructions.
Warning: do not install MySQL 4.1. It is incompatible with mediawiki. Install version 4.0.
For this I need three RPMs which are all available with only a little digging at mysql.com
- MySQL-shared-compat-4.0.25-0.i386.rpm
- MySQL-server-4.0.25-0.i386.rpm
- MySQL-client-4.0.25-0.i386.rpm
The first of these is required so we don't break dependencies while upgrading. Install it first, with
- rpm -iv MySQL-shared-compat-4.0.25-0.i386.rpm
Then upgrade the other two packages
- rpm -U MySQL-server-4.0.25-0.i386.rpm
- rpm -U MySQL-client-4.0.25-0.i386.rpm
Note the warning the server install gives --
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h katlas.math.toronto.edu password 'new-password' See the manual for more instructions.
(note however that you need to upgrade the client package before mysqladmin is available to do this!)
I also deleted the local anonymous account, and put a password on the remote anonymous account. (Ask User:Scott for these passwords.)
Apache
I had to fix the server name, from katlas to katlas.math.toronto.edu in /etc/httpd/conf/httpd.conf
I added
AllowOverride FileInfo AllowOverride AuthConfig
in the httpd.conf file, in the section for /var/www/html, so I could use .htaccess files to rewrite the wiki URLs nicely, and to disallow access to phpMyAdmin.
I added a robots.txt file, to protect the wiki internals from spiders. --Scott 12:44, 19 Aug 2005 (EDT)
I moved the document root from /var/www/html to /www/html. (Actually, I moved everything in /var/www to /www) This required the following steps
- in /var/www, as root
cp -R --preserve * /www
- in httpd.conf, replacing /var/www everywhere with /www
- in LocalSettings.php replacing /var/www with /www in the $IP line
- test everything seems to work!
- in /var, as root,
rm -Rf www
--Scott 12:44, 19 Aug 2005 (EDT)
This messed up webalizer, however, so I modified the appropriate line in /etc/webalizer.conf. I also added a section in http.conf to make /usage world-readable. --Scott 13:03, 19 Aug 2005 (EDT)
Restarting apache is best achieved by (as root)
/usr/sbin/apachectl graceful
or
/etc/rc.d/init.d/httpd restart
--Scott 13:17, 19 Aug 2005 (EDT)
Error logs can be found at /var/log/httpd --Scott 10:33, 26 Aug 2005 (EDT)
We had a nasty (to diagnose!) problem with uploading large files. We had to edit /etc/httpd/conf.d/php.conf, modifying the LimitRequestBody line. --Scott 11:08, 23 Aug 2005 (EDT)
creating new accounts
As root, do something like
$ htpasswd -m /www/.htpasswd sally New password: ******* Re-type new password: ******* Adding password for user sally
phpMyAdmin
Just unzip'd it into phpMyAdmin, editted the config.inc.php, created a .htpassword file and added a <Directory> entry to httpd.conf --Scott 10:34, 26 Aug 2005 (EDT)
MediaWiki
I added the namespace "Data", as per these instructions, adding
$wgExtraNamespaces = array(100 => "Data", 101 => "Data talk"); $wgNamespacesWithSubpages = array( -1 => 0, 0 => 0, 1 => 1, 2 => 1, 3 => 1, 4 => 0, 5 => 1, 6 => 0, 7 => 1, 8 => 0, 9 => 1, 10 => 0,11 => 1, 100 => 1, 101 => 1 );
to LocalSettings.php. (For some reason, the namespace "Knot Data" didn't seem to work?)
Enable <math></math> processing
First, I made the /images directory writable.
Next, I installed ocaml (download the sources, ./configure, make world, make bootstrap, make opt, make install). What a pain! After that, go to the math directory under the wiki installation, and run make.
Finally, edit LocalSettings.php to enable TeX.
Later, we started modifying texvc, to allow more symbols from amssymb, and to allow use of Dror's dbnsymb. This required modifications to Texutil.ml, and recompiling texvc (just run make). --Scott 15:10, 29 Aug 2005 (EDT)
Installing the Font dbnsymb
- Download the files dbnsymb.mf and dbnsymb.sty from [1].
- Put dbnsymb.mf at "/usr/share/texmf/fonts/source/public".
- Put dbnsymb.sty at "/usr/share/texmf/tex/latex/misc".
- Run the command "texhhash".
Allowing .zip and .gif uploads
In LocalSettings.php I added the line
$wgFileExtensions = array( 'png','gif','jpg','jpeg','ogg','mp3','pdf','zip');
Marking users as bots
See [2]. Note that all our tables have the prefix mw_. As far as I can tell, you have to guess the user number (or you can log in as that user, and go to Preferences).
Follow the instructions at [3]
- Make changes to LocalSettings.php
- edit the pages Mediawiki:todo, Mediawiki:todo-url, Mediawiki:rolfsen, Mediawiki:rolfsen-url, etc. (these pages are protected.)
Note that this will change in mediawiki 1.5, and become a lot easier.
Add "tour" box
In skins/MonoBook.php, right above the line beginning with
<?php if( $this->data['language_urls'] )
add lines as follows:
tour
- <a href="/wiki/5_2">5_2</a>
(this will surely change as we understand MediaWiki better)
Modifying the logo
Grab , resize it to 145x145, save it as /www/html/w/skins/common/images/katlas.png, and put the line
$wgLogo = "$wgStylePath/common/images/katlas.png";
in LocalSettings.php. Also, grab , convert it to Windows .ico format and save it as favicon.ico at /www/html (not /www/html/w !).
Hacking mediawiki
I modified ImagePage.php so redirects on image pages don't produce a spurious copy of the image. There's a bug on bugzilla, where a different fix is being proposed. There's another (not so good?) solution as an extension.
Later, I modified Math.php, so if a math .png file is missing, but isn't immediately needed, it isn't regenerated. This let's us delete .png files from /w/images/math. To avoid creating too many such .png images in the first place, any robots uploading math formulas should have 'Leave TeX' set in their math preferences. --69.110.11.59 04:59, 21 Sep 2005 (EDT)
Fixing search
In file /www/html/w/skins/MonoBook.php within <form name="searchform" ... > add method="post".
Several Wikis
Allow logins on several wikis on the same server: Add the following line to LocalSettings.php after $wgSiteName = ...
:
ini_set("session.name", "KnotAtlasSession" );
Subversion
We have a working subversion server going now. (I had to find the RHEL3 rpm, but it was easy after that!)
We have several separate repositories, and it's easy (for root) to create more. Go to one of
- http://katlas.math.toronto.edu/svn/KnotAtlas
- http://katlas.math.toronto.edu/svn/KnotTheory
- http://katlas.math.toronto.edu/svn/WikiLink
- http://katlas.math.toronto.edu/svn/QuantumGroups
- http://katlas.math.toronto.edu/svn/Tungsten
to get started.
To create a new repository, type something like
svnadmin create RepositoryName /home/svn
then change the ownership and permissions to match the other repositories. (The easiest way to do this is to login as svn, before using svnadmin, then chmod -R g+w /home/svn/RepositoryName
to allow commits via the web.)
There's read-only public access; to commit changes you'll need to create an account. For windows, download TortoiseSVN, for eclipse use subclipse.
Mathematica notebooks are slightly hard to version control. There are several solutions people have come up with.
- http://www.itwm.fhg.de/as/asemployees/wichmann/nbcache.html A perl script for stripping out the cache data.
- Using the ShowShortBoxForm option in Mathematica [4], which apparently makes notebooks less prone to arbitrary changes independent of real content changes.