zjx0 2008-02-06
在FreeBSD Linux下安装MySQL与linuxthreads,记下笔记,以作备忘!
方式一# make WITH_CHARSET=gbk WITH_XCHARSET=all WITH_LINUXTHREADS=yes BUILD_STATIC=yes WITHOUT_INNODB=yes
方式二# make WITH_CHARSET=gbk WITH_XCHARSET=all BUILD_STATIC=yes WITHOUT_INNODB=yes BUILD_OPTIMIZED=yes WITH_PROC_SCOPE_PTH=yes
附解决方法:
1、安装cvsup
cd /usr/ports/net/cvsup
make install
2、修改配置
ee /usr/share/examples/cvsup/stable-supfile
将*default host=xxx改成*default host=cvsup.cn.freebsd.org
同样
ee /usr/share/examples/cvsup/ports-supfile
*default host也改成*default host=cvsup.cn.freebsd.org
3、然后更新ports和src
cvsup -g -L 2 /usr/share/examples/cvsup/stable-supfile
cvsup -g -L 2 /usr/share/examples/cvsup/ports-supfile
如果找不到cvsup命令,用find / -name cvsup找
4、安装mysql
cd /usr/ports/databases/mysql40-server
修改Makefile
ee Makefile
DB_DIR =/www/databases/mysql 你的DB文件地址
加一行
WITH_LINUXTHREADS= yes 使用Linuxthreads提高性能
然后
make
make install
如果不想动Makefile那么使用如下命令:
env WITH_LINUXTHREADS=yes DB_DIR=/www/databases/mysql make
makeinstall
安完后会有mysql启动和停止的命令提示,使用即可
/usr/local/etc/rc.d/mysql-server.sh start