Friday, December 26, 2008

Installation Webserver (Apache, MySQL, PHP) on FreeBSD

Webserver is quite important in the computer network, especially in the Internet world. Why important? This is important because the webserver will be the delivery of information from a server, be it email, information through the web, through a network of monitoring information can also be done via the web at work in the webserver. A webserver is a standard that has webserver:

* Webserver (Apache)
* Database (MySQL)
* Penterjemah script (PHP)

I use the free and opensource. Here I will give a tutorial on how installasinya and only a few initial configuration. And I use the port - the port because we will get a more precise source is installed properly and if the configuration, please set your own. The installation should start the installation of MySQL, Apache PHP ago. Next step is

MySQL installation
# Cd / usr/ports/database/mysql50-server /
# Make install clean
# Rehash
# / Usr / local / bin / mysql_install_db
# Cp / usr / local / share / mysql / my-medium.cnf / var / db / mysql / my.cnf
# Chown-R mysql / var / db / mysql /
# Chgrp-R mysql / var / db / mysql /
# / Usr / local / bin / mysqld_safe-user = mysql &
# / Usr / local / bin / mysqladmin-u root password Newpassword

information:
Step 4 is the grand-installation database,
Step-7 is to run the MySQL
Step-8 to the command is to change the MySQL root password


Apache installation
# Cd / usr/ports/www/apache22 /
# Make install clean
To run apachenya:
# / Usr / local / sbin / apachectl start
By default, dokumentroot (place where the file on the webserver) will be in / usr/local/www/apache22/data /. For the configuration file / usr/local/etc/apache22/http.conf.

PHP installation
# Cd / usr/ports/lang/php5 /
Config # make install clean
Select the configuration that you want. I saranin we aja aktifin apache module,
# Cp / usr / local / etc / php.ini-dist / usr / local / etc / php.ini
# Vi / usr/local/etc/apache22/http.conf

Add the following words
AddType application / x-httpd-php. Php
AddType application / x-httpd-php-source. Phps
LoadModule php5_module libexec/apache/libphp5.so

Then try to find these words: DirectoryIndex index.html
After the word can change this DirectoryIndex index.php index.html
Then out of the editor and save configuration

For testing, please create a file: tes.php
# Ee / usr/local/www/apache22/data/tes.php

Fill with the following script


Then save. Then restart Apache and MySQL back. Then open your browser with http://192.168.XXX.XXX/tes.php. If the info out the PHP installation is successful. If there is a problem, please provide comments or via email.


No comments:

Post a Comment

Template Designed by Mastemplate