Chinaunix首页 | 论坛 | 博客
  • 博客访问: 738765
  • 博文数量: 235
  • 博客积分: 4309
  • 博客等级: 中校
  • 技术积分: 2325
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-17 11:25
个人简介

If you don\\\\\\\\\\\\\\\'t wanna do it, you find an EXCUSE; if you do, you\\\\\\\\\\\\\\\'ll find a WAY :-)

文章分类

全部博文(235)

文章存档

2014年(3)

2013年(2)

2012年(31)

2011年(199)

分类: LINUX

2011-02-28 11:39:14

1>: cmake installation
[root@ko ]# wget
[root@ko ]# tar zxvf cmake-2.84.tar.gz -C /usr/local/src
[root@ko ]# ./configure && make -j12 && make install -j12

2>: MySQL Installation
[root@ko ]# mkdir /data; chown mysql:mysql /data

[root@ko ]# tar zxvf mysql-5.5.9.tar.gz -C /usr/local/src
[root@ko ]# cd /usr/local/src/mysql-5.5.9
[root@ko ]# rm CMakeCache.txt  ( if exists )
[root@ko ]# cmake . \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql5.5.9/ \
-DMYSQL_DATADIR=/data \
-DMYSQL_UNIX_ADDR=/data/mysql.sock \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DMYSQL_TCP_PORT=3306 \
-DWITH_DUBUG=0

[root@ko ]#  make -j12 && make -j12 install
[root@ko ]# vim ~/.bash_profile
PATH=$PATH:$HOME/bin:/usr/local/mysql5.5.9/bin
[root@ko ]# source ~/.bash_profile
[root@ko ]# groupadd mysql; useradd -r -M -g mysql mysql
[root@ko ]#  chown -R mysql:mysql /usr/local/mysql5.5.9

[root@ko ]# cd /usr/local/mysql5.5.9
[root@mysql5.5.9 ]#  ./scripts/mysql_install_db --user=mysql  --datadir=/data
[root@mysql5.5.9 ]# cp ./support-files/mysql.server /etc/init.d/mysqld
[root@mysql5.5.9 ]# chkconfig --add mysqld
[root@mysql5.5.9 ]# cp ./support-files/my-huge.cnf /etc/my.cnf

修改配置,因为我用的innodb的引擎,所以把配置项里面的innodb相关的都打开了

# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir = /home/peiwenhao/mysql/data
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /home/peiwenhao/mysql/data
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

[root@mysql5.5.9 ]# echo "/usr/local/mysql5.5.9/lib" >> /etc/ld.so.conf; ldconfig -v

[root@mysql5.5.9 ]# /etc/init.d/mysqld start
阅读(1773) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~