Installing Apache2 With PHP5 And MySQL On OpenSUSE 12.1

by

Please shareShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on RedditDigg thisShare on StumbleUpon

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