部份筆記


弄了一整晚,大約的筆記就在這.
主要都是將 Apache 和 Lighttpd 處理不同的網存程式.
下面是 Apache + PHP5.2.10 考慮了大多程式的環境,不升上 PHP5.3.0
而 Lighttpd 則以 PHP5.3.0 為主要,因為都是自己的程式為主要..
目前暫這樣吧..好累..又爆肝了

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#
# Apache 2.2.11
#
tar zxvf httpd-2.2.11.tar.gz
cd httpd-2.2.11
./configure --prefix=/usr/local/apache2 --enable-mods-shared=all --enable-cache --enable-file-cache --enable-mem-cache --enable-disk-cache --enable-static-support --enable-static-htpasswd --enable-static-htdigest --enable-static-rotatelogs --enable-static-logresolve --enable-static-htdbm --enable-static-ab --enable-static-checkgid --enable-ssl --with-ssl=/usr/include/openssl --with-pcre --enable-so --enable-suexec --with-suexec-bin=/usr/local/apache2/bin/suexec --with-suexec-caller=www --with-suexec-userdir=public_html --with-suexec-logfile=/usr/local/apache2/logs/suexec_log --with-suexec-docroot=/home

make
make install

#
# PHP 5.2.10
#
tar zxvf php-5.2.10.tar.gz
cd php-5.2.10
./configure --prefix=/usr/local/php5-fastcgi --enable-mbstring --enable-pcntl --with-mysql=/usr/local/mysql50 --enable-fastcgi --enable-force-cgi-redirect --with-gd=/usr/local/modules/gd --with-zlib --with-png-dir=/usr/local/lib --with-jpeg-dir=/usr/local/lib --with-freetype-dir=/usr/local/modules/freetype --with-iconv=/usr/local/lib --enable-gd-native-ttf --enable-dbase --enable-exif --enable-ftp --enable-sqlite-utf8 --enable-sockets --with-curl --with-openssl --with-apxs2=/usr/local/apache2/bin/apxs
make
make install
sed -e 's/\.\///' php.ini-dist > /usr/local/php5-fastcgi/lib/php.ini


#
# eAccelerator 0.9.5.3
#
unzip eaccelerator-0.9.5.3.zip
cd eaccelerator-0.9.5.3
./configure --enable-eaccelerator=shared --with-php-config=/usr/local/php5-fastcgi/bin/php-config
make
make install

vi /usr/local/php5-fastcgi/lib/php.ini

extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"

mkdir /tmp/eaccelerator
chmod 0777 /tmp/eaccelerator
chwon xxx.yyy /tmp/eaccelerator