Google Plus

Installing Apache2 With PHP5 And MySQL On OpenSUSE 12.1

Written by Mel Kham on . Posted in Linux tutorials

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 databaseopensuse-logo management system and PHP as the object-oriented scripting language.

In this post we will see how to install LAMP in  Opensuse  Linux System

 

I-Install  Mysql  Client and Server

pirat9@linux-xq75:~>; sudo zypper  install  mysql mysql-client mysql-community-server
Loading repository data…                                                      
Reading installed packages…   

1-1- Add  my  Mysql to start boot daemons

linux-xq75:/home/pirat9 # chkconfig --add mysql
Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.
mysql                     0:off  1:off  2:off  3:on   4:off  5:on   6:off

 

1-2Start  Mysql Server

/etc/init.d/mysql start

1-3 Configire Mysql Password

linux-xq75:/home/pirat9 # mysql_secure_installation

2-Install  Apache  Server

linux-xq75:/home/pirat9 # zypper install apache2

2-1-add apache  to  start in boot and  start   apache

 

linux-xq75:/home/pirat9 # chkconfig --add apache2

2-2-Start   Apache

linux-xq75:/home/pirat9 # /etc/init.d/apache2  start

 

Check  the  page  with http://ip or http://hostname

3-Install  PHP

 

linux-xq75:/home/pirat9 # zypper install apache2-mod_php5
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following NEW packages are going to be installed:
  apache2-mod_php5 php5 php5-ctype php5-dom php5-iconv php5-json php5-pdo php5-sqlite php5-tokenizer
  php5-xmlreader php5-xmlwriter sqlite2

 

3-1 Check if  PHP installed for apache

edit   /srv/www/htdocs/test.php

and  add

<?php phpinfo(); ?>

save and exit and restart your apache

 

/etc/init.d/apache2  restart

Check the  page : http://ip/test.php

 

If  You  need  more php5 needed for  mysql  please install  them with

zypper  install  php5-mysql php5-bcmath php5-bz2 php5-calendar php5-ctype php5-curl php5-dom php5-ftp php5-gd php5-gettext php5-gmp php5-iconv php5-imap php5-ldap php5-mbstring php5-mcrypt php5-odbc php5-openssl php5-pcntl php5-pgsql php5-posix php5-shmop php5-snmp php5-soap php5-sockets php5-sqlite php5-sysvsem php5-tokenizer php5-wddx php5-xmlrpc php5-xsl php5-zlib php5-exif php5-fastcgi php5-pear php5-sysvmsg php5-sysvshm

 

Don’t forget   to  restart the  Apche to apply the  news componments

 

4-Install  PhpMyadmin

 

linux-xq75:/srv/www/htdocs # zypper install http://download.opensuse.org/repositories/server:/php:/applications/openSUSE_12.1/noarch/phpMyAdmin-3.4.7-21.1.noarch.rpm
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following NEW packages are going to be installed:
  php5-zip phpMyAdmin pwgen
The following recommended package was automatically selected:
  php5-zip

 

 

Open  you  phpMyadmin and login with your  root mysql password

http://192.168.1.116/phpMyAdmin/index.php

 

Enjoy

For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.
  • carreiro

    Muito obrigado, esse artigo me salvou!!!

  • Srinivasa78

    Thanks. Everything works except for phpMyAdmin part. For phpMyAdmin, i installed it via Yast.

  • Dob

    I had trouble getting apache to start after a reboot with this:

    chkconfig –add apache2

    I am running OpenSUSE 12.3 on Azure. Instead cleared it up from chkconfig with this:
    chkconfig -d apache2

    … then ran:
    systemctl enable apache2.service

    and now it works like a charm. :)

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

HailsandNails

|

Actually, what I see too much of, and what Microsoft actually (sorta) did with Windows 8 is think forward. And let’s be brutally honest. Windows 8 is actually NOT as bad as people is making it out, they’re just freakishly afraid of change (which Linux users are as well, it seems)

SK

|

Yes i will. Keep visiting. Subscribe us to get daily updates. Thanks for the comment

Rakesh Vijayan

|

Hi SK

I am Rakesh vijayan thanks for your great work ,by your work I start to learn what is ldap , my request is will you make tutorial for ldap and samba pdc for us on ubuntu 12.04

Guest

|

It was a typo. Now its corrected. Thanks for pointing out.

Michael T

|

You shouldn’t be so stupid, in the first time.

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .