1. Unzip
TAR-XF mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz-c/usr/local/cd/usr/local/&& MV Mysql-5.6.30-linux-glibc2.5-x86_64/mysql
2. Configure the Init script after installing Zabbix
[[email protected] ~]# cat install_mysql.sh #!/bin/bash# Create user useradd mysql-s/sbin/nologin# Modify Permissions Chown-r mysql.mysql/usr/ Local/mysql/chown-r mysql.mysql/var/lib/mysql/#拷贝配置文件和启动脚本cp/usr/local/mysql/support-files/my-default.cnf/etc/ my.cnfcp/usr/local/mysql/support-files/mysql.server/etc/init.d/mysqld# creating a soft connection ln-s/usr/local/mysql/bin/mysqld*/ Bin/ln-s/usr/local/mysql/bin/mysql/bin/
3. Packaging
[Email protected] ~]# fpm-s dir-t rpm-n mysql-server-v 5.6.30--post-install/root/install_mysql.sh-f/usr/local/mys Ql/no value for epoch was set, defaulting to nil {: Level=>:warn}no value for epoch was set, defaulting to nil {: Level=> ;: warn}created Package {:p ath=> "mysql-server-5.6.30-1.x86_64.rpm"}
This article from "Do not abandon!" Do not give up "blog, be sure to keep this source http://thedream.blog.51cto.com/6427769/1870342
FPM Pack Mysql-server