网站地图    收藏   

主页 > 系统 > linux系统 >

linux源码安装mysql5.5 - Linux操作系统:Ubuntu_Centos

来源:自学PHP网    时间:2015-04-14 10:17 作者: 阅读:

[导读] linux下源码安装mysql步骤如下:yum updateyum upgradeyum install -y vim man wgetyum install -y gcc gcc-c++ gcc-g77 pcre-devel openssl-devel bison autoconf automake make libcu...

linux下源码安装mysql步骤如下:

yum update
yum upgrade
yum install -y vim man wget
yum install -y gcc gcc-c++ gcc-g77 pcre-devel openssl-devel bison autoconf automake make libcurl-devel gd-devel zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel*
wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz
wget http://mysql.cs.pu.edu.tw/Downloads/MySQL-5.5/mysql-5.5.30.tar.gz
tar -zxvf cmake-2.8.10.2.tar.gz 
cd cmake-2.8.10.2
./bootstrap 
gmake   
gmake install   
cd ..   
cmake --help   
cmake --version    
cp -rf ./cmake-2.8.10.2 /usr/local/cmake      
rm -rf ./cmake-2.8.10.2   
ls   
cmake --version       
groupadd mysql   
useradd -r -g mysql mysql
tar -zxvf mysql-5.5.30.tar.gz    
cd mysql-5.5.30   
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DSYSCONFDIR=/usr/local/mysql -DWITH_INNOBASE_STORAGE_ENGINE=1 -DDEFAULT_CHARSET=utf8 -DEXTRA_CHARSETS=all -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_USER=mysql -DMYSQL_TCP_PORT=3306 -DWITH_DEBUG=0   
make  
make install  
chown -R mysql.mysql /usr/local/mysql/  
cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf  
cd /usr/local/mysql/  
/usr/local/mysql/scripts/mysql_install_db --user=mysql  
cp support-files/mysql.server /etc/init.d/mysqld   
chmod +x /etc/init.d/mysqld  
chkconfig --level 345 mysqld on 
Vim /etc/profile
export  PATH=$PATH:$HOME/bin:/usr/local/mysql/bin:/usr/local/mysql/lib 
service mysqld start   
service mysqld stop

自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习

京ICP备14009008号-1@版权所有www.zixuephp.com

网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com

添加评论