Chinaunix首页 | 论坛 | 博客
  • 博客访问: 81984
  • 博文数量: 35
  • 博客积分: 1772
  • 博客等级: 上尉
  • 技术积分: 375
  • 用 户 组: 普通用户
  • 注册时间: 2010-04-08 14:39
文章分类
文章存档

2012年(1)

2011年(16)

2010年(18)

我的朋友

分类: LINUX

2010-09-02 23:26:35


yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers


wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.46.tar.gz/from/http://mysql.cdpa.nsysu.edu.tw/


groupadd mysql
useradd -g mysql mysql


./configure --prefix=/usr/local/mysql --without-debug --with-charset=utf8 --with-extra-charsets=gbk,gb2312,utf8 --with-unix-socket-path=/tmp/mysql.sock --with-plugins=partition,innobase,myisammrg --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --with-big-tables --with-read-line --with-ssl --with-embedded-server --with-pthread --enable-thread-safe-client --enable-local-infile --enable-assembler

make

make install


mkdir -p /data/mysql/data
mkdir -p /data/mysql/binlog
mkdir -p /data/mysql/relaylog
chown -R mysql:mysql /data/mysql/


/usr/local/mysql/bin/mysql_install_db --basedir=/usr/local/mysql --datadir=/data/mysql/data/ --user=mysql


在/etc/my.cnf中加入路径配置

datadir = /data0/mysql/3306/data
log-error = /data0/mysql/3306/mysql_error.log
pid-file = /data0/mysql/3306/mysql.pid


阅读(524) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-09-05 14:52:45

Download More than 1000 free IT eBooks: http://free-ebooks.appspot.com