ubuntu12.04 下搭建LNMP+memcahce+memcahced+redis+mongodb扩展
cd /data/softsudo wget http://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.45.tar.gz
sudo tar zxvf mysql-5.0.45.tar.gz
cd mysql-5.0.45/
sudo apt-get install libncurses5-dev(如果没有需要安装)
sudo apt-get install build-essential(如果没有需要安装gcc)
sudo ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-big-tables --with-embedded-server --enable-local-infile --with-plugins=innobase
sudo make && make install clean
cd /usr/local/mysql
cp ./share/mysql/my-medium.cnf ./my.cnf
./bin/mysql_install_db
cp ./share/mysql/mysql.server /etc/init.d/mysql
chmod +x /etc/init.d/mysql
#/etc/init.d/mysql start 及 /etc/init.d/mysql stop 运行和结束mysql服务。
#注意:如遇到下面问题:
#Starting MySQL/etc/init.d/mysql: line 159: kill: (21755) - No such process解决办法
#vim /etc/init.d/mysql
#找到类似这样一行(我这里是304行):
#$bindir/mysqld_safe --datadir=$datadir --pid-file=$server_pid_file $other_args >/dev/null 2>&1 &
#改为(加上参数--user=root):
#$bindir/mysqld_safe --user=root --datadir=$datadir --pid-file=$server_pid_file $other_args >/dev/null 2>&1 &
#即可启动成功!!!
#/usr/local/mysql/bin/mysql -uroot -p 进入mysql !!
页:
[1]