MySQL一键安装
#!/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- \
--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 ..
页:
[1]