-
- # tar zxvf httpd-2.2.6.tar.gz
- # cd httpd-2.2.6
- # ./configure --prefix=/usr /local/apache2 --enable-so --enable-track-vars --enable-proxy --enable-vhost-alias --enable-cache --enable-disk-cache --enable-mem-cache --enable -rewrite --enable-mods-shared=all
- # make
- # make install
复代码
3,JPEG包
-
- # tar zxvf jpegsrc.v6b.tar.gz
- # cd jpeg-6b/
- # mkdir /usr/local/jpeg
- # mkdir /usr/local/jpeg/bin
- # mkdir /usr/local/jpeg/lib
- # mkdir /usr/local/jpeg/include
- # mkdir /usr/local/jpeg/man
- # mkdir /usr/local/jpeg/man/man1
- # ./configure --prefix=/usr/local/jpeg
- # make
- # make install
- # make install- lib
复代码
4,TTF包
-
- # tar zxvf freetype-2.1.10.tar.gz
- # cd freetype-2.1.10
- # ./configure --prefix =/usr/local/freetype
- # make
- # make install
复代码
5,zlib包
-
- # tar zxvf zlib-1.2.3.tar.gz
- # cd zlib-1.2.3
- # ./configure
- # make
- # make install
复代码
6,libpng包
-
- # tar zxvf libpng-1.2.12.tar.gz
- # cd libpng-1.2.12
- # ./configure
- # make
- # make install
复代码
7,php gd库
-
- # tar zxvf gd-2.0.33.tar.gz
- # cd gd-2.0.33
- # ./configure
- # make
- # make install
- # cp gd.h /usr/local/lib/
复system代码
8,XML库(libxml)
-
- # tar jxvf libxml2-2.6.23.tar.bz2
- # cd libxml2-2.6.23
- # ./configure
- # make
- # make install
复代码
9,php
-
- # tar zxvf php-5.2.5.tar.gz
- # cd php-5.2.5
- # ./configure --prefix =/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-gd --with-jpeg-dir=/usr/local/jpeg --with-ttf --with -freetype-dir=/usr/local/freetype --with-zlib --with-png --with-mysql=/usr/local/mysql/ --with-mbstring --enable-mbstring=all --enable- mbstr-enc-trans --enable-mbregex --enable-track-vars
- # make
- # make install
- # cp php.ini-dist /usr/local/php/lib/php.ini
复代代码
httpd.conf
-
- AddType 애플리케이션/x-httpd-php .php .phtml
复system代码
10, 젠드
-
- # tar zxvf ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
- # cd ZendOptimizer-3.3.3-linux-glibc23 -i386
- # ./install.sh
复代码
四,创建测试页
页면搜索gd,显示如下则表示成功:
-
- RewriteEngine On
- RewriteRule ^/a([0-9] ).html$ /a$1 .php [L]
复代码
测试是否成功:
다운로드에는 a1.php a2.php a3.php가 있습니다.
当输入a1.html a2.html a3.html时,访问的是以上php文件
지금은 html格式에 있습니다.
六,--enable-rewrite 防盗链
-
- <디렉토리 "e:/Work/upload">
- RewriteEngine on
- RewriteCond %{HTTP_REFERER} !^http:// www.123.com/.*$ [NC]
- RewriteRule .*/.(ppt|zip|rar|doc|wps)$ http://www.123.com/404.html [L]
- 디렉토리>
复代码
七,关于shtml
apache는 SSI를 거부하고 httpd.conf를 사용하지 않습니다.
# vim /usr/local/apache2/conf/httpd.conf
把这两行前면적#去掉
-
- AddType text/html .shtml
- AddOutputFilter에는 .shtml이 포함됩니다
复主代码
그런 다음 "Options Indexes FollowSymLinks"를 검색하세요.
검색된 줄 뒤에 "Includes"를 추가하세요.
즉, 이 줄을 다음과 같이 변경합니다.
옵션 색인 FollowSymLinks 포함
테스트하려면 다음 내용으로 test.shtml 파일을 만듭니다.
|