Drupal: Difference between revisions
No edit summary |
m (User:Grugnog moved to Drupal) |
(No difference)
|
Revision as of 07:11, 2 January 2008
Installing software
Start the 'Terminal' activity (on the far right of the menu bar).
Get root access:
su
You should now see a prompt that looks like:
bash-3.2#
Install the various tools we will need:
yum install mysql mysql-server lighttpd lighttpd-fastcgi php php-mysql php-gd
Basic Configuration
Give MySQL a root password:
mysqladmin -u root password YOUR-ROOT-MYSQL-PASSWORD
Go to the /etc directory:
cd /etc/
Edit the php.ini file (with your favorite editor):
nano php.ini
Add the following line to the very bottom of the file:
cgi.fix_pathinfo = 1
Edit the lighttpd configuration file and enable FastCGI:
nano lighttpd/lighttpd.conf
- Uncomment "mod_fastcgi" line, in the server.modules section
- Uncomment the fastcgi.server section (all ~8 lines of it)
XO Friendly MySQL Configuration
Copy in the low memory configuration template:
cp /usr/share/mysql/my-small.cnf /etc/my.cnf
Uncomment the following lines:
skip-networking skip-bdb
In the section [mysqld] add the line:
skip-innodb
Service Startup
Start the 2 services manually and check for any errors:
/etc/init.d/lighttpd start /etc/init.d/mysqld start
If you only plan on using Drupal occasionally you can simply put those 2 commands in a shell script (e.g. /root/start-web.sh) and run it as needed. This will save some memory, so your system will run faster the rest of the time.
Alternatively you can start these services on boot automatically by running:
/sbin/chkconfig --levels 235 lighttpd on /sbin/chkconfig --levels 235 mysqld on
When you are done, start the 'Browse' activity, and go to the URL 'localhost' - you should see the lighttpd placeholder page.
Install Drupal
Switch back to the Terminal activity, and change to the web root directory:
cd /srv/www/lighttpd/
Clean it up, and change ownership:
pwd rm * chown olpc:olpc .
Switch back to our regular (non-root) user, and go to our home directory:
exit cd ~
Download and extract Drupal (replace x.x with the latest Drupal stable version, currently 5.5):
wget http://drupal.org/files/projects/drupal-x.x.tar.gz tar -zxvf drupal-x.x.tar.gz
Move the contents of the drupal-x-x directory into the webroot:
mv drupal-x.x/* drupal-x.x/.htaccess /srv/www/lighttpd/
Change to the web root directory, create a files directory (for uploads) and adjust permissions on this and the settings.php file:
cd /srv/www/lighttpd/ mkdir files chmod a+w files chmod a+w sites/default/settings.php
Follow the regular Drupal installation process:
- Create the database: http://drupal.org/getting-started/5/install/create-database/mysql
- Run the installation script: http://drupal.org/getting-started/5/install/run-script
- Configure your site: http://drupal.org/getting-started/5/install/configure
- Set up cron: http://drupal.org/getting-started/5/install/cron
And you are all set - congratulations!