EGGS.doc - Vedyadhara

outstandingmaskΔιαχείριση Δεδομένων

29 Νοε 2012 (πριν από 4 χρόνια και 8 μήνες)

230 εμφανίσεις

Installing Moodle as a Debian package

Using apt
-
get, aptitude or Synaptic

1.

Make sure your PC connected to the internet. (Moodle has been
included with Debian Sarge. You don’t need net connection, if you
have the Debian Sarge CDs or DVDs that are configured
as download
repositories for apt
-
get, aptitude or synaptic). Use one of these:


o


apt
-
get install moodle

o


aptitude install moodle


Manual download

You will probably need to follow this, if you don’t have internet connection
on the PC on which you want to i
nstall moodle.



Download moodle and all the dependencies (if you already don’t have
them) from Stable(
http://packages.debian.org/stable/web/moodle
) or
Testing(
http://packages.debian.org/testing/web/moodle
). Place them
all in the same directory (no matter which).



As root, run the following

command:


dpkg
-
i *.deb



This will unpack and begin the installation of all the downloaded
packages.

Installing moodle from .tgz(.tar.gz) or .zip file

Step 1: Install required packages

Install these packages sing apt
-
get, aptitude or synaptic you ca
n install these
very easily.



Web Server (Apache highly recommended)



Database Server (MySQL or PostgreSQL recommended)



PHP, PHP
-
MySQL mod (or mod for your database).


For installation of the necessary packages the easiest option to use apt
-
get.

Use the foll
owing command to install apache2, php5 and mysql

apt
-
get install apache2 php5 mysql
-
server php5
-
mysql libapache2
-
mod
-
php5

The mentioned packages are installed along with the dependencies
depending on what was already installed on your Debian system.

Now yo
u may fire up a browser and type localhost to check whether the
apache2 default page is shown,

You can edit the apache configuration files using the text editor gedit by

gedit /etc/apache2/apache2.conf

Mysql installation is already there. Give it a root pa
ssword using

mysqladmin
-
u root password "yourpassword"

You can restart apache 2 by

/etc/init.d/apache2 restart

You can restart mysql by

/etc/init.d/mysql restart

Step 2: Download moodle

Download moodle from
http://download.moodle.org/?lang=en
.

Step 3: Unpack file



For zip file, use
unzip <your_file>
. For tgz(tar.gz), use
tar
-
zxvf
<your
-
file>
. You can also use any of the GUI front
-
ends such as file
-
roller or ark. Yo
u will get a folder moodle (or moodle
-
1.5.2 or
something similar).



Now, suppose you want to install moodle at /var/www/moodle (This
means moodle will be accessible at
http://localhost/mood
le
).
mv
moodle /var/www/

(Most probably you will need to be root to do
this)

Step 4: Start web and database servers



Login as root (if you have not already done so):
su
.



Start your web server. For Apache2,
/etc/init.d/apache2 start
.



Start your database ser
ver. For MySQL,
/etc/init.d/mysqld start

Step 5: Finally install



Go to
http://localhost/moodle

and follow the instructions.

Installing Moodle from CVS

To get the most stable current versi
on of Moodle, you will want to install it’s
scripts directly from the CVS, the versioning system used in the
development of Moodle. Using the CVS also allows you to regularly update
Moodle with the most recent bug fixes and features.

Install php, MySQL and

other needed components

Logged in as the root user (or use the Linux “su” command to get root
privileges) download and install other required software for Moodle (about
41 MB)

apt
-
get install apache2 php5 mysql
-
server php5
-
mysql libapache2
-
mod
-
php5


Setu
p MySQL Database

Set a secure root password for the database

mysqladmin
-
u root password "Password"



Now log in

mysql
-
u root
-
p

Enter your password

Create the Moodle database

mysql> CREATE DATABASE moodle;

mysql> exit;


Get Moodle from CVS

Go to the dire
ctory where Moodle will be installed.

cd /var/www

Get the latest version of Moodle 1.9

Create a data directory and set Moodle directory permissions

Create a directory for user and course files (you should still be in the
/var/www directory)

mkdir moodleda
ta

Set permissions so that Apache can access the files

chown
-
R www
-
data:www
-
data moodle

chown
-
R www
-
data:www
-
data moodledata


Change Apache to use Moodle as the web site

Note that the server comes with Apache running and looking at the
/var/www directory
. But there is nothing in that folder, so one just gets a
redirect. Edit as follows to have it point at Moodle instead:

nano /etc/apache2/sites
-
available/default


You can change other values like ServerAdmin if appropriate. For all
changes, you should rest
art Apache for the new settings to take effect.

/etc/init.d/apache2 restart


Other recommended settings

Next, make three changes to php.ini

nano /etc/php5/apache2/php.ini

This will allocated more memory and allow files to be uploaded up to
80MB. This shoul
d be enough for most multi
-
media files. Hard drive space
is cheap and the default is only 2MB. It is recommended that you change the
settings to the following values:

memory_limit = 40M

post_max_size = 80M

upload_max_filesize = 80M

Updating from CVS

To upd
ate with the most recent fixes to Moodle, issue the following
commands

cd /var/www/moodle

cvs
-
q update













MediaWiki Installation

Media Wiki Requirements

* Apache Web server

* PHP 4.2 or greater

* MySQL 3.23.23 or greater

# apt
-
get update

Then ins
tall the mediawiki package. For example, using apt
-
get:

# apt
-
get install mediawiki

The MediaWiki installation should now be done.
Remember
: if you are not
familiar with APT and temporarily added Etch sources above,
now

is the
time to remove them. Remove t
he sources.list line you added, then update
your APT index again.

Configure MySQL

Most of all you need to apply mysql root password.

mysqladmin
-
u root password 'password'

Now log in

mysql
-
u root
-
p

Enter your password

Create the Wiki database

mysql> CREA
TE DATABASE wikidb;

mysql> exit;

MediaWiki configuration

Configuration is done at
http://localhost/mediawiki/config

(substitute
localhost with your hostname).

Wordpres
s Installation

Wordpress Requirements

* Apache Web server

* PHP 4.2 or greater

* MySQL 3.23.23 or greater

* The mod_rewrite Apache module

We can use the following command to install Wordpress

Configure MySQL

Most of all you need to apply mysql root passwor
d.

mysqladmin
-
u root password 'password'

Now log in

mysql
-
u root
-
p

Enter your password

Create the Wordpress database

mysql> CREATE DATABASE wordpress;


mysql> GRANT ALL PRIVILEGES ON *.* TO
'wordpress'@'localhost'


-
> IDENTIFIED BY 'wordpresspasswor
d' WITH
GRANT OPTION;

mysql> exit;

#apt
-
get install wordpress

This will install the wordpress now you need to go to /var/www/wordpress
folder to setup apache to point to /var/www/wordpress. See the examples
/apache.conf

Create a file called wordpres
s under /etc/apache2/sites
-
available/ and enter
the following and save the file

Alias /blog /var/www/wordpress

<Directory /var/www/wordpress>

Now you need to enable this site using the following command

#a2ensite wordpress

Now reload apache using the follo
wing command

#/etc/init.d/apache2 restart