Great, loving any tips&tricks.

Would you mind if I reformat it to suite a zine article?

  http://t2-project.org/zine/

Have a nice day,
  René

On 04.09.2009, at 18:51, Aldas Nabazas wrote:

Hey,

Today I spent 2 hours configuring Mysql+Apache2+PHP even though last time I had it configured couple of months ago. So basically I am pasting it for myself as I am pretty sure next time I will get stuck again :)

Everything is straight forward and done using default installation settings (as root):

compile mysql

initialize mysql database. pass on user option, server runs as mysql user

mysql_install_db --user=mysql

/etc/rc.d/init.d/mysql start

set password for mysql's root user. Server is not running if you get an error after this command. Most probably there are permission problems, check /var/opt/mysql and /var/opt/mysql/* content. If you have /var/opt/mysql from previous instalation, you can rm and repeat initialization step and it should be fine then for sure.

mysqladmin -u root password 'new-password'

compile apache2 and php

add php support for apache2

vim /etc/opt/apache/httpd.conf

add those lines anywhere you want, at the bottom for example

LoadModule php5_module        modules/libphp5.so
AddHandler php5-script php
DirectoryIndex index.html index.php
AddType text/html       php

copy php.ini

cp -v /usr/share/doc/php/php.ini-production /usr/lib/php.ini

/etc/rc.d/init.d/apache start

create a php file to check server's settings

cat /var/opt/apache/lib/htdocs/index.php

<?php
  phpinfo();
?>

type in browser -> localhost/index.php

there is no php support if you will see a plain text message. check if php module is in:

httpd -M

php module is here -> /opt/apache/modules/libphp5.so

You might have problems if you set different paths but in general it should work.

That's all folks :)
Enjoy.

BR,
Aldas
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[email protected] with a subject of: unsubscribe t2

--
  René Rebe, ExactCODE GmbH, Jaegerstr. 67, DE-10785 Berlin
  http://exactcode.com | http://t2-project.org | http://rene.rebe.name

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[email protected] with a subject of: unsubscribe t2

Reply via email to