How To Install LAMP Stack (Apache, MariaDB, PHP, phpMyAdmin) On openSUSE 13.1/13.2/42.1

If you get output like above. There is no index file on apache directory /srv/www/htdocs. So, just create index.html file and add the content as you wish to test it.

[ac-box color=”yellow” icon=”fa-lightbulb-o “]
Congratulation you have successfully installed and configured Web Server on openSUSE Leap 42.1
[/ac-box]

how-to-install-lamp-stack-on-opensuse-42-1-image-2
Now, You have successfully installed and configured apache on your openSUSE Leap 42.1 box.

2a) Enabling public access to web server

By default web server is only accessible in localhost. If you want to access publicly you need to open Port=80 for http in firewall, also edit /etc/sysconfig/SuSEfirewall2 file and allow apache.

[Allow apache to firewall]
$ sudo nano /etc/sysconfig/SuSEfirewall2
FW_CONFIGURATIONS_EXT="apache2"

[Restart firewall]
$ sudo systemctl restart SuSEfirewall2.service

3) Install MariaDB

MariaDB is a drop-in replacement for MySQL. Now a days all the OS didn’t included MySQL as default & some of the OS removed the MySQL package also. MariaDB is open-source relational database management system (RDBMS) which is supporting database access. It’s robust, scalable, and reliable SQL server for high availability databases as free of cost.

[Install MariaDB]
$ sudo zypper in mariadb mariadb-tools

[Start, enable & check the status of MariaDB service]
$ sudo systemctl start mysql.service
$ sudo systemctl enable mysql.service
$ sudo systemctl status mysql.service

[Set root password for MariaDB[
$ sudo mysqladmin -u root password NEWPASSWORD

If you set the MySQL root password using above method, it wont remove the test DB and didn’t secure other settings too. You can see the below output, still the test DB is there.
how-to-install-lamp-stack-on-opensuse-42-1-image-5

About Magesh Maruthamuthu

Love to play with all Linux distribution

View all posts by Magesh Maruthamuthu

13 Comments on “How To Install LAMP Stack (Apache, MariaDB, PHP, phpMyAdmin) On openSUSE 13.1/13.2/42.1”

  1. You mentioned Mongo in the beginning of the article. Do you know the best way to get 3.x mongo in opensuse 42.1 and on?

  2. @2daygeek, here is the error message. It is inside my first post,

    Error
    MySQL said: Documentation

    Cannot connect: invalid settings.
    phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

    1. @Guru,
      Can you please make the below change
      from ($cfg[‘Servers’][$i][‘auth_type’] = ‘config’;) to $cfg[‘Servers’][$i][‘auth_type’] = ‘cookie’;

      Also make sure you should update correct password.
      $cfg[‘Servers’][$i][‘password’] = ‘password’;

  3. Hi,

    I am getting error on my phpMyAdmin online GUI webpage. When I go to
    http://localhost/phpMyAdmin, I am getting this error below.

    Error
    MySQL said: Documentation

    Cannot connect: invalid settings.
    phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

    The only change I did is that I upgraded from MariaDB 5.5 to MariaDB 10.1 just recently. I tried root username and password. It did not work. I tried every step. I even changed the root allow without password inside config.inc.php file. It did not work. Any suggestions as to How can I fix this. I am using opensuse 13.1 and mariadb 10.1

    Any help is much appreciated. Thanks in advance 🙂 I have been trying to solve this for 3 weeks.

  4. Hi
    Great article helped a lot.

    One point you can just use yast and put ‘lamp’ in the file search bar, much quicker.

    Ralph

  5. Thanks a lot for this really helpful guide!

    Just a little comment: At the end of 4., you want to open localhost/phpinfo.php (the file that was just created), not localhost/index.php

Leave a Reply

Your email address will not be published. Required fields are marked *