目錄 - LuckyFun.net

perchmysteriousΔιαχείριση Δεδομένων

30 Νοε 2012 (πριν από 4 χρόνια και 4 μήνες)

310 εμφανίσεις

[

PHP 5.2

安裝實作筆記

]

2007

6

19




1

/
4


目錄

1

系統安裝
................................
................................
................................
................................
....................

2

1.1

編譯

PHP
主功能

................................
................................
................................
......................

2

1.2

設定
Apache

................................
................................
................................
...............................

2

1.3

安裝
PHP
其他延伸功能

................................
................................
................................
............

2

1.4

安裝
Pear
及需要的
Pear
功能

................................
................................
................................
..

3

2

安裝
Third Party Class

................................
................................
................................
...........................

3

2.1

Smar
ty

................................
................................
................................
................................
.........

3

2.2

Adodb

................................
................................
................................
................................
.........

3

2.3

PHPReports

................................
................................
................................
................................

3

2.4

PHPMailer
................................
................................
................................
................................
...

3

3

設定

php.ini

................................
................................
................................
................................
............

4

4

重啟
Apache

................................
................................
................................
................................
............

4



[

PHP 5.2

安裝實作筆記

]

2007

6

19




2

/
4


1

系統安裝

1.1




PHP
主功能



cd /usr/ports/lang/php5; make install clean


[
X
] CLI Build CLI version

[
X
] CGI Build CGI version

[
X
] APACHE

Build Apache module

[
X
] DEBUG

Enable debug

[
X
] MULTIBYTE


Enable zend multibyte support

[
X
] IPV6 Enable ipv6 support

[
X
] FASTCGI Enable fastcgi support (CGI only)

[
X
] PATHINFO


Enable path
-
info
-
check support (CGI only)


1.2

設定
Apache



vi
/usr/local/etc/apache2
2
/httpd.conf


增加

AddType application/x
-
httpd
-
php .php

AddType application/x
-
httpd
-
php
-
source .phps


1.3

安裝
PHP
其他延伸功能



cd
/usr/ports/lang/php5
-
extensions
; make install clean


[
X
] BZ2


bzip2 library support

[X] CTYPE


ctype functions

[
X
] CURL


CURL support

[X] DOM


DOM support

[X] FILTER input filter support

[
X
] FTP

FTP support

[
X
] GD


GD library support

[
X
] GETTEXT

gettext library support

[X] HASH HASH Message Digest Framework

[X] ICONV iconv support

[
X
] IMAP IMAP

support

[X] JSON JavaScript Object Serialization support

[
X
] LDAP OpenLDAP support

[
X
] MBSTRING multibyte string support

[
X
] MCRYPT Encryption support

[
X
] MSSQL MS
-
SQL database support

[
X
] MYSQL MySQL database support

[
X
]
MYSQLI MySQLi database support

[
X
] ODBC unixODBC support

[
X
] OPENSSL OpenSSL support

[X] PCRE Perl Compatible Regular Expression support

[
X
] PDF PDFlib support (implies GD)

[
X
] PDO PHP Data Objects Interface (PDO)

[X] PDO_S
QLITE PDO sqlite driver

[
X
] PGSQL PostgreSQL database support

[

PHP 5.2

安裝實作筆記

]

2007

6

19




3

/
4


[
X
] POSIX POSIX
-
like functions

[X] SESSION session support

[X] SIMPLEXML simplexml support

[
X
] SNMP SNMP support

[
X
] SOAP SOAP support

[
X
] SOCKETS

sockets support

[X
] SPL Standard PHP Library

[X] SQLITE sqlite support

[
X
] TIDY TIDY support

[X] TOKENIZER tokenizer support

[X] XML XML support

[X] XMLREADER XMLReader support

[X] XMLWRITER XMLWriter support

[
X
] XSL XSL support (Implies DO
M)

[
X
] ZIP

ZIP support

[
X
] ZLIB ZLIB support


1.4

安裝
Pear
及需要的
Pear
功能



cd /usr/ports/devel/pear; make install clean




pear channel
-
update pear.php.net




pear install HTML_Common




pear install HTML_QuickForm


2

安裝
Third Party Class

2.1

Smarty



cd
/usr/ports/www/smarty; make install clean




mkdir
-
p
/
ap
/smarty
/templates_c




mkdir
-
p
/
ap
/smarty
/configs




mkdir
-
p
/
ap
/smarty
/cache




chown www:www
/
ap
/smarty
/templates_c




chmod 770
/
ap
/smarty
/templates_c




chown www:www
/
ap
/smarty
/cache




chmod 770
/
ap
/smarty
/cache


㈮2

Adodb



cd

/usr/ports/databases/adodb
; make install clean


2.3

PHPReports



cd
/ap/tarball




fetch
http://nchc.dl.sourceforge.net/sourceforge/phpreports/phpreports
-
0.4.
9
.tgz





mkdir
-
p /usr/local/share/phpreports




tar xvzf
/ap/tarball
/
phpreports
-
0.
4
.
9
.
t
gz
-
C /usr/local/share/phpreports




/ap/bin
/
myallchange '
/usr/local/share/phpreports/*
' '*'
'ISO
-
8859
-
1' 'UTF
-
8'




/ap/bin
/
myallchange '/
usr
/local/
share
/phpreports
/*
' '*' 'iso
-
8859
-
1' 'UTF
-
8'


2.4

PHPMailer

[

PHP 5.2

安裝實作筆記

]

2007

6

19




4

/
4




cd
/ap/tarball




fetch

http://nchc.dl.sourceforge.net/sourceforge/phpmailer/phpmailer
-
1.73.tar.gz




tar xvzf
/ap/tarball
/
phpmailer
-
1.7
3
.tar.gz
-
C /usr/local/share




vi /usr/local/share/phpmailer/
class.phpmailer.php


var $CharSet = "Big5";


3

設定

php.ini



cp
/usr/local/etc/php.ini
-
dist /usr/local/etc/php.ini




chmod 644 /usr/local/etc/php.ini; vi
/usr/local/etc/php.ini
; chmod 444 /usr/local/etc/php.ini


include_path =
".:/php/includes:/usr/local/share/pear:/usr/local/share/adodb:/usr/local/share/s
marty:/usr/local/share/phpreports:/usr/local/share/phpmailer
:/usr/local/share
"


4

重啟
Apache




/usr/local/etc/rc.d/apache22 reload




完成