#!/bin/sh ####安装ncurses-5.9.tar.gz cd /usr/local/src/ tar -zxvf ncurses-5.9.tar.gz cd ncurses-5.9 ./configure --with-shared --without-debug --without-ada --enable-overwrite make #or make test #测试编译 make install #开始编译安装 ####安装cmake-2.8.8.tar.gz cd /usr/local/src/ tar -zxvf cmake-2.8.8.tar.gz cd cmake-2.8.8 ./configure make #or make test #测试编译 make install #开始编译安装 groupadd mysql useradd -g mysql mysql mysql -s /bin/false mkdir -p /usr/local/data/mysql cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/data/mysql -DSYSCONFDIR=/etc make make install cd /usr/local/mysql scripts/mysql_install_db --user=mysql ####系统开启自动启动 #vim /root/.bash_profile #PATH=$PATH:$HOME/bin:/usr/local/mysql/bin:/usr/local/mysql/lib #source /root/.bash_profile #配置马上生效 cd /usr/local/mysql ./bin/mysqld_safe --defaults-file=/usr/local/mysql/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql & #### GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "root"; #### update user set password=password(‘root‘) where user=‘root‘;