ขั้นตอนการติดตั้ง Apache&PHP Installation
ให้ Down PHP และ Apache
มาไว้ที่ /tmp
จากนั้นเริ่มติดตั้งดังนี้
#cd /tmp
#tar -zxvf apache_1.3.6.tar.gz
#tar -zxvf php-3.0.7.tar.gz
เข้าไปใน /tmp แล้วคลาย file ทั้งสอง
#cd apache_1.3.6
#./configure --prefix=/httpd-php3
ใช้คำสั่ง configure เพื่อสร้าง Subdirectory Web
server ชื่อ httpd-php3
#cd ../php-3.0.7
#./configure --with-mysql --with-apache=../apache_1.3.6
#make
ในขั้นตอนนี้เป็นการ Compile
โดย C Compile จะนานสักหน่อย
ปล่อยทิ้งไว้อย่าปิดเครื่องเด็ดขาด
#make install
เช่นเดียวกับข้างต้น
#cd ../apache_1.3.6
#./configure --prefix=/httpd-php3 --
active-module=src/module/php3/libphp3.a
#make
#make install
Configurations and test
แก้ไขfile /httpd-php3/conf/httpd.conf
เพิ่มข้อความนี้ลงไป
AddType application/x-httpd-php3 .php3 .phtml
#/httpd-php3/bin/apachectl start
เริ่ม start Apache
#ps aux | grep httpd
ตรวจสอบ process httpd
ว่ามีไหมถ้ามีแสดงว่า
เริ่มทำงานแล้ว
#cp /httpd-php3/bin/apachectl /etc/rc.d/init.d/httpd
copy apachectl ไปที่ subdirectory rc.d เพื่อให้ start
ทุกครั้งตอน boot เครื่อง
#/etc/rc.d/rc3.d/S85httpd restart
#/etc/rc.d/rc3.d/S85httpd stop
เสร็จเรียบร้อยแล้วให้
Reboot เครื่อง |