Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Step-by-step Install Guide for Zenwalk-5.0.

Step-by-step Install Guide for Zenwalk-5.0: Difference between revisions

From MoodleDocs
No edit summary
(add Category:Installation & minor edit)
 
(22 intermediate revisions by one other user not shown)
Line 1: Line 1:
In the procedure given below, it is assumed that you have a working internet connection and that you have updated netpkg meta data from the required mirror.
==Installing Apache, MySQL and PHP==
 
If you have a working installation of Apache, MySQL, PHP, you can skipt this section and directly go to '''[[Installing Moodle]]'''.
 
In the procedure given below, it is assumed that you have a working internet connection and that you have updated netpkg meta data from the required mirror.  
 
==Install Zenwalk 5.0==


Login as root. In a terminal do the following:
Login as root. In a terminal do the following:


root[~]# netpkg php
    root[~]# netpkg apache php mysql


Accept 1)Install option when netpkg asks for choice. Similarly install any other dependencies. Now php is installed on the system. Now install apache by doing
Accept 1)Install option when netpkg asks for choice. Install all other dependencies. Now Apache, PHP, and MySQL are installed.


[root]# netpkg apache
In order for PHP to recognize MySQL, change a line in the 'Dynamic Extensions' section of /etc/apache/php.ini which reads


After this, install mysql and any related dependencies by doing
    ;  extension=msql.so
 
to


     root[~]# netpkg mysql
     extension=mysql.so


At this stage php, apache and mysql have been installed. Now we need to enable starting of apache and mysql server after booting. To do this, right-click on the desktop and goto Zenwalk Menu > System > Zenpanel > Starup services end enable them.
and save this file.


Since Moodle uses PHP, we have to enable PHP support in Apache. So, edit /etc/apache/httpd.conf as root.
Since Moodle uses PHP, we have to enable PHP support in Apache. So, edit /etc/apache/httpd.conf as root. Change the line at the very bottom of /etc/apache/httpd.conf that says:
Change the the line at the very bottom of /etc/apache/httpd.conf that says:


# PHP support
    # PHP support
#Include /etc/apache/mod_php.conf
    #Include /etc/apache/mod_php.conf


to
to


# PHP support
    # PHP support
Include /etc/apache/mod_php.conf
    Include /etc/apache/mod_php.conf


Add index.php as a DirectoryIndex in /etc/apache/httpd.conf. To do this, change
Add index.php as a DirectoryIndex in /etc/apache/httpd.conf. To do this, change


     DirectoryIndex index.html
     # DirectoryIndex: sets the file that Apache will serve if a directory
    # is requested.
    #
    <IfModule dir_module>
        DirectoryIndex index.html
    </IfModule>
to
    # DirectoryIndex: sets the file that Apache will serve if a directory
    # is requested.
    #
    <IfModule dir_module>
        DirectoryIndex index.php index.html index.htm
    </IfModule>
 
Save the modifications to /etc/apache/httpd.conf. We need to enable starting of Apache and MySQL daemons after every booting. To do this, right-click on the desktop and goto '''Zenwalk Menu > System > Zenpanel > Starup services''' and enable them.
 
In a terminal as root issue the command
 
    root[~]#su - mysql
 
This starts MySQL. Now install a blank database by issuing the command
 
    mysql[~]$ mysql_install_db
 
After this, exit from the MySQL prompt by issuing the command
 
    mysql[~]$ exit
 
Now start the mysql server by the command
 
    root[~]# /etc/rc.d/rc.mysqld start


to
You should see this:
 
    root[~]# Starting mysqld daemon with databases from /var/lib/mysql
 
the terminal will stay like this. You can get a prompt back by typing CTRL-C.


# DirectoryIndex: sets the file that Apache will serve if a directory
Now create a root password for mysql:
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.php index.html index.htm
</IfModule>


Save the modifications to /etc/apache/httpd.conf. Now start the Apache web server by issuing the command
    mysqladmin -u root password newpassword


[root]#/etc/rc.d/rc.httpd start
An example of the root password for mysql:


In a terminal as root issue the command
  root[~]# mysqladmin -u root password zenwalk


root[username]#su - mysql
To check whether PHP is working properly or not create a file phpinfo.php in /var/www/htdocs using a text editor and put the following lines in it:


Now install a blank database by issuing the command
  <?php phpinfo(); ?>


mysql[~]$ mysql_install_db
Save the file. Now open this file in browser using the URL http:/localhost/phpinfo.php. This should display PHP configuration information.


Now exit from the mysql prompt by issuing the command
'''Installing Moodle'''


mysql[~]$ exit
Now follow instructions given in [[Installing_Moodle]].
logout
root[username]#


Start the mysql server by the command
==See also==


root[~]# /etc/rc.d/rc.mysqld start
[[Category:Installation]]

Latest revision as of 17:47, 13 February 2009

Installing Apache, MySQL and PHP

If you have a working installation of Apache, MySQL, PHP, you can skipt this section and directly go to Installing Moodle.

In the procedure given below, it is assumed that you have a working internet connection and that you have updated netpkg meta data from the required mirror.

Install Zenwalk 5.0

Login as root. In a terminal do the following:

   root[~]# netpkg apache php mysql

Accept 1)Install option when netpkg asks for choice. Install all other dependencies. Now Apache, PHP, and MySQL are installed.

In order for PHP to recognize MySQL, change a line in the 'Dynamic Extensions' section of /etc/apache/php.ini which reads

   ;   extension=msql.so

to

   extension=mysql.so

and save this file.

Since Moodle uses PHP, we have to enable PHP support in Apache. So, edit /etc/apache/httpd.conf as root. Change the line at the very bottom of /etc/apache/httpd.conf that says:

   # PHP support
   #Include /etc/apache/mod_php.conf

to

   # PHP support
   Include /etc/apache/mod_php.conf

Add index.php as a DirectoryIndex in /etc/apache/httpd.conf. To do this, change

   # DirectoryIndex: sets the file that Apache will serve if a directory
   # is requested.
   #
   <IfModule dir_module>
       DirectoryIndex index.html
   </IfModule>

to

   # DirectoryIndex: sets the file that Apache will serve if a directory
   # is requested.
   #
   <IfModule dir_module>
       DirectoryIndex index.php index.html index.htm
   </IfModule>

Save the modifications to /etc/apache/httpd.conf. We need to enable starting of Apache and MySQL daemons after every booting. To do this, right-click on the desktop and goto Zenwalk Menu > System > Zenpanel > Starup services and enable them.

In a terminal as root issue the command

   root[~]#su - mysql

This starts MySQL. Now install a blank database by issuing the command

   mysql[~]$ mysql_install_db

After this, exit from the MySQL prompt by issuing the command

   mysql[~]$ exit

Now start the mysql server by the command

   root[~]# /etc/rc.d/rc.mysqld start

You should see this:

   root[~]# Starting mysqld daemon with databases from /var/lib/mysql

the terminal will stay like this. You can get a prompt back by typing CTRL-C.

Now create a root password for mysql:

   mysqladmin -u root password newpassword

An example of the root password for mysql:

  root[~]# mysqladmin -u root password zenwalk

To check whether PHP is working properly or not create a file phpinfo.php in /var/www/htdocs using a text editor and put the following lines in it:

  <?php phpinfo(); ?>

Save the file. Now open this file in browser using the URL http:/localhost/phpinfo.php. This should display PHP configuration information.

Installing Moodle

Now follow instructions given in Installing_Moodle.

See also