心寄笔端 附庸风雅

甘草的技术博客

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

如果是apt-get安装的

sudo apt-get --purge remove mysql-server
sudo apt-get --purge remove mysql-client
sudo apt-get --purge remove mysql-common

apt-get -f autoremove
apt-get autoclean
rm /etc/mysql/ -R
rm /var/lib/mysql/ -R

 

 

---------------这是我老大的MySQL安装笔记-------------------------

tar 解压缩mysql后, copy到/opt/mysql目录下

groupadd mysql
useradd -g mysql mysql
chown -R mysql .
chgrp -R mysql .
scripts/mysql_install_db --user=mysql   (此步骤之前请确认/etc下没有 my.cnf和 mysql/my.cnf)
chown -R root .
chown -R mysql data
cp support-files/my-small.cnf /etc/my.cnf
cp support-files/mysql.server /etc/init.d/mysqld

在my.cnf 加上basedir=/opt/mysql/

chmod +x /etc/init.d/mysqld
/etc/init.d/mysqld start 
 
 
 
源码解压缩
 
这些是依赖(apt-get update)

apt-get install libjpeg-dev
apt-get install libgd2-xpm-dev
apt-get install libfreetype6-dev
apt-get install libcurl4-openssl-dev
apt-get install libxml2-dev
apt-get install libpng12-dev
apt-get install libmcrypt-dev
apt-get install libmhash-dev
apt-get install libpcre3-dev

php -i | grep configure 可以看到安装选项

然后就

./configure --prefix=/opt/php --with-config-file-path=/opt/php/etc --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-zlib --disable-rpath --enable-inline-optimization --with-curl --with-iconv --with-gd --with-freetype-dir --with-jpeg-dir --with-png-dir --enable-mbstring --enable-sockets --with-mcrypt --enable-fpm --with-openssl  --enable-bcmath 

make和make install就不说了。

posted on 2015-01-06 19:34  甘草  阅读(1138)  评论(0编辑  收藏  举报
Baidu
Google
心寄笔端
TEST
以后我会加上Power By的,先别介意