六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 6244|回复: 0

centos编译安装nginx+php前端,独立mysql(续)

[复制链接]
 楼主| 发表于 2013-9-11 23:56:20 | 显示全部楼层 |阅读模式
   上一篇文章centos编译安装nginx+php前端,独立mysql中,mysql的版本是5.1.63,这篇文章要给大家演示怎么把mysql 5.5.x的只安装客户端.
   系统:centos 5.9 64位
   需要的软件:libiconv-1.14.tar.gz mysql-5.5.25a.tar.gz
1.安装前的准备
安装前的准备,可以去看这篇文章centos编译安装nginx+php-fpm+mysql

2.安装libiconv
1./configure --prefix=/usr/local/libiconv

2make && make install




3.只安装mysql客户端
1cmake . && make mysqlclient libmysql

2make install




这样就只安装了mysql客户端,然后可以输入whereis mysql来查看mysql安装位置.
whereis mysql

好了,可以看到跟yum安装的差不多.

4.安装php
以前mysql是5.1的时候,只需要加上--with-mysql=mysql客户端安装目录就可以了,但在mysql 5.5.x这个参数就要改变下了,下面是php的编译参数:
1./configure --prefix=/usr/local/php --enable-fastcgi --enable-fpm --with-fpm-log=/var/log/php-fpm.log --with-fpm-conf=/etc/php-fpm.conf \

2 --with-fpm-pid=/var/run/php-fpm.pid --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d \

3--with-openssl --with-zlib --enable-bcmath --with-bz2 --with-curl --enable-ftp \

4--with-gd --enable-gd-native-ttf --with-jpeg-dir --with-png-dir --with-gettext --with-mhash \

5--enable-mbstring --with-mcrypt --enable-soap --enable-zip --with-iconv=/usr/local/libiconv \

6--with-mysql=shared,/usr --with-mysqli=shared,/usr/bin/mysql_config




大家可以看最后一行,--with-mysql=shared,/usr --with-mysqli=shared,/usr/bin/mysql_config这就是跟以前不同的行.好了,剩下的就不写了,跟以前差不多.

本文摘自:http://blog.slogra.com/post-372.html

该会员没有填写今日想说内容.
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表