SilverStripe on Feisty

April 16th, 2007 7 Comments »

I’m going to cut right to the chase:

To setup SilverStripe:

  1. Server install of Ubuntu.
    • There is a specific server install disc you can download from Ubuntu, check out their site for more information.
    • Select LAMP install during installation.
  2. Add universe and multiverse repositories
    • Run
      sudo nano /etc/apt/sources.list

    • Replace the contents with the following:
      deb http://us.archive.ubuntu.com/ubuntu/ feisty main restricted universe multiverse
      deb-src http://us.archive.ubuntu.com/ubuntu/ feisty main restricted universe multiverse
      deb http://us.archive.ubuntu.com/ubuntu/ feisty-updates main restricted universe multiverse
      deb-src http://us.archive.ubuntu.com/ubuntu/ feisty-updates main restricted universe multiverse
      deb http://security.ubuntu.com/ubuntu feisty-security main restricted universe multiverse
      deb-src http://security.ubuntu.com/ubuntu feisty-security main restricted universe multiverse
    • Run:
      sudo apt-get update
      sudo apt-get install php5-gd
  3. Configure Apache:
    • Run
      sudo nano /etc/apache2/sites-available/ss
      • Place the following into this file:
        NameVirtualHost xxx.xxx.xxx.xxx:80
        <VirtualHost xxx.xxx.xxx.xxx:80>
          ServerAdmin webmaster@domain.tld
        
          DocumentRoot /path/to/silverstripe
          <Directory />
                  Options FollowSymLinks
                  AllowOverride None
          </Directory>
          <Directory /path/to/silverstripe>
                  Options Indexes FollowSymLinks MultiViews
                  AllowOverride All
                  Order allow,deny
                  allow from all
          </Directory>
        
          ErrorLog /var/log/apache2/error.log
        
          # Possible values include: debug, info, notice, warn, error, crit,
          # alert, emerg.
          LogLevel warn
        
          CustomLog /var/log/apache2/access.log combined
          ServerSignature On
        
        </VirtualHost>
      • Replace xxx.xxx.xxx.xxx with the IP address of the server
      • Replace /path/to/silverstripe with the directory you plan on having your silverstripe database in.
      • Replace wemaster@domain.tld with the webmaster’s email address.
    • Run
      sudo a2enmod mod_rewrite

    • Run
      sudo a2ensite ss

    • Run
      sudo nano /etc/apache2/mods-available/rewrite.conf

      • Place the following into this file:
        <IfModule mod_rewrite.c>
          RewriteEngine On
        </IfModule>
  4. Download Silverstripe and extract it into what you set in the ss file. An example to be modified:
    wget http://www.silverstripe.com/assets/downloads/PHPInstaller/silverstripe-v2.0.1.tar.gz
    tar zxvf silverstripe-v2.0.1.tar.gz
    mv silverstripe-v2.0 /path/to/silverstripe
  5. Configure mySQL (change passwords as necessary):
    mysqladmin -uroot password
    <Type in new mysql root user's password>
    mysql -uroot -p
    <Type in mysql root user's password>
    create database silverstripe;
    grant all on silverstripe.* to 'ss_user'@'localhost' identified by 'ss_user_password';
    exit;
  6. Restart apache:
    sudo /etc/init.d/apache restart

The silverstripe installation instructions should take over from here. This is what I setup for my environment, except I included mine in version control. I won’t delve into this subject as it is entirely too broad. Maybe next week.

Also, the Options directive in the Directory directive for /path/to/silverstripe may need to include less options for security, but I haven’t tested it.

Updated 4/20/07 to include mySQL setup and newest version (2.0.1).

Grub Error 18

October 19th, 2006 5 Comments »

Last night I decided to completely redo my webserver at home after viewing some suspicious logs. That, and I’ve made a complete mess out of it. Scattered files, reckless installations, etc.

Being the glutton for punishment that I am, I decided to install the soon to be released Ubuntu 6.10, Edgy Eft. I’m using it now on my laptop; my PC at work; and, as of last night, my webserver. So, I downloaded the Edgy x86 Server disc from here. Installation went rather smoothly. I especially liked that it allowed you to do a base server with LAMP and/or DNS server capabilities pre-installed. So, happy with the smooth install I rebooted.

That’s when it hit the fan. When Grub went to start launching ubuntu I got a pretty “Error 18″ message. Being the “I can figure it out!” kind of guy I am, I tried using the install CD’s rescue mode. I reinstalled Grub….same error. I opened a shell, fought with Vi, went into another tty and vi worked perfectly (of course), edited sources.list and added universe and multiverse. I updated my machine in the hopes that maybe it was a kernel issue or something weird that would be cured this way. I rebooted…

SAME ERROR!

So, I Googled some more and found that it could be a BIOS-related issue, something with the /boot partition not being within the either the first 512 MB or 8 GB. So, I bit the bullet and reinstalled. I made a 500 MB /boot partition at hda1, a 1.5 GB swap partition at hda2, and a 300-some GB / partition at hda3.

I know a 500 MB /boot partition is overkill, but with 320 GB drive I can spare it and I’d rather not have to think about it filling up. Oh, and before I get the standard “there’s no way you could fill up even 32 MB,” I have filled up more than that, more than 64 MB if I recall correctly. This is Ubuntu, not Gentoo, kernels are larger than the 2 MB kernels you are used to. They are more along the lines of 60 MB. I just checked the latest kernel image size…it’s 66 MB. So, I’d rather not worry about my /boot partition filling up.

So, I rebooted, and all is well! So, I get to play around some. I’m going to setup a subversion repository to backup my home directory and distribute it to multiple computers. I’ll try to post about this when I get it done.