linux下安装pear,mysql,so模块
时间:2009-08-04 来源:dengfu2345678910
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
注意对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。
请在配置文件中注一下!
<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