Archive for October, 2007

Exploit Mitigation Techniques by Theo de Raadt

October 31, 2007

Exploit Mitigation Techniques by Theo de Raadt

Apache PHP Mysql NetBSD

October 3, 2007

NAPM Server NetBSD

#cd /usr/pkgsrc/www/apache2

#make install clean

we need for the apache to work to add a hostname>:

#hostname netbsdsparc

and then add Servername into httpd.conf

Servername 192.168.0.29:80

wherever your ip address is.

then add you ip and host into /etc/hosts/

#echo “192.168.0.29 netbsdsparc” >> /etc/hosts

then we can start apache

#apachectl start

#cd /usr/pkgsrc/www/php4/

#make install clean

Now we gonna install the module for php on apache

#cd /usr/pkgsrc/www/ap-php/

#make install clean

now we need to add some lines to the httpd.conf

LoadModule php4_module lib/httpd/mod_php4.so
AddHandler application/x-httpd-php .php

You may also add following if you still use .php3 files:

AddHandler application/x-httpd-php .php3

now we gonna install mysql

#cd /usr/pkgsrc/databases/php-mysql

#make install clean

we need to add the mysql.so extention on to php.ini

#vi /usr/pkg/etc/php.ini

then we add extension=mysql.so where “Dynamic Extensions” is

#cd /usr/pkgsrc/databases/mysql4-server

#make install clean

mysql will install the mysql-client too at the end you just need
to do:

#cp /usr/pkg/share/examples/rc.d/mysqld /etc/rc.d/

if the file goes as rc.d into /etc/rc.d just rename it to mysqld

then add

#echo “mysqld=YES” >> /etc/rc.conf

and then

/etc/rc.d/mysqld start

Starting MySQL ….

After the tables are set up and the MySQL server is running,
please remember to set a password for the MySQL root user!
This is done by running both:

#/usr/pkg/bin/mysqladmin -u root -p password ‘new-password’
#/usr/pkg/bin/mysqladmin -h `hostname` -u root -p password ‘new-password’

The “Enter password:” prompt is asking for the existing password.
As there is no existing password, just press the Return key.

thats it enjoy it )