LampHowTo
LAMP Howto
We won't get into a long article about exactly what LAMP is and stands for, but rather will concentrate on getting it working with the hardware and software at hand. Lamp stands for Linux, Apache, Mysql and Php (sometimes also Perl and/or Python) We will install LAMP using the patterns option in YAST, though it is also possible to do the same from the command line, if you are on a graphics-less server or prefer doing things that way. After starting up Yast and choosing the patterns you should see the option to install a web server and LAMP. Select and installl those packages that fit the pattern. The screenshot below gives an idea:

You can install the lamp pattern from the command line to by doing :
yast2 --install apache2 php5 php5-mysql apache2-mod_php5 mysql mysql-tools
1. Setup the database
mysql -u root -p
If you haven't set up a password for mysql yet, you can do so by doing mysql -u root instead. You should see the mysql> prompt.
CREATE DATABASE moodle DEFAULT CHARACTER SET utf9 COLATE utf8_general_ci; GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO moodler@localhost IDENTIFIED BY 'moodlepass'; flush privileges; quit;
Obviously change moodlepass and moodler to the password and user of your choice.
2. Set up Apache
Make sure the apache2 user exists and is in the www group:
useradd -g www apache2
set permissions correctly:
chown -R apache2.www /srv/www chmod -R 750 /srv/www
change Options and AllowOverride? to something sane:
sed -i 's/Options None/Options Indexes Includes FollowSymLinks? SymLinksifOwnerMatch? ExecCGI MultiViews?/' /etc/apache/default-server.conf
The maximum upload size default for Moodle is somewhat small at 16 MBs, so I change this to 256 MBs:
sed -i 's/upload_max_filesize 16M/upload_max_filesize 256M/g' /etc/apache2/conf.d/moodle_include.conf sed -i 's/post_max_size 16M/post_max_size 256M/g' /etc/apache2/conf.d/moodle_include.conf rcapache2 restart 