LAMP (Linux, Apache, MySQL and PHP) is an open source Web development platform that uses Linux as operating system, Apache as the Web server, MySQL as the relational database management system and PHP as the object-oriented scripting language.
In this Simple tutorial we will explain you how to install LAMP server on your Opensuse 13.
1- Install LAMP
First Open the software manager “YAST” and search for LAMP the click apply to install
The packages that will be installed are:
apache2, mysql-community-server, apache2-mod_perl, apache2-prefork, php5-dom, php5-ctype, php5-iconv, php5-mysql, apache2-mod_php5, apache2-example-pages, apache2-mod_python, apache2-doc, yast2-http-server
- After LAMP is installed start apache :
linux-gysk:~ # /etc/init.d/apache2 start
Starting httpd2 (prefork) done
linux-gysk:~ # chkconfig apache2 on
To check if apache has been installed correctly, open your browser and type localhost
- Now check if php is working.
Open terminal and create this file
and add this code :
Now open http://localhost/file.php or http://ip/file/php if you got something like in the screenshot bellow that means php is working :
- Create MySQL password:
Open terminal and type :
mysqladmin -u root password xxxxxx
Check now if its working with
mysql -u root -p
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 2
Server version: 5.1.46-log SUSE MySQL RPM
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
Now start Mysql from daemon with
2- Install phpMyadmin
First download the final version from phpmyadmin.net and save it to /srv/www/htdocs
now extract and change the folder name to phpmyadmin:
mv phpMyAdmin-3.3.4-all-languages phpmyadmin
cp config.sample.inc.php config.inc.php
NB : If you got an error check if you have these dependencies installed : php5-mbstring and php5-mcrypt
Now restart your apache and open the page http//ip/phpmyadmin and login with mysqladmin username : root and password