Table of Contents
What is lamp?
What is suse?
Suse is a Linux distributed operating system which is open source and free. Suse is mostly used in server, mainframes and workstations but is also installed in desktops for testing.
How to install LAMP in Suse: Let’s Get Started!
Step 1: Update your packages
The first thing you can do before installation is to get everything updated.
sudo zypper update
Step 2: Install Apache
To install Apache in your Suse type in the following command.
sudo Zypper Install Apache2
Type in your root password to finish your installation.
To get your Apache started type in the following command:
sudo systemctl start apache2
To make sure Apache is up and running, check its status by running the following command
systemctl status apache2
You will get an enabled or active on your screen if your Apache is successfully installed.
If your Apache is not working then it might be because your firewall is preventing it from doing it so.
Adjust your firewall by opening the following file and configuring it:
sudo vi /etc/sysconfig/SuSEfirewall2
Once the file is opened, you will find the following line in the file:
Type in “apache2” in the quotation. Save and close it. Now restart the firewall to take effect of the changes.
sudo systemctl restart SuSEfirewall2
Step 3: Installing MariaDB or MySql
To install MariaDB in SUSE you need to run the following command:
sudo zypper install mariadb mariadb-client mariadb-tools
After the installation is completed you need to start and enable MariaDB as it won’t automatically.
sudo systemctl start mariadb sudo systemctl enable mariadb
To install MySql in Suse, you need to first install the following package and repository:
If you are getting an error for wget, then you need to install wget before using it.
To install first type:
sudo su sudo zipper install wget sudo rpm -ivh mysql80-community-release-sl15-3.noarch.rpm
Refresh to let effects take place.
sudo zypper refresh
Now you can install MySql on Suse by running the following command:
sudo zypper install mysql-community-server
This will ask your password to finish installation. Give your password and press ‘y’ for the rest of the installation.
Step 4: Installing PHP
The very last step to installing LAMP in Suse is to install PHP 7 run the following command. This command will install PHP and its extension:
sudo zypper install php7 php7-mysql apache2-mod_php7
After the installation is completed enable PHP module and restart your Apache.
sudo a2enmod php7
sudo systemctl restart apache2
You can run any PHP script to test out your installed PHP.
You can install LAMP in multiple Linux Operating System and you can easily run and configure through your terminal. Throughout this article, we have seen how to install LAMP in Suse. By using the package manager of the respectable OS, installation has become easier. Users can install LAMP and utilize the essence of open source software.