Feb 122011

You have a full slackware installed and you want to use it as a LAMP server? here is a basic setup with phpmyadmin, if you like pretty interfaces for database administration (optional), in some easy steps (as root).
This is a superquick guide, for more informations consider reading mRgOBLIN excellent article.

let’s start 🙂

– make executable the init scripts of httpd (apache) and mysql

chmod +x /etc/rc.d/rc.{mysqld,httpd}

– initialize the database and create standard mysql tables (I suggest to read output on screen, it’s interesting)

mysql_install_db --user=mysql

– start the database daemon and execute a post initialization script: you need to input some data for setup (I suggest to accept defaults to questions)

/etc/rc.d/rc.mysqld start

– edit /etc/httpd/httpd.conf: uncomment a line to enable mod_php and add index.php to the DirectoryIndex directive

Include /etc/httpd/mod_php.conf
    DirectoryIndex index.php index.html

– get phpmyadmin from slackbuilds.org, build the package and install it

wget http://slackbuilds.org/slackbuilds/13.37/network/phpmyadmin.tar.gz
tar xf phpmyadmin.tar.gz
cd phpmyadmin
wget $( grep tar.xz phpmyadmin.info | cut -d\" -f2 )
chmod +x phpmyadmin.SlackBuild
PKGTYPE=txz ./phpmyadmin.SlackBuild
installpkg /tmp/phpmyadmin-*.txz

– start the webserver

/etc/rc.d/rc.httpd start

congratulations, your LAMP server is up and running! 😀
your DocumentRoot is /var/www/htdocs/, put your stuff in there.
you are also free to look around in your phpmyadmin: use the root credentials setted during the mysql_secure_installation step

links http://localhost/phpmyadmin/

if you are on another host you can substitute localhost with the output of this command on the server

/sbin/ifconfig | grep "inet addr" | grep -v "" | cut -d: -f2 | cut -d' ' -f1

  6 Responses to “Slackware LAMP server with phpmyadmin in a few easy steps”

  1. […] tried to put down some small suggestions on a basic LAMP setup. […]

  2. nice and concise guide to installing MySQL , the type I like!
    only one thing not sure about :
    cp /etc/my-medium.cnf  /etc/my.cnf
    I guess if you don’t select from one of the three my-smallmediumorlarge.cnf a default selects?

  3. still relevant for Slackware14.2 just need 14.2 pkg for phpmyadmin from slackbuilds

  4. thought this would allow be to edit in htdocs #usermod -a -G apache
    ls -ld /var/www/htdocs
    drwxr-xr-x 5 root root 4096 Oct 10 15:44 /var/www/htdocs

    mmm create dir in htdocs to work in
    & chmod ?

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>