centos 单独安装PHP的mysql和mysqli扩展
2013年11月22日 11:25:41
Linux centos 6.3 最小化安装
mysql 5.5
php 5.4
安装PHP时只是 ./configure --prefix=/****
并没有其它的设置,随后又去安装的其它扩展(纯属瞎折腾,学习怎么用Linux)
在安装mysql和mysqli的扩展时的命令还不一样
生成mysql.so
cd php-5.4./include/ext #源码解压包的扩展目录
cd mysql #进入mysql扩展
/usr/local/lamp/php54/bin/phpize
./configure --with-php-config=/usr/local/lamp/php54/bin/php-config --with-mysql=/usr/local/lamp/mysql
make && make install
生成msyqli.so
和生成msyql.so的步骤中前三步是一模一样的,不同的是第四步:
./configure --with-php-config=/usr/local/lamp/php54/bin/php-config --with-mysqli=/usr/local/lamp/mysql/bin/mysql_config
否则会报警告:
You will need re2c 0.13. or later if you want to regenerate PHP parsers
然后再 make && make install 就可以生成mysqli.so了
但是,不是说PHP5.4已经默认有mysqlnd了么,为什么这里还得指定mysql的安装目录才能生成mysql扩展?
./configure --help --with-mysql=DIR Include MySQL support. DIR is the MySQL base
directory, if no DIR is passed or the value is
mysqlnd the MySQL native driver will be used --with-mysqli=FILE Include MySQLi support. FILE is the path
to mysql_config. If no value or mysqlnd is passed
as FILE, the MySQL native driver will be used
配置命令:
./configure --prefix=**** --enable-mysqlnd --with-mysql --with-mysqli
如果之前编译(make)失败,记得用make clean 或者 make distclean 清除之前编译的缓存文件,然后再重新make && make install
----------------------------
安装 re2c ,语法分析器,编译PHP时用到
wget http://jaist.dl.sourceforge.net/project/re2c/re2c/0.13.6/re2c-0.13.6.tar.gz
------------------------------------
PHP的配置文件在解压后的源码包里
如果安装的时候指定了配置文件的安装路径,安装程序就会将配置文件.....(稍后再叙)
--with-config-file-path=PATH
Set the path in which to look for php.ini [PREFIX/lib]
centos 单独安装PHP的mysql和mysqli扩展的更多相关文章
- 阿里云CentOs服务器 安装与配置mysql数据库
阿里云CentOs服务器 安装与配置mysql数据库 以上为Linux安装mysql数据库 Linux 安装mysql 数据库 一下为mysql 安装教程 Using username "r ...
- centos 单独安装apachebench
这两天在测试php性能优化方法. 为了做压力测试可观察效果,就选择了ApacheBench来作为压力测试工具.其实就是大家常说的ab. 但是这个工具是安装apache web server的时候自带的 ...
- Centos 6安装完美搭建mysql、php、apache之旅
安装apache [root@centos share]# yum -y install httpd Loaded plugins: fastestmirror, refresh-packagekit ...
- CentOS 7 安装并配置 MySQL 5.6
Linux使用MySQL Yum存储库上安装MySQL 5.6,适用于Oracle Linux,Red Hat Enterprise Linux和CentOS系统. 1.添加MySQL Yum存储库 ...
- centos下安装ngnix+php+mysql服务
一.nginx 安装 1.查看yum下nginx版本信息 [root@localhost ~]# yum list | grep nginx 2.手动添加nginx的yum仓库 [root@local ...
- Linux CentOS下安装、配置mysql数据库
假设要在Linux上做j2ee开发.首先得搭建好j2ee的开发环境.包含了jdk.tomcat.eclipse的安装(这个在之前的一篇随笔中已经有具体解说了Linux学习之CentOS(七)--Cen ...
- CentOS 7 安装并配置 MySQL 5.7
Linux使用MySQL Yum存储库上安装MySQL 5.7,适用于Oracle Linux,Red Hat Enterprise Linux和CentOS系统. 1.添加MySQL Yum存储库 ...
- 在centos上安装php5.5+MySQL 5.5.32
在centos直接使用yum install 安装php的话版本比较低,如果需要高版本的话,请看如下: Step 1: Installing Remi Repository ## Install Re ...
- CentOS yum安装和配置MySQL(转载)
From:http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html] 一.MySQL简介 说到数据库,我们大多想到 ...
随机推荐
- 【UVA 401】BUPT 2015 newbie practice #2 div2-B-Palindromes
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=102419#problem/B A regular palindrome is a str ...
- DNA repair问题
问题:Biologists finally invent techniques of repairing DNA that contains segments causing kinds of inh ...
- POJ2186 Popular Cows
Description Every cow's dream is to become the most popular cow in the herd. In a herd of N (1 <= ...
- POJ1979 Red and Black
速刷一道DFS Description There is a rectangular room, covered with square tiles. Each tile is colored eit ...
- Linux下添加新硬盘,分区及挂载
挂载好新硬盘后输入fdisk -l命令看当前磁盘信息 可以看到除了当前的第一块硬盘外还有一块sdb的第二块硬盘,然后用fdisk /dev/sdb 进行分区 进入fdisk命令,输入h可以看到该命令的 ...
- MyEclipse------File类的各种方法
usingFile.jsp <%@ page language="java" import="java.util.*" pageEncoding=&quo ...
- Logistic Regression and Gradient Descent
Logistic Regression and Gradient Descent Logistic regression is an excellent tool to know for classi ...
- --hdu 1050 Moving Tables(贪心)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1050 AC code: #include<stdio.h> #include<str ...
- 配置 Apache+php多端口多站点(转载)
配置httpd.conf监听多个端口 #增加监听端口 等以下内容都设置以后,可以通过 netstat -n -a查看端口是否开启 开启虚拟站点 # Virtual hosts#Include conf ...
- strstr 函数用法
strstr 编辑 strstr(str1,str2) 函数用于判断字符串str2是否是str1的子串.如果是,则该函数返回str2在str1中首次出现的地址:否则,返回NULL. C语言函数 编辑 ...