Visit our website:
www.linutop.com


Usage/LAMP

From LinutopWiki

Turning a Linutop into a web server is easy.

You need to switch to persistent mode first.

The installation of the server elements can be done using apt-get or synaptic.

Contents

Web server

To install the Apache web serveur install the apache2 package:

sudo apt-get install apache2

To make sure it is installed start firefox and go to the url "http://localhost/". The web pages have to be copied in /var/www.


PHP

To install PHP install the libapache2-mod-php5 package:

sudo apt-get install libapache2-mod-php5

To make sure it works edit /var/www/index.html:

sudo mousepad /var/www/index.html

And type:

<?php phpinfo(); ?>

Go to http://localhost/index.php in firefox, you should see the PHP informations page.

If it doesn't work restart the web server:

sudo /etc/init.d/apache2 restart

Databse server

To install a database server (MySQL) install:

sudo apt-get install mysql-server php5-mysql

A password will be prompted for the root user. It is the MySQL administrator login/password, needed to perform actions on databases.

To install a frontend for the sql server use:

sudo apt-get install phpmyadmin

A question about phpmyadmin configuration will be asked, select 'apache2' and validate.

Go to "http://localhost/phpmyadmin" in firefox to use it. The login is root and the password the one you typed when prompted.

Images trouble

If the images are not displayed use the following commands in a terminal:

sudo -s
cat > /etc/apache2/conf.d/sendfile-mmap.conf << EOF
EnableSendfile off
EnableMMAP off
EOF
exit

And restart the web server:

sudo /etc/init.d/apache2 restart