Apache PHP Mysql NetBSD

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 )

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: