文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>linux下安装pear,mysql,so模块

linux下安装pear,mysql,so模块

时间:2009-08-04  来源:dengfu2345678910

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CDENGDA%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///C:%5CDOCUME%7E1%5CDENGDA%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///C:%5CDOCUME%7E1%5CDENGDA%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><style> </style>一.在安装之前先更新pear,更新方法如下:
  1).cd /usr/local/php-5.2.8/pear
  2).使用命令pear upgrade-all,更新现有的pear 包, 至最新版本
  3).下载安装附录中没有的包( XML_Parser、XML_RPC、XML_Util),命令如下:
    pear download package name
    pear install package name
  4). 下载完之后再执行命令: pear install --force XML_Serializer
  5). 以上步骤是在php 5.2.5 的版本中实现的(如不能实现请更新php的版本).
  6). 以上三个步骤之后就可以使用pear 的 XML_Serializer 的包了

二.<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CDENGDA%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///C:%5CDOCUME%7E1%5CDENGDA%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///C:%5CDOCUME%7E1%5CDENGDA%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><style> </style>安装mysql:

 
          ./configure --prefix=/home/hxh/mysql/mysql --localstatedir=/home/hxh/mysql/data         --with-unix-socket-path=/home/hxh/mysql/mysql.sock --with-charset=utf8

msyql先要创建用户:./mysql_install_db --user=mysql
   注意对mysql库授权:
   grant all on *.* to root@'%' identified by 'yourpassword'
  登录: mysql -h服务器IP地址 -u用户名 -p密码 -f -D 数据库名
  如:./mysql -h192.168.20.160 -uroot -p123456 -f -D nhn_admin

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CDENGDA%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///C:%5CDOCUME%7E1%5CDENGDA%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///C:%5CDOCUME%7E1%5CDENGDA%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><style> </style>
三.apache增加mod_rewrite.so,mod_dir.so

 
   1)首次安装apache,在编译时增加--enable-rewrite选项。
   如./configure --prefix=/usr/local/apachel --enable-so --enable-mods-shared=all   --enable-rewrite --enable-cache
    2)增加mod_rewrite模块
    # find . -name mod_rewrite.c //在apache的源码安装目录中寻找mod_rewrite.c文件
    # cd PATH/to/mod_rewrite.c //进入包含mod_rewrite.c文件的目录
    # /usr/local/apache/bin/apxs -c mod_rewrite.c //apxs应指定绝对路径,在你当前正在使用apache的bin目录里
   # /usr/local/apache/bin/apxs -i -a -n mod_rewrite mod_rewrite.la
    如果没有什么错误的话,应该在你的apache的modules目录中编译出一个mod_rewrite.so文件。

   编辑httpd.conf文件,确认httpd.conf中已经包含mod_rewrite.so的加载语句,如下:
    LoadModule rewrite_module modules/mod_rewrite.so
    这时,你的apache应该已经支持rewrite了。
    用同样的方法:编译mod_dir.so
     vicos注:完成之后,记得重启服务器apache。

注:如果重起apache报错为:module access_module is built-in and can't be loaded
请在配置文件中注一下!

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CDENGDA%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///C:%5CDOCUME%7E1%5CDENGDA%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///C:%5CDOCUME%7E1%5CDENGDA%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><style> </style>四.编译mysql.so:
方法1:
1).php的安培目录下,进行编译: ./configure -with-mysql=shared,/home/hxh/mysql/mysql --with-mysql-sock=/home/hxh/mysql/mysql.sock
2). make
3).make install

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CDENGDA%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///C:%5CDOCUME%7E1%5CDENGDA%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///C:%5CDOCUME%7E1%5CDENGDA%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><style> </style>方法2:
1).进入cd /usr/local/php-5.2.8
2)./configure--prefix=/usr/local/php-5.2.8'--with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql--enable-mbstring=all
 


相关阅读 更多 +
排行榜 更多 +
火柴人毁灭4官方正版下载

火柴人毁灭4官方正版下载

休闲益智 下载
今天不上班游戏安卓版下载

今天不上班游戏安卓版下载

休闲益智 下载
我的汉堡店模拟器正版手游下载

我的汉堡店模拟器正版手游下载

模拟经营 下载