以 apache handler 和 fastcgi 两种方式安装 PHP 5.2.0, 并使用 –with-mysql 和 –with-mysqli 两种方式连接 Mysql 数据库
- 配置 PHP 安装
1'./configure' '--codefix=/opt/php5' '--with-apxs2=/opt/bin/apxs' '--enable-fastcgi' '--with-mysql=/usr/local/mysql' '--enable-calendar' '--enable-force-cgi-redirect' '--with-configure-file-path=/opt/php5/cgi' '--enable-trans-sid' '--with-gd' '--with-xml' '--with-ttf=/usr' '--with-freetype-dir=/usr' '--enable-exif' '--with-dom-xslt=/usr' '--with-jpeg-dir=/usr/local/jpeg6b' '--with-png-dir=/usr' '--with-zlib-dir=/usr' '--enable-ftp' '--with-curl=/usr' '--enable-mbstring' '--with-mysqli=/usr/local/mysql/bin/mysql_config' '--with-openssl=/usr' '--with-gettext' '--enable-sockets' '--enable-memory-limit' '--with-xmlrpc' '--enable-debug=no' '--enable-track-vars' '--with-iconv' '--enable-sqlite-utf8' '--with-pgsql=/opt/postgresql'
- 这里我还安装了 Postgresql 所以使用了 ‘–with-pgsql=/opt/postgresql’ ,不过奇怪的是 如果我使用
1--with-pdo-mysql --with-pdo-pgsql
就会出现配置安装的错误。
- 同时使用 mysql 和 mysqli 在 make 的时候可能会出现很多警告,在 MAKEFILE 文件中找到以 EXTRA_LIBS 开始的行,删除第二个 -lmysqlclient_r
使用Windows上安装
在测试服务器上安装
SSH登录RedHat后使用一些命令出现
Recent Comments