标签:maria art har openssl connect tor libevent 用户 tar
源码编译安装Mairadb[root@node6 ~]# yum -y install bison bison-devel zlib-devel libcurl-devel libarchive-devel boost-devel gcc gcc-c++ cmake ncurses-devel gnutlsevel libxml2-devel openssl-devel libevent-devel libaio-devel
[root@node6 ~]#useradd -r -s /sbin/nologin -d /data/mysql mysql
[root@node6 ~]#mkdir /data/mysql
[root@node6 ~]#chown -R mysql.mysql /data/mysql/
[root@node6 ~]#tar xf mariadb-10.2.23.tar.gz
[root@node6 ~]#du -sh mariadb-10.2.23.tar.gz mariadb-10.2.23
69M mariadb-10.2.23.tar.gz
507M mariadb-10.2.23
[root@node6 ~]#cd mariadb-10.2.23
[root@node6 ~/mariadb-10.2.23]#cmake . > -DCMAKE_INSTALL_PREFIX=/app/mysql > -DMYSQL_DATADIR=/data/mysql/ > -DSYSCONFDIR=/etc > -DMYSQL_USER=mysql > -DWITH_INNOBASE_STORAGE_ENGINE=1 > -DWITH_ARCHIVE_STORAGE_ENGINE=1 > -DWITH_BLACKHOLE_STORAGE_ENGINE=1 > -DWITH_PARTITION_STORAGE_ENGINE=1 > -DWITHOUT_MROONGA_STORAGE_ENGINE=1 > -DWITH_DEBUG=0 > -DWITH_READLINE=1 > -DWITH_SSL=system > -DWITH_ZLIB=system > -DWITH_LIBWRAP=0 > -DENABLED_LOCAL_INFILE=1 > -DMYSQL_UNIX_ADDR=/data/mysql/mysql.sock > -DDEFAULT_CHARSET=utf8 > -DDEFAULT_COLLATION=utf8_general_ci
# make -j 4 使用CPU多线程 不过需要看CPU的实际核心数来
[root@node6 ~/mariadb-10.2.23]#make -j 4 && make install
[root@node6 /app/mysql]#scripts/mysql_install_db --user=mysql --datadir=/data/mysql
[root@node6 /app/mysql]#ls /data/mysql/ -l
total 110620
-rw-rw---- 1 mysql mysql 16384 May 2 11:34 aria_log.00000001
-rw-rw---- 1 mysql mysql 52 May 2 11:34 aria_log_control
-rw-rw---- 1 mysql mysql 938 May 2 11:34 ib_buffer_pool
-rw-rw---- 1 mysql mysql 12582912 May 2 11:34 ibdata1
-rw-rw---- 1 mysql mysql 50331648 May 2 11:34 ib_logfile0
-rw-rw---- 1 mysql mysql 50331648 May 2 11:34 ib_logfile1
drwx------ 2 mysql root 4096 May 2 11:34 mysql
drwx------ 2 mysql mysql 20 May 2 11:34 performance_schema
drwx------ 2 mysql root 6 May 2 11:34 test
[root@node6 /app/mysql]#vim /etc/profile.d/mysql.sh
export PATH=/app/mysql/bin:$PATH
[root@node6 /app/mysql]#. /etc/profile.d/mysql.sh
[root@node6 /app/mysql]#cp support-files/my-huge.cnf /etc/my.cnf
cp: overwrite ‘/etc/my.cnf’? y
[root@node6 /app/mysql]#cp support-files/mysql.server /etc/init.d/mysqld
[root@node6 /app/mysql]#chkconfig --add mysqld
[root@node6 /app/mysqlservice mysqld start
Starting mysqld (via systemctl): [ OK ]
[root@node6 ~]#mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 11
Server version: 10.2.23-MariaDB-log Source distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.00 sec)
MariaDB [(none)]>
标签:maria art har openssl connect tor libevent 用户 tar
原文地址:https://blog.51cto.com/dklwj/2388358