1.Create a System user
# groupadd-r MySQL
# useradd-g mysql-r-s/sbin/nologin-m-d/mydata/data MySQL
# chown-r Mysql:mysql/mydata/data2. Download the package, create a symbolic link
# CD/USR/SRC
# ftp://172.16.0.1/pub/Sources/6.x86_64/mariadb
# tar XF mariadb-5.5.36-linux-x86_64.tar.gz-c/usr/local
# cd/usr/local
# ln-s mariadb-5.5.36 MySQL
3, create the database file directory/mydata/data (separate partition and mount), and modify the directory belongs to the main group MySQL
# Mkdir-pv/mydata/data
# chown Mysql:mysql/mydata4. Initialize the database
# Cd/usr/local/mysql
# scripts/mysql_install_db--user=mysql--datadir=/mydata/data
5. Provide configuration files
# cp/usr/local/mysql/support-files/my-large.cnf/etc/mysql/my.cnf
Add the following 2 lines to the configuration file
# Vim
/etc/mysql/my.cnf
6. Provide service script
# Cp/usr/local/mysql/support-files/mysql.server/etc/rc.d/init.d/mysqld
# chmod +x
/etc/rc.d/init.d/mysqld==> Add Execute Permissions
Write the MARIADB installation location and database storage location
in/etc/rc.d/init.d/mysqld
# chkconfig--list mysqld==> Test
# chkconfig--add mysqld
# chkconfig Mysqld on
# service MySQL start7.Provide path#
vim/etc/profile.d/mysql.sh
8, provide the man manual to the man command to find the path
to edit the/etc/man.config, add the following line:
Manpath/usr/local/mysql/man
9, Output mariadb header file to the System header file path
# Ln-sv/usr/local/mysql/include/usr/include/mysql
10, the output mariadb the library file to the system to find the path
# echo '/usr/local/mysql/lib ' >/etc/ld.so.conf.d/mysql.conf
The system is then re-loaded into the system library:
# Ldconfig
Universal Binary Format Installation MariaDB-5.5.36