mysql5.5.20原始碼安裝
rpm -qa|grep bison
rpm -qa|grep ncurses-devel
yum install bison
yum install ncurses-devel.x86_64
從http://www.cmake.org/cmake/resources/software.html
下載cmake-2.8.7.tar.gz
從mysql.com
下載Source Code package : mysql-5.5.20.tar.gz
安裝cmake
# tar zxvf cmake-2.8.7.tar.gz
# cd cmake-2.8.7
# ./bootstrap
# gmake
# gamke install
安裝mysql
tar zxvf mysql-5.5.20.tar.gz
cd mysql-5.5.20
cmake -DCMAKE_INSTALL_PREFIX=/data/mysql \
-DMYSQL_UNIX_ADDR=/data/mysql/data/mysql.sock \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_EXTRA_CHARSETS=gbk \
-DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \
-DWITH_FEDERATED_STORAGE_ENGINE=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-DWITH_READLINE=1 \
-DMYSQL_DATADIR=/data/mysql/data \
-DSYSCONFDIR=/data/mysql \
-DMYSQL_TCP_PORT=3306
# make
# make install
# groupadd mysql
# useradd -r -g mysql mysql
# chown -R mysql:mysql /home/mysqldata/
cp /mysqlfile/mysql-5.5.20/support-files/my-large.cnf /data/mysql/my.cnf
cp /mysqlfile/mysql-5.5.20/support-files/mysql.server /etc/init.d/mysqld
chown mysql:mysql /data/mysql/my.cnf
chown mysql:mysql /etc/init.d/mysqld
chmod 744 /etc/init.d/mysqld
chmod +x scripts/mysql_install_db
scripts/mysql_install_db \
--defaults-file=/data/mysql/my.cnf \
--basedir=/data/mysql/ \
--datadir=/data/mysql/data/ \
--user=mysql \
--skip-name-resolve
#增加PATH設定
PATH=$PATH:/data/mysql/bin
# . ~/.bash_profile
# chkconfig --add mysqld
###### chkconfig --level 345 mysqld on
# /etc/init.d/mysqld start OR mysqld_safe & OR service mysqld start
###### mysqld_multi
#修改密碼
# mysqladmin -uroot password "xxxxxx"
引數配置:
[mysqld]
server_id=1
federated
datadir=/data/mysql/data
tmpdir=/data/mysql/tmp
skip-external-locking
key_buffer_size = 256M
myisam_sort_buffer_size = 64M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 24
back_log = 1024
max_connections = 1200
table_definition_cache=120000
table_open_cache =120000
max_connect_errors = 300
max_allowed_packet = 24M
read_rnd_buffer_size = 4M
read_buffer_size = 4M
join_buffer_size = 4M
sort_buffer_size = 2M
query_cache_limit = 2M
query_cache_size = 1024M
query_cache_min_res_unit=2k
thread_cache_size = 1200
thread_stack = 128K
tmp_table_size = 256M
max_tmp_tables = 256
bulk_insert_buffer_size = 4M
binlog_cache_size = 2M
max_binlog_size = 128M
max_binlog_cache_size= 512M
# log
log-error=/data/mysql/log/log
log-bin=/data/mysql/log/mysql-bin
slow-query-log
slow-query-log-file=/data/mysql/log/slow.log
long_query_time=1
log-queries-not-using-indexes
# innodb
innodb_buffer_pool_size = 20480M
innodb_data_home_dir = /data/mysql/data
innodb_data_file_path = ibdata1:10M:autoextend
innodb_file_per_table= 1
innodb_log_group_home_dir = /data/mysql/log
innodb_log_files_in_group=3
innodb_log_file_size = 512M
innodb_log_buffer_size = 16M
#innodb_file_io_threads = 4
innodb_thread_concurrency = 24
innodb_lock_wait_timeout = 100
innodb_flush_method = 'O_DIRECT'
innodb_max_dirty_pages_pct = 75
# innodb_flush_log_at_trx_commit=2
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/756652/viewspace-715414/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 原始碼安裝openresty原始碼REST
- nginx原始碼安裝Nginx原始碼
- 原始碼安裝postgresql原始碼SQL
- Nginx 原始碼安裝Nginx原始碼
- 原始碼安裝GO原始碼Go
- PostgreSQL 10.12 安裝系列 - 原始碼安裝SQL原始碼
- 【推薦 - 原始碼安裝】nginx - 安裝原始碼Nginx
- yum安裝與原始碼安裝比較原始碼
- Mysql for Linux安裝配置之—— 原始碼安裝MySqlLinux原始碼
- linux安裝python3(原始碼安裝)LinuxPython原始碼
- MySQL 5.7.28 原始碼安裝MySql原始碼
- paramiko 2.4.1原始碼安裝原始碼
- macbook 原始碼安裝 redisMac原始碼Redis
- macbook 原始碼安裝 nginxMac原始碼Nginx
- docker原始碼安裝NginxDocker原始碼Nginx
- 【PG安裝】postgresql10 for linux 原始碼安裝SQLLinux原始碼
- 連網安裝mysql與原始碼安裝mysqlMySql原始碼
- EOS原始碼分析(1)安裝原始碼
- PostgreSQL-原始碼安裝(一)SQL原始碼
- 原始碼編譯安裝Redis原始碼編譯Redis
- openeuler原始碼安裝Postgresql 16原始碼SQL
- 原始碼安裝Nginx和PHP原始碼NginxPHP
- 原始碼包安裝過程原始碼
- linux-原始碼的編譯安裝和解除安裝Linux原始碼編譯
- Greenplum_原始碼編譯安裝和RPM包安裝原始碼編譯
- samba原始碼安裝及除錯Samba原始碼除錯
- CentOS7原始碼安裝NginxCentOS原始碼Nginx
- 原始碼編譯安裝的原理原始碼編譯
- 從原始碼安裝GDB-8.1原始碼
- 【轉】MySQL原始碼編譯安裝MySql原始碼編譯
- CentOS 7 原始碼安裝 Zabbix 6.0CentOS原始碼
- PostgreSQL 13 原始碼安裝(#1.1)-202103SQL原始碼
- postgresql 12.5軟體原始碼安裝SQL原始碼
- PostgreSQL原始碼學習 win10原始碼編譯安裝SQL原始碼Win10編譯
- mysql8.0原始碼一鍵安裝指令碼MySql原始碼指令碼
- MySQL5.7.16原始碼編譯安裝MySql原始碼編譯
- linux下通過原始碼安裝gitLinux原始碼Git
- zabbix3.4原始碼安裝步驟原始碼