So Slackware is already in release candidate available, this release is coming with many changes on the core and on the packages, we will explain to you to Setup LAMP stack Slackware 15.0 Server.
My Server is Slackware 15
Step 1: update system
# slackpkg update
# slackpkg upgrade slackpkg
# slackpkg new-config
Step 2 : Install Webserver httpd
to install the webserver on Slackware do
# slackpkg install httpd
Apply Ok to install the package.
Also Enable and Star on boot Webserver
chmod +x /etc/rc.d/rc.httpd
Start the Webserver
/etc/rc.d/rc.httpd restart
Check if the port Listening now
root@darkstar:~# netstat -an | grep 80
tcp6 0 0 :::80 :::* LISTEN
root@darkstar:~#
Also Check http://IP
The standard Document root in Slackware is “/srv/httpd/htdocs” you may edit the index file
Step3 : Install Mysql
We have the choice to install MySQL or MariaDB server, so let’s go ahead with MariaDB
Install MariaDB with the command.
slackpkg install mariadb
Also apply Ok to install the Package
Then enable and Start MariaDB
chmod +x /etc/rc.d/rc.mysqld
MariaDB still needs us to run the installation script to set up its own internal database.
mysql_install_db
Setup ownership permissions
Obviously, will need to give the MySQL user ownership of the required MySQL files.
chown -R mysql.mysql /var/lib/mysql
Start MariaDB
We can now start MariaDB
/etc/rc.d/rc.mysqld start
Setup Root user password
As a final step set a root user password.
mysqladmin -u root password '[new-password]'
Then check
root@darkstar:~# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 4
Server version: 10.5.12-MariaDB Source distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.001 sec)
MariaDB [(none)]>
Step 4: install Php
The Standard phpversionin Slackware 15 is 7.4.23 and that is Ok
Install php now
slackpkg install php
Also Uncomment #Include /etc/httpd/mod_php.conf on /etc/httpd/httpd.conf
So edit:
vi /etc/httpd/mod_php.conf
and add:
addtype application/x-httpd-php .php .php3 .php4 .php7 .php8
LoadModule php7_module lib64/httpd/modules/libphp7.so
Save and restart httpd
create php info page
root@darkstar:/etc# cat /srv/www/htdocs/info.php
<?php
phpinfo();
?>
Save / restart Httpd
Check http://ip/info.php
Done!! the LAMP installation on Slackware 15 is now successful
Slackware Community have to do more work to release many missing dependencies and libraries