rpm

RPM: loading bash script in %pre scriptlet

旧时模样 提交于 2020-01-01 18:09:04
问题 I've put some common utility scripts into common.sh , which I want to use in my RPM specfile during %pre . common.sh is located in the root of the RPM package. What I was planning to do is simply call something like source common.sh , but how can I access common.sh from the RPM during %pre ? 回答1: I was able to solve this using RPM macros, the following way: Before doing rpmbuild I have put common.spec into the SPECS folder. common.spec %define mymacro() (echo -n "My arg is %1 " ; sleep %1 ;

rpm安装mysql

烈酒焚心 提交于 2020-01-01 14:28:27
引言 之前安装mysql都是直接使用tar包安装,没有用过rpm,今天搞了一台腾讯云服务器,所以想尝试一种新的安装mysql的方式,下面分享安装过程和遇到的问题。 第一、下载rpm包 官网地址:mysql官网地址 第二、上传tar包到指定目录 第三、解压tar(注意命令参数) tar -xvf mysql-5.7.22-1.el7.x86_64.rpm-bundle.tar 解压结果如上图,会产生多个rpm包,我们不会用到这么多,只会用到其中的四个,依次执行下面命令 rpm -ivh mysql-community-common-5.7.22-1.el7.x86_64.rpm rpm -ivh mysql-community-libs-5.7.22-1.el7.x86_64.rpm rpm -ivh mysql-community-client-5.7.22-1.el7.x86_64.rpm rpm -ivh mysql-community-server-5.7.22-1.el7.x86_64.rpm 第四、执行某条命令会出现下面错误: libc.so.X(GLIBC_XXX)(64bit) is needed by 错误原因:linux本身自带的glibc版本不符合安装要求, 解决方案: 可以对glibc进行升级 参照连接: https://mp.csdn.net

How to install two different version of same package with yum

吃可爱长大的小学妹 提交于 2020-01-01 08:47:21
问题 Say I want to install two different versions of same package. To be specific, I want to install two versions of Javascript binding for GNOME, gjs package. I want to have gjs-1.38.1-1.fc20.x86_64 and gjs-1.36.1-1.fc19.x86_64 . There are other packages in Fedora 20 which greatly depends on gjs-1.38.1-1.fc20.x86_64 so it's impossible to replace it by gjs-1.36.1-1.fc19.x86_64 . I have one specific program that is not compatible with gjs-1.38.1-1.fc20.x86_64 and needs the previous one. So is it

linux rpm方式安装mysql5.1

狂风中的少年 提交于 2020-01-01 03:39:19
一、首先两台服务器安装好mysql数据库环境 参照 linux rpm方式安装mysql5.1 https://www.cnblogs.com/sky-cheng/p/10564604.html 二、主库master上创建主从复制账号 mysql> grant replication slave,replication client on *.* to 'repl'@'%' identified by 'Zaq1xsw@'; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> select user,host from user; +---------------+-----------+ | user | host | +---------------+-----------+ | repl | % | | root | % | | mysql.session | localhost | |

软件包管理(rpm与yum)

杀马特。学长 韩版系。学妹 提交于 2020-01-01 02:54:36
rpm管理 常用命令 rpm - qa //查询 卸载 rpm - e ( erase ) 升级 rpm - Uvh yum 现在用的多 可以下载依赖包,课设也用过了 来源: CSDN 作者: 眯眯眼:) 链接: https://blog.csdn.net/qq_43430273/article/details/103753200

linux rpm方式安装mysql5.1

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-01 01:31:27
一、首先两台服务器安装好mysql数据库环境 参照 linux rpm方式安装mysql5.1 https://www.cnblogs.com/sky-cheng/p/10564604.html 二、在两台mysql上都创建复制账号 mysql> grant replication slave,replication client on *.* to 'repl'@'%' identified by 'Zaq1xsw@'; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> select user,host from user; +---------------+-----------+ | user | host | +---------------+-----------+ | repl | % | | root | % | | mysql.session | localhost | |

centos7.2安装mysql5.7

我与影子孤独终老i 提交于 2020-01-01 00:44:57
1、安装前工作 在安装前需要确定现在这个系统有没有 mysql,如果有那么必须卸载(在 centos7 自带的是 mariaDb 数据库,所以第一步是卸载数据库)。 卸载系统自带的Mariadb : 查看mariadb数据库: rpm -qa | grep mariadb 卸载mariadb数据库: rpm -e --nodeps mariadb文件名 卸载已安装的mysql : 查看 mysql 数据库: rpm -qa | grep -i mysql 卸载 mysql 数据库: rpm -e mysql文件名 # 如果有关联文件,不能直接卸载。可以用一下命令强制卸载:rpm -e --nodeps mysql文件名) 删除etc目录下的my.cnf文件 : rm /etc/my.cnf 2、rpm包安装方法 2.1 下载 下载离线包:mysql官网(https://www.mysql.com/)→ DOWNLOADS 、 Community 、 MySQL Community Server →下拉选择系统版本。 →选择形如mysql-5.7.20-1.el7.x86_64.rpm-bundle.tar的包下载,这个是总包,下面是子包,为避免yum源找不到镜像,推荐下载总包。 2.2 解压 将 mysql-5. 7. 20-1.el7.x86_64.rpm-bundle.tar

CentOS 安装MySQL rpm方式安装

混江龙づ霸主 提交于 2020-01-01 00:37:51
MySQL源码方式安装: https://www.cnblogs.com/deverz/p/10997723.html 从最新版本的linux系统开始,默认的是 Mariadb而不是mysql!这里依旧以mysql为例进行展示 1、先检查系统是否装有mysql rpm -qa | grep mysql 返回空值,说明没有安装 我们现在执行安装命令是无效的,因为centos-7默认是Mariadb,所以执行以下命令只是更新Mariadb数据库 yum install mysql 先删除可用系统内置的MySQL也删除掉就是rpm -qa | grep mysql 到的内容 yum remove mysql 2、下载mysql的repo源【可以去这里面 http://repo.mysql.com 找到需要的源】 wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm 安装mysql-community-release-el7-5.noarch.rpm包 rpm -ivh mysql-community-release-el7-5.noarch.rpm 安装这个包后,会获得两个mysql的yum repo源: 分别为 : /etc/yum.repos.d/mysql-community.repo 和 /etc

redhat上安装MySQL5.7.12

烈酒焚心 提交于 2020-01-01 00:37:03
0.下载mysql wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.12-1.el6.x86_64.rpm-bundle.tar 1.查找是否安装 [root@mysql opt]# rpm -qa|grep mysql 查找是否安装mysql,结果如下 mysql-libs-5.1.73-3.el6_5.x86_64 [root@mysql opt]# rpm -e --nodeps mysql-libs-5.1.73-3.el6_5.x86_64 卸载mysql [root@cmos1 mysql]# rpm -qa | grep mysql mysql-libs-5.1.73-3.el6_5.x86_64 [root@cmos1 mysql]# rpm -e --nodeps mysql-libs-5.1.73-3.el6_5.x86_64 [root@cmos1 mysql]# rpm -qa | grep mysql [root@cmos1 mysql]# 2. 解压 tar -xf mysql-5.7.12-1.el6.x86_64.rpm-bundle.tar 解压完成后由这么几个文件: mysql-community-client-5.7.12-1.el6.x86_64.rpm mysql

RedHat7.3安装MySQL5.7

霸气de小男生 提交于 2020-01-01 00:36:33
1.下载Mysql安装包 https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.20-1.el6.x86_64.rpm-bundle.tar 附百度云盘下载链接:链接:https://pan.baidu.com/s/1hsndQJi 密码:cjez 解压查看: 2.卸载旧的mysql 查找以前是否安装有mysql [ root@master ~]# rpm - qa | grep - i mysql 如果木有结果,可以进行下一步的mysql数据库安装 如果出现mysql的相关文件,说明已经安装,如: 停止mysql服务、删除之前安装的mysql 删除命令: rpm -e --nodeps 包名 [ root@master ~]# rpm - e -- nodeps mysql - community - client - 5.7 . 20 - 1.el6.x86 _64 [ root@master ~]# rpm - e -- nodeps mysql - community - server - 5.7 . 20 - 1.el6.x86 _64 [ root@master ~]# rpm - e -- nodeps mysql - community - devel - 5.7 . 20 - 1.el6.x86 _64 [