-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmariadb_install.txt
66 lines (55 loc) · 2.19 KB
/
mariadb_install.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
yum update
yum install yum-utils
yum install epel-release
yum install jemalloc
yum install ncurses-devel libxml2-devel openssl-devel
yum install libaio-devel libcurl-devel libarchive-devel boost boost-devel
yum install cmake
jdk安装
vim /etc/profile
export JAVA_HOME=
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
source /etc/profile
groupadd mysql
useradd -g mysql mysql -s /sbin/nologin
chown mysql:mysql /usr/local/mysql/ -R
cmake .
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql # 安装根目录
-DMYSQL_DATADIR=/usr/local/mysql/data # 数据存储目录
-DTMPDIR=/usr/local/mysql/tmp # 临时文件存放目录
-DMYSQL_UNIX_ADDR=/usr/local/mysql/run/mysqld.sock # UNIX socket文件
-DSYSCONFDIR=/etc #配置文件存放目录
-DWITH_MYISAM_STORAGE_ENGINE=1 # Myisam 引擎支持
-DWITH_INNOBASE_STORAGE_ENGINE=1 # innoDB 引擎支持
-DWITH_ARCHIVE_STORAGE_ENGINE=1 # ARCHIVE 引擎支持
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 # BLACKHOLE 引擎支持
-DWITH_PERFSCHEMA_STORAGE_ENGINE=1 # PERFSCHEMA 引擎支持
-DWITH_FEDERATED_STORAGE_ENGINE=1 # FEDERATEDX 引擎支持
-DWITH_TOKUDB_STORAGE_ENGINE=1 # TOKUDB 引擎支持
-DWITH_XTRADB_STORAGE_ENGINE=1 # XTRADB 引擎支持
-DWITH_ARIA_STORAGE_ENGINE=1 # ARIA 引擎支持
-DWITH_PARTITION_STORAGE_ENGINE=1 # PARTITION 引擎支持
-DWITH_SPHINX_STORAGE_ENGINE=1 # SPHINX 引擎支持
-DWITH_READLINE=1 # readline库
-DMYSQL_TCP_PORT=3306 # TCP/IP端口
-DENABLED_LOCAL_INFILE=1 #启用加载本地数据
-DWITH_EXTRA_CHARSETS=all # 扩展支持编码 ( all | utf8,gbk,gb2312 | none )
-DEXTRA_CHARSETS=all all # 扩展字符支持
-DDEFAULT_CHARSET=utf8 # 默认字符集
-DDEFAULT_COLLATION=utf8_general_ci # 默认字符校对
-DCMAKE_EXE_LINKER_FLAGS='-ljemalloc' #Jemalloc内存管理库
-DWITH_SAFEMALLOC=OFF #关闭默认内存管理
-DWITH_DEBUG=0
-DENABLE_PROFILING=1
-DWITH_SSL=system
-DWITH_ZLIB=system
-DWITH_LIBWRAP=0
make
make install
mysql_install_db --defaults-files=/etc/my.cnf --user=mysql
mysqld_safe --defaults-file=/etc/mysql.cnf
可以看 hostname.err
support-files/mysql.server
export PATH=/usr/local/mariadb/bin/:$PATH
bin/mysql -uroot -h 127.0.0.1