Table of Content

This is quick guide to setup web dev environment on opensuse 11.3.

1) install apache, php and mysql packages through Yast2

  • apache: apache2, apache2-mod_php5
  • php: php5, php5-mysql
  • mysql: mysql-community-server, mysql-community-server-client

2) setup apache

# rcapache2 status
Checking for httpd2:                                          unused

means apache installed but not started yet,

# cd /srv/www/htdocs
# vi index.html
type in:

Welcome to openSUSE 11.3, this is first test page in apache2 !

# rcapache2 start
Starting httpd2 (prefork)                                         done

Verify by opening web browser and type in address: http://localhost.

enable apache as service when boot:

# chkconfig -l|grep apache
apache2                   0:off  1:off  2:off  3:off  4:off  5:off  6:off

# chkconfig --add apache2
apache2                   0:off  1:off  2:off  3:on   4:off  5:on   6:off

3) setup php

nothing to do.

4) setup mysql

# rcmysql status
Checking for service MySQL:                                      unused

means mysql server installed but not started yet.

# rcmysql start
Creating MySQL privilege database...
Installing MySQL system tables...
100719 12:50:48 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
OK
Filling help tables...
100719 12:50:49 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
OK

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h linux-xs8w.site password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
rcmysql start

You can test the MySQL daemon with mysql-test package

Please report any problems with the /usr/bin/mysqlbug script!

Starting service MySQL                                                                         done

need to init root password by:

# /usr/bin/mysqladmin -u root password 'shroot'
enable mysql as service when boot:

# chkconfig -l|grep mysql
mysql                     0:off  1:off  2:off  3:off  4:off  5:off  6:off

# chkconfig --add mysql
mysql                     0:off  1:off  2:on   3:on   4:off  5:on   6:off

5) test apache+php+mysql

# cd /srv/www/htdocs
# vi test.php
<php
    phpinfo();
>

Verify from web browser by:

http://localhost/test.php

You should see php, apache and mysql details.

6) install phpMyAdmin

download package phpMyAdmin-3.3.4-english.tar.gz  from http://www.phpmyadmin.net/home_page/downloads.php

# cd /srv/www/htdocs
# tar zxpf /<path>/phpMyAdmin-3.3.4-english.tar.gz
# mv phpMyAdmin-3.3.4-english phpMyAdmin
# cd phpMyAdmin
# cp config.sample.inc.php config.inc.php

fill up the blowfish_secret for cookie,
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = 'mysqladmin'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

then you can launch phpMyAdmin from web browser:

http://localhost/phpMyAdmin

So far the complete apache+php+mysql is ready.