标签:png ldb libcurl amp 安全策略 def art login 存储
useradd -r -d /data/mysqldb -s /sbin/nologin mysql
看官方文档,确认编译的路径/usr/local/mysql
tar xvf mariadb-10.2.15-linux-x86_64.tar.gz -C /usr/local/
ln -s mariadb-10.2.15-linux-x86_64 mysql
chown -R root:root mysql/
echo PATH=/usr/local/mysql/bin:$PATH > /etc/profile.d/mysql.sh
mkdir -pv /data/mysqldb
chown mysql.mysql /data/mysqldb
chmod 770 /data/mysqldb
cd /usr/local/mysql
scripts/mysql_install_db --datadir=/data/mysqldb --user=mysql
更改配置文件
cd /usr/local/mysql
cp support-files/my-huge.cnf /etc/my.cnf
vim /etc/my.cnf
[mysqld]服务器配置
datadir =/data/mysqldb
cd /usr/local/mysql
cp support-files/mysql.server /etc/init.d/mysqld
chkconfig --add mysqld
service mysqld start
/usr/local/mysql/bin/mysqld --print-defaults(检查默认配置)
mysql_secure_installation (设置安全策略)
mysql -uroot -pverimatrix (登录数据库)
yum install bison bison-devel zlib-devel libcurl-devel libarchive-devel boost-devel gcc gcc-c++ cmake libevent-devel gnutls-devel libaio-devel openssl-devel ncurses-devel libxml2-devel
useradd -r -s /sbin/nologin mysql
tar xvf mariadb-10.2.15.tar.gz
mkdir -pv /data/mysqldb
chown mysql.mysql /data/mysqldb
cd mariadb-10.2.12/
cmake . \
-DCMAKE_INSTALL_PREFIX=/app/mysql \
-DMYSQL_DATADIR=/data/mysqldb/ \
-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=/tmp/mysql.sock \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci
make -j 2 && make install
echo ‘PATH=/app/mysql/bin:$PATH‘ > /etc/profile.d/mysql.sh
. /etc/profile.d/mysql.sh
cd /app/mysql/
scripts/mysql_install_db --datadir=/data/mysqldb/ --user=mysql
cp /app/mysql/support-files/my-huge.cnf /etc/my.cnf
标签:png ldb libcurl amp 安全策略 def art login 存储
原文地址:https://www.cnblogs.com/liangjindong/p/9140485.html