|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
文件处理命令:file、mkdir、grep、dd、find、mv、ls、diff、cat、ln
固然入手下手在MySQL5.5.8的编译过程当中碰到了一些成绩,由于之前从未打仗过Cmake体例的编译,在查阅官方手册并分离谷歌,终究把成绩弄定了。
今朝Nginx的worker_processes设置为4,php-fpm设置为dynamic形式,max_children=32,start_servers=8,min_spare_servers=4,max_spare_servers=16,max_request=512的情况下,540MB内存残剩380MB,比拟之前用ZendServerCE搭建的LAMP内存开支,优化效果仍是非常分明的,并且网站速率也很幻想,给我最年夜的感觉就是页面哀求的呼应速率比之前年夜年夜提拔了。
鉴于MySQL5.5.8这个新产物公布不久,网上的相干材料匮乏,增补一些本人在编译上的内容(注重,我由于本人对innodb无需求,因而屏障了innodb引擎,假如必要能够开启参数-DWITH_INNOBASE_STORAGE_ENGINE=1。
.代码以下:
#downloadsoftwarepackage
wgethttp://www.ckuyun.com/files/v2.8/cmake-2.8.3.tar.gz
wgethttp://ftp.gnu.org/gnu/bison/bison-2.4.3.tar.gz
tarzxvfcmake-2.8.3.tar.gz
cdcmake-2.8.3/
./configure--prefix=/usr
gmake
gmakeinstall
cd../
tarzxvfbison-2.4.3.tar.gz
cdcdbison-2.4.3
./configure
make
makeinstall
#installmysql5.5.8
/usr/sbin/groupaddmysql
/usr/sbin/useradd-gmysqlmysql
mkdir-p/data/mysql
chown-Rmysql:mysql/data/mysql
tarzxvfmysql-5.5.8.tar.gz
cdmysql-5.5.8
cmake.-DCMAKE_INSTALL_PREFIX=/usr/local/mysql-DMYSQL_DATADIR=/data/mysql-DWITHOUT_INNOBASE_STORAGE_ENGINE=1-DWITH_MEMORY_STORAGE_ENGINE=1-DWITH_MYISAM_STORAGE_ENGINE=1-DSYSCONFDIR=/etc/-DWITH_SSL=yes-DDEFAULT_CHARSET=utf8-DDEFAULT_COLLATION=utf8_general_ci-DWITH_READLINE=on
make
makeinstall
/usr/local/mysql/scripts/mysql_install_db--basedir=/usr/local/mysql/--datadir=/data/mysql--user=mysql
#modifymysqlconfig
vim/etc/my.cnf
[client]
port=3306
socket=/tmp/mysql.sock
[mysqld]
port=3306
socket=/tmp/mysql.sock
skip-external-locking
key_buffer_size=256M
max_allowed_packet=1M
table_open_cache=256
sort_buffer_size=1M
read_buffer_size=1M
read_rnd_buffer_size=4M
myisam_sort_buffer_size=64M
thread_cache_size=8
query_cache_size=16M
thread_concurrency=1
basedir=/usr/local/mysql
datadir=/data/mysql
default-storage-engine=myisam
log-bin=mysql-bin
binlog_format=mixed
server-id=1
[mysqldump]
quick
max_allowed_packet=16M
[mysql]
no-auto-rehash
[myisamchk]
key_buffer_size=128M
sort_buffer_size=128M
read_buffer=2M
write_buffer=2M
[mysqlhotcopy]
interactive-timeout
#addtobootconfig
cp/usr/local/mysql/support-files/mysql.server/etc/rc.d/init.d/mysqld
chkconfig--addmysqld
/etc/rc.d/init.d/mysqldstart
/usr/local/mysql/bin/mysql-uroot-p-S/tmp/mysql.sock
PS:假如在编译PHP的时分报错errorwhileloadingsharedlibraries:libmysqlclient.so.16:cannotopensharedobjectfile:Nosuchfileordirectory,能够经由过程以下办法办理:
.代码以下:
ln-s/usr/local/mysql/lib/mysql/libmysqlclient.so.16/usr/lib/libmysqlclient.so.16
如果你想在以后的生涯中在软件行业工作的话,学习linux是一项基本技能,所以打从你打算学习linux那天起,放弃windows吧!因为它除了能给你带来片刻的娱乐,别无其他; |
|