shell 脚本安装MariaDB

释放双眼,带上耳机,听听看~!

#!/bin/bash

#Mariadb   superlee

#linux version centos6.7

cd /home/soft

wget https://downloads.mariadb.org/interstitial/mariadb-galera-10.0.16/bintar-linux-x86_64/mariadb-galera-10.0.16-linux-x86_64.tar.gz/from/http%3A//ftp.hosteurope.de/mirror/archive.mariadb.org/

[ -d /home/soft/mariadb-galera-10.0.16-linux-x86_64 ] || tar -zxvf mariadb-galera-10.0.16-linux-x86_64.tar.gz

mv /home/soft/mariadb-galera-10.0.16-linux-x86_64 mysql

groupadd mysql

useradd -g mysql -r mysql

cd /home/soft/mysql

./configure –prefix=/usr/local/mysql

make

make install

chown -R mysql.mysql mysql

/usr/local/mysql/bin/mysql_install_db –user=mysql –datadir=/home/data/mysql –basedir=/usr/local/mysql &

cd /home/data/

chown -R mysql.mysql mysql/

/usr/local/mysql/bin/mysql_safe –user=mysql &

cp /home/soft/mysql/support-files/mysql.server /etc/init.d/mysqld

cp /home/soft/mysql/support-files/my-medium.cnf /etc/my.cnf

/usr/local/mysql/bin/mysqladmin -u root password '123456'

/usr/local/mysql/bin/mysql_secure_installation

/etc/init.d/mysqld start

给TA打赏
共{{data.count}}人
人已打赏
安全技术安全运维

Windows服务器如何发现被黑

2018-5-20 12:24:31

安全技术

用node.js做cluster,监听异常的邮件提醒服务

2021-12-21 16:36:11

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索