码迷,mamicode.com
首页 > 其他好文 > 详细

LNMP源码安装

时间:2015-12-05 19:28:53      阅读:170      评论:0      收藏:0      [点我收藏+]

标签:

1. mysql安装

# Preconfiguration setup
shell > groupadd mysql
shell > useradd -r -g mysql -s /bin/false mysql
# Beginning of source-build specific instructions
shell > tar zxvf mysql-5.7.9.tar.gz
shell > cd mysql-5.7.9

shell > cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql-5.7.9 -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DENABLED_LOCAL_INFILE=ON -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 -DWITH_READLINE=ON -DWITH_BOOST=/usr/local/src/boost-1.59.0 -DENABLED_LOCAL_INFILE=1 -DMYSQL_DATADIR=/data/mysql/data -DMYSQL_USER=mysql -DMYSQL_UNIX_ADDR=/data/mysql/data/mysql.sock 
shell > make
shell > make install
shell > ls -n /usr/local/mysql-5.7.9 /usr/local/mysql
shell > cd /usr/local/mysql
shell > chown -R mysql .
shell > chgrp -R mysql .

shell> bin/mysql_install_db --user=mysql    # Before MySQL 5.7.6
shell> bin/mysqld --initialize --user=mysql # MySQL 5.7.6 and up
shell> bin/mysql_ssl_rsa_setup              # MySQL 5.7.6 and up
shell> chown -R root .
shell> chown -R mysql /data/mysql/data
shell> bin/mysqld_safe --user=mysql &

shell> cp support-files/mysql.server /etc/init.d/mysql.server
 
 

 

LNMP源码安装

标签:

原文地址:http://www.cnblogs.com/robinpeng/p/5021962.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!