4、PHP的安装:
|
# tar xvjf php-5.2.5.tar.bz2(注意这个是bz2格式的!!!!) # cd php-5.2.5 # ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql --with-libxml-dir --with-png-dir --with-jpeg-dir --with-zlib --with-freetype-dir --with-gd --with-curl --disable-debug --enable-sockets --enable-force-cgi-redirect --with-config-file-path=/etc --enable-magic-quotes --enable-ftp --enable-gd-native-ttf -with-ttf --with-gdbm --with-gettext --with-iconv --enable-mbstring=all # make # make instal |
提示:如果一些图形库,例如gd库在你configure时,失败的话,那么在--with-gd后面加上“-dir”也许就能过去。这样做的目的是让程序自己检测其位置在哪里。当然啦,如果你安装这些图形库的时候指定了位置,在这里指定的话也可以的。
到这里PHP已经安装完毕了。
5、收尾工作:
编辑apache的配置文件httpd.conf
vi /etc/httpd/httpd.conf
找到“#AddType application/x-gzip .gz .tgz”
并在后面加入
| AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps |
这两行的目的是让apache识别php。
再找到“DirectoryIndex index.html”
加上 index.php 让它把index.php做为默认页
| 共5页: 上一页 [1] [2] [3] 4 [5] 下一页 | |||||||
|