fpm打包mysql-server
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了fpm打包mysql-server相关的知识,希望对你有一定的参考价值。
1.解压
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.配置安装zabbix后的初始化脚本
[[email protected] ~]# cat install_mysql.sh #!/bin/bash #创建用户 useradd mysql -s /sbin/nologin #修改权限 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.cnf cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld #创建软连接 ln -s /usr/local/mysql/bin/mysqld* /bin/ ln -s /usr/local/mysql/bin/mysql /bin/
3.打包
[[email protected] ~]# fpm -s dir -t rpm -n mysql-server -v 5.6.30 --post-install /root/install_mysql.sh -f /usr/local/mysql/ no value for epoch is set, defaulting to nil {:level=>:warn} no value for epoch is set, defaulting to nil {:level=>:warn} Created package {:path=>"mysql-server-5.6.30-1.x86_64.rpm"}
本文出自 “不抛弃!不放弃” 博客,请务必保留此出处http://thedream.blog.51cto.com/6427769/1870342
以上是关于fpm打包mysql-server的主要内容,如果未能解决你的问题,请参考以下文章