1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/bash
#baishuchao qq:995345781
##################################################################
MAKE_RUN=$(($(more /proc/cpuinfo | grep processor | wc -l) + 1))
groupadd mysql
useradd -g mysql -s /sbin/nologin mysql
tar zxvf mysql-5.0.51a.tar.gz
cd mysql-5.0.51a
./configure \
--prefix=/usr/local/mysql \
--
enable-assembler
\
--without-debug \
--with-mysqld-ldflags=-all-static \
--with-charset=utf8 \
--with-extra-charsets=all \
--with-innodb \
--with-unix-socket-path=/usr/local/mysql/mysql.sock \
--
enable-thread
-safe-client \
--with-mysqld-user=mysql
make -j ${MAKE_RUN}
make install
/usr/local/mysql/bin/mysql_install_db --user=mysql
cd ..
|
本文转自 baishuchao 51CTO博客,原文链接:http://blog.51cto.com/baishuchao/1926973