การติดตั้ง Web Server (APACHE+PHP+MYSQL)
เวบไซต์ที่เกี่ยวข้อง
apache http://www.apache.org
php http://www.php.net
mysql http://www.mysql.com
curl http://curl.haxx.se
libexpat http://www.libexpat.org
zlib http://www.zlib.org
libjpeg http://www.faqs.org/faqs/jpeg-faq/
libpng http://www.libpng.org/
freetype http://www.freetype.org
gd
gdbm
GETTEXT http://www.gnu.org/software/gettext/
OPENSSL http://www.openssl.org/
IMAP ftp://ftp.cac.washington.edu/
LIBXML2 http://xmlsoft.org/
PDFLIB http://www.pdflib.com
AUTH_LDAP http://www.rudedog.org/auth_ldap
1. ก่อนอื่นก็ต้องเตรียม Apache ก่อนกันนะครับ (ผมใช้ version 1.3 ครับ ส่วน สำหรับ version 2 ขึ้นไป ก็ติดตั้งแบบกันเลยครับ)
#./configure --prefix=/vc --enable-module=so --sysconfdir=/vc/etc/
อธิบายกันหน่อย
--prefix เป็นการบอกว่าจะเก็บโปรแกรมไว้ที่ไหน
--sysconfdir เป็นการบอกว่าจะเก็บแฟ้มคอนฟิกโปรแกรมไว้ที่ไหน
--enable-module=so เป็นบอกว่ารองรับโมดูล
คอมไพและติดตั้ง
#make
#make install
2. ติดตั้ง CURL
#./configure --prefix=/vc
#make
#make check เป็นการตรวจสอบครับ ถ้าตรงนี้ไม่ผ่าน ก็ไม่ต้องสนใจ จะเอาออกไปเลยก็ได้ครับ แต่มีไว้ดีกว่าครับ
#make install
3. ติดตั้ง EXPAT
#./configure --prefix=/vc
#make
#make check
#make install
4. ติดตั้ง ZLIB
#./configure --prefix=/vc
#make
#make check
#make install
5. ติดตั้ง libjpeg
#./configure --prefix=/vc --enable-shared --enable-static
#make
#make test
#make install
6. ติดตั้ง LIBPNG
#cp scripts/makefile.linux makefile
#vi makefile
แก้ PREFIX
แก้ ZLIBLIB
แก้ ZLIBINC
#make
#make test
#make install
7. ติดตั้ง FREETYPE
#./configure --prefix=/vc --with-gnu-ld
#make
#make install
8. ติดตั้ง GD
#./configure --prefix=/vc --with-freetype=/vc --with-jpeg=/vc --with-png=/vc
#make
#make install
9. ติดตั้ง GDBM
#./configure --prefix=/vc
#make
#make install
10. ติดตั้ง GETTEXT
#./configure --prefix=/vc
#make
#make check (นานมากๆ เครื่องผม P4 2.8 2 ตัว ยังใช้เวลาตั้ง 20นาที)
#make install
11. ติดตั้ง OPENSSL
#./config --prefix=/vc --openssldir=/vc threads zlib zlib-dynamic shared
#make
#make test
#make install
12. ติดตั้ง IMAP
#vi src/osdep/unix/Makefile
#หา SSLDIR แก้เป็น /vc
#make slx
#make
13. ติดตั้ง LIBXML2
#./configure --prefix=/vc --enable-ipv6=yes --with-zlib=/vc
#make
#make install
14. ติดตั้ง PDFLIB
#./configure --prefix=/var/vc --with-gd=/var/vc --with-png=/var/vc --with-jpeg=/var/vc --with-java
#make
#make test
#make install
15. ติดตั้ง MySQl
http://gotoknow.org/archive/2005/10/21/14/06/04/e5690
16. ติดตั้ง PHP
#./configure --prefix=/vc --with-apxs=/vc/bin/apxs --with-config-file-path=/vc/etc \
--with-mysql=/vc --disable-debug --enable-bcmath --enable-calendar --enable-ctype \
--enable-dbase --enable-discard-path --enable-exif --enable-filepro --enable-force-cgi-redirect \
--enable-ftp --enable-gd-imgstrttf --enable-gd-native-ttf --with-ttf --enable-magic-quotes \
--enable-memory-limit --enable-safe-mode --enable-shmop --enable-sigchild --enable-sysvsem \
--enable-sysvshm --enable-track-vars --enable-trans-sid --enable-versioning --enable-wddx \
--enable-yp --with-ftp --with-gdbm=/vc --with-jpeg-dir=/vc --with-png-dir=/vc \
--with-tiff-dir=/vc --with-freetype-dir=/vc --without-xpm --with-zlib=yes --with-zlib-dir=/vc \
--with-openssl=/vc --with-expat-dir=/vc --enable-xslt --with-xslt-sablot=/vc --with-ldap \
--with-gd --with-imap-dir=/vc --with-imap-ssl --with-gettext=/vc \
--with-curl=/vc --enable-sockets --enable-mbstring=all
คงไม่ต้องอธิบายแล้วนะครับ เพราะ มันก็คือ โมดูล เสริมต่างๆของ PHP ครับ ที่สำคัญคือ --prefix ของแต่ละโปรแกรม
สำหรับ apache version 2 ขึ้นไปแก้ --with-apxs=/vc/bin/apxs เป็น --with-apxs2=/vc/bin/apxs2
#make
#make install
#cp php.ini-dist /vc/etc/php.ini
18. ติดตั้ง AUTH_LDAP
#./configure --prefix=/vc --with-ssl --with-apxs=/vc/bin/apxs --with-sdk-headers --with-sdk-libs
> --with-shared-cache --with-activate
#make
#make install
17. จัดการ APACHE ใหม่อีกรอบ คราวนี้เต็มสูตร
#./configure --prefix=/var/vc --enable-module=so --sysconfdir=/var/vc/etc/ --enable-module=ssl
#make
#make certificate TYPE=custom
เวลากรอกหามผิดโดยเด็ดขาด เพราะแก้ไขไม่ได้ ถ้ากรอกรผิดให้กด Ctrl+c ออกมาเลยครับแล้ว กรอกใหม่
#make install
#vi /vc/etc/httpd.conf
เพิ่ม
AddType application/x-httpd-php .php .php3 .php4
DefaultLanguage th
AddDefaultCharset TIS-620
AddCharset TIS-620 .tis-620 .th
AddCharset TIS-620 .th
และ แก้
DirectoryIndex index.html
เป็น
DirectoryIndex index.html index.php
แก้
LanguagePriority th en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
เป็น
LanguagePriority th en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
แก้ user และ group ในการรันโปรแกรม APACHE เป็น apache
ปกติ การติดตั้ง APACHE แบบคอมไพล์โปรแกรม จะตั้งค่าเป็น nobody ให้ทำการแก้ไขเป็น apache โดยต้องทำการสร้าง group และ user ก่อน
#greoupadd apache
#useradd -g apache apache
#vi /etc/passwd
แก้ shell เป็น /sbin/nologin
I guess that to get the <a href="http://bestfinance-blog.com/topics/home-loans">home loans</a> from creditors you ought to have a firm motivation. Nevertheless, one time I have received a collateral loan, just because I was willing to buy a bike.