kittipong
การติดตั้ง FAMP บน FreeBSD 6.1 มีการเปลี่ยนแปลงพอสมควรครับ โดยเฉพาะ Apache แต่การติดตั้งส่วนใหญ่จะมีหลักการเหมือนกัน FAMP
บน FreeBSD 6.0 นะครับ ผมขออธิบายโดยกระชับดังนี้
FreeeBSD 6.1 Install
====================
(ติดตั้งคล้าย ๆ กับ 6.0 แบบปกติ)
FAMP Package Style ThaiBSD.com
==============================
cd /usr/ports/distfiles
fetchhttp://bsd.psru.ac.th/famp/famp61_apache22_mysql5_php5.tar.gz
gzip -cd famp61_apache22_mysql5_php5.tar.gz | tar xvf -
(** ไฟล์ famp61_apache22_mysql5_php5.tar.gz เป็นไฟล์ที่ ThaiBSD.com จัดเตรียมไว้แล้ว
เพื่อหลีกเลี่ยงการ Download โดยตรงและเพิ่มความสะดวกให้กับทุกท่าน
ท่านควรมีการต่อเน็ตด้วย เผื่อว่ามีไฟล์บ้างไฟล์ที่ต้องดาวน์โหลดเพิ่มอีกนิด***)
Apache 2.2 Install
==================
cd /usr/ports/www/apache22
make install
MySQL5.0 Install
================
cd /usr/ports/databases/mysql50-server
make install
หรือ
make WITH_CHARSET=tis620 WITH_XCHARSET=all \
WITH_COLLATION=tis620_thai_ci install
(เพื่อให้ MySQL Server รองรับ charset tis-620 ครับ)
pico /etc/rc.conf
เพิ่มคำสั่ง mysql_enable="YES"
Note
====
(มีหลายอย่างเปลี่ยนแปลงใน Apache 2.2)
การ Start Apache 2.2 ใน /etc/rc.conf
=================================
ให้เพิ่มคำสั่ง apache22_enable="YES"
Apache Documentroot
===================
เก็บไว้ที่ /usr/local/www/apache22/data
(เป็นที่ ที่เก็บ web root เช่น index.html test.php)
การ Config Apache2.2
==================
ไฟล์ httpd.conf เก็บไว้ใน /usr/local/etc/apache22/
** โดยปกติบน Apache 2.2 จะไม่รองรับ web ของ user ครับ
แก้ไขปัญหานี้ได้โดย
1. cd /usr/local/etc/apache22/Includes
2. pico user_dir.conf
แล้วเพิ่มคำสั่งเหล่านี้เข้าไปนะ
<IfModule mod_userdir.c>
UserDir public_html
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
</IfModule>
3. แล้วทำการ restart apache ใหม่โดยใช้คำสั่ง
/usr/local/etc/rc.d/apache22.sh stop
/usr/local/etc/rc.d/apache22.sh start
ขอให้สนุกกับการศึกษา FAMP นะครับ
อาจารย์กิตติพงษ์ สุวรรณราช
xdisc
คือ Apache22 ได้แยกคอนฟิกหลายอย่างออกให้ปรับแต่งอิสระกันชัดเจนขึ้นครับ
อยู่ที่ /usr/local/etc/apache22/extra/
ที่ไฟล์ httpd.conf จะปิดการทำงานไฟล์คอนฟิกเหล่านี้อยู่ อยากใช้อันไหนก็ไปเปิดเอาโดยเอาเครื่องหมาย # ที่อยู่ข้างหน้าออกครับ
# The configuration files in the etc/apache22/extra/ directory can be
# included to add extra features or to modify the default configuration of
# the server, or you may simply copy their contents here and change as
# necessary.
# Server-pool management (MPM specific)
#Include etc/apache22/extra/httpd-mpm.conf
# Multi-language error messages
#Include etc/apache22/extra/httpd-multilang-errordoc.conf
# Fancy directory listings
#Include etc/apache22/extra/httpd-autoindex.conf
# Language settings
#Include etc/apache22/extra/httpd-languages.conf
# User home directories
#Include etc/apache22/extra/httpd-userdir.conf
# Real-time info on requests and configuration
#Include etc/apache22/extra/httpd-info.conf
# Virtual hosts
#Include etc/apache22/extra/httpd-vhosts.conf
# Local access to the Apache HTTP Server Manual
#Include etc/apache22/extra/httpd-manual.conf
# Distributed authoring and versioning (WebDAV)
#Include etc/apache22/extra/httpd-dav.conf
# Various default settings
#Include etc/apache22/extra/httpd-default.conf
# Secure (SSL/TLS) connections
#Include etc/apache22/extra/httpd-ssl.conf
# Note: The following must must be present to support
# starting without SSL on platforms with no /dev/random equivalent
# but a statically compiled-in mod_ssl.
ที่มา : http://www.thaibsd.com/webboard/show.php?Category=thaibsd&No=6914
kittipong
การติดตั้ง PhpMyAdmin 2.6.4 บน FreeBSD 6.1
(หลักการนี้สามารถประยุกต์ใช้กับ Version อื่น ๆ ได้ครับ)
1.cd /tmp
2.fetchhttp://bsd.psru.ac.th/book2/phpmyadmin/phpMyAdmin-2.6.4.tar.gz
3.gzip -cd phpMyAdmin-2.6.4.tar.gz | tar xvf -
4.mv phpMyAdmin-2.6.4 phpmyadmin
5.mv phpmyadmin/ /usr/local/www/apache22/data
6.cd /usr/local/www/apache22/data
7.pico config.inc.php
(ให้ค้นหาบรรทัดเหล่านี้แล้วแก้ไข ค่าของตัวแปร user , password ให้ถูกต้อง)
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'xxxxxxx';
8.เปิด Internet Explorer
http://xxx.xxx.xxx.xxx/phpmyadmin/
ที่มา : http://www.thaibsd.com/webboard/show.php?Category=thaibsd&No=6915