|
Search:
Advanced search
|
Browse by category:
|
Glossary | Contact Us |
Installing SilverStripe Content Management System under Mac OS X |
|||||
Installing Silverstripe CMS on Mac OS X
21 September 2008 Ian Piper Pre-requisites These instructions assume you have PHP 5.x and MySQL 5.x installed. If you haven't, look on the entropy.ch site and the MySQL.com site respectively for pre-built binary packages and instructions on installing them. Both work with my current setup (Mac OS X Leopard 10.5.5). Downloading I downloaded Silverstripe from here: http://www.silverstripe.com/ Download the package. It will be called something like silverstripe-v2.2.2.tar. Unpacking Untar this in the folder /Library/WebServer/Documents. Either double-click it from the Finder or open a Terminal and use the command tar xvf silverstripe-v2.2.2.tar This gives you a folder called silverstripe-v2.2.2. You will need to change the folder name to silverstripe. You can now delete the tar file. Starting the installation Now go to a web browser and open up this url: http://localhost/silverstripe/ I saw an information screen showing that I needed to add a few configuration details: There were more error messages further down the page: Configuration cleanup So, some cleaning up is clearly in order. First, the installation doesn’t know the right username and password for my MySQL installation. So I put that right: you may be using the username root, and if that has a password you will see this error too, so add your password in the relevant place on the form. Make sure that this user has the rights to create databases (root does). I also changed the admin username and password. I thought I might as well sort out the other problems while we are at it. In common with most CMS systems, Silverstripe needs to be able to write to certain folders, so I needed to run the following commands (in the silverstripe folder, using the Terminal): mycomputer:silverstripe ian$ chmod a+rw .htaccess mycomputer:silverstripe ian$ chmod a+rw mysite/ mycomputer:silverstripe ian$ chmod a+rw tutorial/ mycomputer:silverstripe ian$ chmod a+rw assets/ A quick check shows that the relevant rights are now set (shown in bold): mycomputer:silverstripe ian$ ls -al total 280 drwxr-xr-x@ 24 ian admin 816 22 May 07:23 . drwxrwxr-x 26 root admin 884 21 Sep 19:05 .. -rw-rw-rw-@ 1 ian admin 0 20 Aug 2007 .htaccess -rw-r--r--@ 1 ian admin 1553 6 Jan 2008 COPYING -rw-r--r--@ 1 ian admin 49047 13 Mar 2008 ChangeLog -rw-r--r--@ 1 ian admin 668 11 Mar 2007 INSTALL -rw-r--r--@ 1 ian admin 460 16 Jan 2008 Makefile -rw-r--r--@ 1 ian admin 1092 12 Nov 2007 UPGRADING drwxrwxrwx@ 3 ian admin 102 22 May 07:23 assets drwxr-xr-x@ 6 ian admin 204 22 May 07:23 auth_openid -rw-r--r--@ 1 ian admin 327 17 Sep 2007 check-php.php drwxr-xr-x@ 11 ian admin 374 22 May 07:23 cms -rw-r--r--@ 1 ian admin 1725 21 Sep 2007 config-form.css -rw-r--r--@ 1 ian admin 9125 29 Oct 2007 config-form.html -rw-r--r--@ 1 ian admin 318 24 Sep 2007 favicon.ico -rw-r--r--@ 1 ian admin 359 1 Feb 2007 index.html -rw-r--r--@ 1 ian admin 45 1 Feb 2007 index.php -rw-r--r--@ 1 ian admin 34138 22 Apr 00:37 install.php drwxr-xr-x@ 23 ian admin 782 22 May 07:23 jsparty drwxrwxrwx@ 7 ian admin 238 22 May 07:23 mysite -rw-r--r--@ 1 ian admin 5671 13 Mar 2008 rewritetest.php drwxr-xr-x@ 30 ian admin 1020 22 May 07:23 sapphire drwxr-xr-x@ 4 ian admin 136 22 May 07:23 themes drwxrwxrwx@ 7 ian admin 238 22 May 07:23 tutorial mycomputer:silverstripe ian$ OK, I could have been more pernickety. It actually says that the user _www needs to have those rights. I just assigned them to all users rather than risking any problems that might have arisen from changing the file ownership to _www. So, with all those tweaks done, I clicked on the button marked “Re-check requirements”. It came back all green. The installation Great. I had a moment’s doubt about whether I needed to install BlackCandy or an empty template, so I opted to leave the default value. I clicked the button marked “Install SilverStripe”. After a few seconds I saw this warning message: Sorting out the mod_rewrite / AllowOverride problem So I checked what I could. First, I looked in my /etc/apache2/httpd.conf file for mod_rewrite: LoadModule rewrite_module libexec/apache2/mod_rewrite.so Seemed OK. So I looked for AllowOverride: # First, we configure the "default" to be a very restrictive set of # features. # <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory> [...] # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride None [...] # # "/Library/WebServer/CGI-Executables" should be changed to whatever your Scrip$ # CGI directory exists, if you have that configured. # <Directory "/Library/WebServer/CGI-Executables"> AllowOverride None Options None Order allow,deny Allow from all </Directory> That was it - no other references, and in particular none for the silverstripe installation. I am guessing at this stage that because it didn’t know what webserver I am running it didn’t know how to set the option it needed to. So, I did a bit of searching, and found that I needed to add this directive to my httpd.conf file (note that you have to use sudo or su to root in order to have permissions to edit the httpd.conf file): <Directory "/Library/WebServer/Documents/silverstripe"> Options FollowSymLinks SymLinksifOwnerMatch AllowOverride All Order allow,deny Allow from all </Directory> Having done this, I did a Shift-Reload of the web page and saw (after a brief redirect message), this encouraging message: Tidying up the installation files I decided to take the advice and allow the installation to clear out the install files, but this didn’t work:  So instead I went to the Terminal to sort it out: mycomputer:silverstripe ian$ rm install.php index.php rewritetest.php check-php.php config-form.css config-form.html index.html mycomputer:silverstripe ian$ Logging in Having finished all the cleanup, I clicked the link to load the CMS, After putting in my admin username and password, I saw this: So, a successful installation. |
|||||
Powered by
KnowledgebasePublisher (Knowledgebase software)