Easy Steps to Setup LAMP in Slackware 14.0
LAMP is a combination of free, open source software. The acronym LAMP refers to the first letters of Linux (operating system), Apache HTTP Server, MySQL (database software), and PHP, Perl or Python, principal components to build a viable general purpose web server.
The exact combination of software included in a LAMP package may vary, especially with respect to the web scripting software, as Perl or Python are sometimes dropped from the stack. Similar terms exist for essentially the same software suite (AMP) running on other operating systems, such as Microsoft Windows (WAMP), Mac OS (MAMP), Solaris (SAMP), iSeries (iAMP), or OpenBSD (OAMP).
Though the original authors of these programs did not design them all to work specifically with each other, the development philosophy and tool sets are shared and were developed in close conjunction. The software combination has become popular because it is free of cost, open-source, and therefore easily adaptable, and because of the ubiquity of its components which are bundled with most current Linux distributions.
My Unixmen Test Server:
root@Slackware:~# uname -a Linux Slackware 3.2.29 #2 SMP Mon Sep 17 14:19:22 CDT 2012 x86_64 Intel(R) Core(TM)2 Quad CPU Q9300 @ 2.50GHz GenuineIntel GNU/Linux root@Slackware:~#
Let’s begin with Apache:
#slackpkg install httpd
Now start httpd via:
root@Slackware:~# httpd -k start Or #chmod +x /etc/rc.d/rc.httpd #/etc/rc.d/rc.httpd restart
Check via the browser if Apache is working:
http://ip of http://hostname
Please note that the Document Root exist under /var/www/htdocs
#slackpkg install mysql
Start MySQL Server and copy the example configuration:
root@Slackware:~# cp /etc/mysql/my-small.cnf /etc/my.cnf
root@Slackware:~# /usr/bin/mysql_install_db Installing MySQL system tables... OK Filling help tables... OK 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 Slackware password 'new-password' Alternatively you can run: /usr/bin/mysql_secure_installation which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. 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 mysql-test-run.pl cd /usr/mysql-test ; perl mysql-test-run.pl Please report any problems with the /usr/bin/mysqlbug script! root@Slackware:~#
root@Slackware:~# chown -R mysql:mysql /var/lib/mysql
#chmod +x /etc/rc.d/rc.mysqld
#/etc/rc.d/rc.mysqld restart root@Slackware:~# 130402 23:25:19 mysqld_safe Logging to '/var/lib/mysql/Slackware.err'. 130402 23:25:19 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysq
root@Slackware:~# ps -ef | grep sql root 5689 1 0 23:27 pts/0 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysql/mysql.pid --skip-networking mysql 5945 5689 0 23:27 pts/0 00:00:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --skip-networking --log-error=/var/lib/mysql/Slackware.err --pid-file=/var/run/mysql/mysql.pid --socket=/var/run/mysql/mysql.sock --port=3306 root 5964 1757 0 23:28 pts/0 00:00:00 grep sql
Make MySQL root password:
In this example the root password is unixmen.
root@Slackware:~# mysqladmin -u root password unixmen root@Slackware:~# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.5.29 MySQL Community Server (GPL) Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
#slackpkg install php
Uncomment #Include /etc/httpd/mod_php.conf on /etc/httpd/httpd.conf
addtype application/x-httpd-php .php .php3 .php4 .php5
Make the PHP page info:
<?php phpinfo() ?>
Restart Apache to enable the PHP configurations:
root@Slackware:~# /etc/rc.d/rc.httpd restart
Open the link to PHP info page http://ip/info.php
Its working. Please enjoy your new server.
Like us on Facebook
We need your assistance to stay live
This week Top Posts
- Top Things To Do After Installing Ubuntu 13.10 'Saucy Salamander' : Ubuntu 13.10 Saucy Salamander will be released on coming October 17th with many new salient featur...0 comments |
- Fedora 21 Scheduled For Release In October : For Fedora users, just keep calm and use Fedora 20 for now. Fedora Developers has announced that F...1 comment |
- How To Upgrade From Ubuntu 13.04 Raring To Ubuntu 13.10 Saucy Salamander : Ubuntu 13.10 Saucy will be released on October 17th. Hope it will come with lot of improvements and ...0 comments |
- Install LAMP Server (Apache, MySQL or MariaDB, PHP) On Ubuntu 13.10 : Updated January 12, 2014 LAMP is a combination of operating system and open-source software stack. ...0 comments |
- Install lamp with 1 command in Ubuntu 12.10, 13.04 Raring Ringtail & LinuxMint13 : Updated: 10/09/2012 :LAMP (Linux, Apache, MySQL and PHP) is an open source Web development platform ...0 comments |
- How to Install uTorrent Client on Ubuntu/Debian/Linux Mint : uTorrent is a lightweight and efficient BitTorrent client for Linux, Windows OS and Mac OS. The inst...0 comments |
- Fedora 21 Scheduled For Release In October
- Install Uget Download Manager In Ubuntu, Fedora, Debian
- Download Elementary OS ‘Luna’ Official Wallpapers
- Install Power Commands 0.1.5 On Ubuntu 14.04/13.10/12.10/12.04
- 5 Android Apps that’s Going to Make Running Your Business Less Stressful
- Puppet agent Install Using Script
- Install Corosync and Pacemaker On CentOS 6.5
- Install Fail2Ban On Ubuntu Server 13.04/13.10
- How To Install Google Chrome in Fedora 20, 19, 18
- How to surf using Tor Browser Bundle
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .