Webserver (Mysql, Apache, Php, PhpMyAdmin) on FreeBsd

Install in order

Mysql
1. ports
cd /usr/ports/databases/mysql55-server
2. build the ports
make BUILD-OPTIMIZED=yes BUILD_STATIC=yes
3. install mysql
make install clean
4. enable mysql
echo “mysql_enable=”YES”” >> etc/rc.conf
5. start mysql
/usr/local/rc.d/mysql-server start
6. setting password root
mysqladmin -u root password ‘new-password’
7. enter mysql
mysql -u root -p

Apache
1. ports
/usr/local/www/apache22
2. install
make install clean
3. edit httpd.conf
ee /usr/local/etc/apache22/httpd.conf

  • Listen ipaddres:port
  • Listen xxx.xxx.xxx.xxx:80 (your host ip address)
  • User www
  • Group www
  • ServerName xxx.xxx.xxx.xxx:80 (your host ip address)
  • DocumentRoot “/usr/local/www/apache22/data”
  • DirectoryIndex index.php index.html index.htm

4. enable apache
echo “apache22_enable=”YES”” >> /etc/rc.conf
5. start apache
apachectl start

PhP
1. ports
cd /usr/ports/lang/php5
2. make config
check apache menu
3. install
make install clean
4. apachectl restart

Php-Mysql
1. cd /usr/ports/databases/php-mysql
2. make install clean
3. apachectl restart

PhpMyAdmin
1. cd /usr/ports/databases/phpmyadmin
2. make install clean
3. cp /usr/local/www/phpMyAdmin/config.sample.inc.php ee /usr/local/www/phpMyAdmin/config.inc.php
4. ee /usr/local/www/phpMyAdmin/config.inc.php
5. cucukcau# apachectl restart
6. cucukcau# mv /usr/local/www/phpMyAdmin /usr/local/www/apache22/data/phpMyAdmin

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s