CentOS 6.6 + MariaDB 10 + centminmod.com
1.8K
Created via CentOS 6.6 host server via registry.hub.docker.com/u/centminmod/centos66epel/ for Centmin Mod LEMP stack work centminmod.com and switches to using MariaDB 10 default YUM repository instead of CentOS default Oracle MySQL.
yum -y install docker-io
docker pull centminmod/centos66mariadb10
Example, starting up 3x MariaDB 10 CentOS 6.6 docker containers named mdb1, mdb2 and mdb3 with same respective hostnames
docker run -t -i --name mdb1 -h mdb1 centminmod/centos66mariadb10 /bin/bash
docker run -t -i --name mdb2 -h mdb2 centminmod/centos66mariadb10 /bin/bash
docker run -t -i --name mdb2 -h mdb2 centminmod/centos66mariadb10 /bin/bash
on docker container run startup, will auto start MariaDB MySQL server and give you version number and then prompt you to secure your install by running /root/tools/setup.sh
Starting MySQL. SUCCESS!
mysqladmin Ver 9.1 Distrib 10.0.16-MariaDB, for Linux on x86_64
Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.
Server version 10.0.16-MariaDB
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 1 sec
Threads: 1 Questions: 2 Slow queries: 0 Opens: 0 Flush tables: 1 Open tables: 63 Queries per second avg: 2.000
to secure MySQL run /root/tools/setup.sh
Search for centminmod docker images
docker search centminmod
/root/tools/setup.sh contents
#/bin/bash
# ensure docker image is up to date
yum clean all
yum -y update
/etc/init.d/mysql restart
# secure mysql server
THEMYSQLPASS=$(openssl rand 12 -base64)
mysql -e "DROP USER ''@'localhost';"
mysql -e "DROP USER ''@'`hostname`';" 2>/dev/null
mysql -e "DROP DATABASE test;"
mysql -e "GRANT ALL ON *.* to 'root'@'172.17.%.%'; FLUSH PRIVILEGES;"
mysql -e "UPDATE mysql.user SET Password = PASSWORD('$THEMYSQLPASS') WHERE User = 'root'; FLUSH PRIVILEGES;"
cat > "/root/.my.cnf" <<EOF
[client]
user=root
password=$THEMYSQLPASS
EOF
echo ""
echo "-------------------------------------------------------"
echo "MySQL root user password set"
echo "MySQL root user added to /root/.my.cnf"
echo "-------------------------------------------------------"
echo "MySQL root password: $THEMYSQLPASS"
echo "-------------------------------------------------------"
#sed -i '/\/tmp\/setup.sh/d' ~/.bashrc
sed -i '/secure MySQL/d' ~/.bashrc
sed -i '/mysqladmin/d' ~/.bashrc
Process list
top -c
top - 01:11:58 up 22 days, 23 min, 0 users, load average: 0.12, 0.07, 0.01
Tasks: 4 total, 1 running, 3 sleeping, 0 stopped, 0 zombie
Cpu0 : 0.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu1 : 0.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu2 : 0.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu3 : 0.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu4 : 0.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu5 : 0.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu6 : 0.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu7 : 0.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 32813104k total, 12543132k used, 20269972k free, 355292k buffers
Swap: 16474108k total, 0k used, 16474108k free, 10255768k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 105m 1868 1504 S 0.0 0.0 0:00.01 /bin/bash
472 root 20 0 105m 1628 1312 S 0.0 0.0 0:00.01 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid- file=/
775 mysql 20 0 423m 77m 7984 S 0.0 0.2 0:00.05 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin -
814 root 20 0 14896 1204 992 R 0.0 0.0 0:00.00 top -c
Content type
Image
Digest
sha256:f2498f1f0…
Size
317.3 MB
Last updated
almost 11 years ago
docker pull centminmod/centos66mariadb10