23rd Feb 2012
 
Setting up lamp on Slackware® linux
Linux, Apache, Mysql, Php.

Setting up a Lamp stack on Slackware 12.

First check you have a working installation of the Apache web server. On a Slackware system this is the hypertext transfer protocol daemon or httpd. As root do this:
httpd -k start
Pointing your browser to 127.0.0.1 should result in the words 'it worked'. If that was not the case then you should check: 1) your running Linux and 2) you have Apache webserver installed.
Now do:
httpd -k stop
It is recommended that you do not invoke the daemon directly, but use
apachectl start
or edit your config files to start the daemon on boot.
Enabling apache to parse Php files.
you will need to edit the httpd config files to allow apache to parse php files, for Slackware 12, the config files are at '/etc/httpd/httpd.conf'. find the line
#Include /etc/httpd/mod_php.conf
and uncomment it, i.e remove the # at the start of the line. also you need to uncomment the line
#AddType text/html .shtml
and add the type php, so that it now reads '
AddType text/html .shtml .php
Configuring MySQL database.
You should have MySQL installed in order to use it you will need initalise the grant tables and set passwords for the accounts in the grant tables. run as the user 'mysql'
 mysql_install_db
If all goes well you should see something like:
Installing all prepared tables
Fill help tables

To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h valkyrie password 'new-password'
See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
        
        
Starting the MySQL database.
As the user 'mysql' issue the following command:
/usr/bin/mysqld_safe &
then issue the following command:
/usr/bin/mysqladmin -u root password 'new-password'
Valid CSS!
Valid XHTML 1.0 Transitional
Slackware linux.