rpmbuild

Linux 安装.src.rpm源码包的方法

ε祈祈猫儿з 提交于 2020-01-24 00:26:43
方法一:以setarch-1.3-1.src.rpm 软件包为例(可以到CSDN http://download.csdn.net/source/215173#acomment 下载 ) 假设该文件已经存在于/usr/local/src/下。在该目录下执行rpmbuild --rebuild --clean setarch-1.3-1.src.rpm 若顺利执行成功则会在/usr/src/redhat/RPMS/i386/目录下生成setarch-1.3-1.i386.rpm这个rpm文件。 接下来就是rpm的安装过程。 方法二: ( 1)rpm –ivh setarch-1.3-1.src.rpm 执行rpm安装命令 ( 2)cd /usr/src/redhat/SPECS 切换目录到/usr/src/redhat/SPECS (src.rpm包默认的解压目录) ( 3)rpmbuild –bp setarch-1.3-1 e.spec 执行rpmbuild会生成源码包 ( 4)cd /usr/src/redhat/BUILD/ setarch-1.3-1 切换到生成的源码包 ( 5)./configure 编译配置 ( 6)make 编译 ( 7)make install 安装 方法三: ( 1)rpm –ivh setarch-1.3-1 .src.rpm ( 2)cd

Linux 内核编译笔记

南楼画角 提交于 2020-01-22 18:17:01
  这几天处理一个线上设备异常重启问题,需要安装内核的debuginfo软件包。虽然OS团队提供了相关的debuginfo软件包, 但是还想自己尝试编译一次。   拿到了相关OS内核的src.rpm软件包,如下所示:   -rw-r--r-- 1 root root 82990501 Aug 8 2017 kernel-3.10.0-327.22.2.el7.cgsl1473.src.rpm    一般编译步骤如下: 安装src rpm包: # rpm -ihv kernel-3.10.0-327.22.2.el7.cgsl1473.src.rpm 注:一般会安装在/root/rpmbuild目录下 切换目录: # cd /root/rpmbuild 打补丁: # rpmbuild -bp SPECS/kernel.spec 编译内核的rpm: rpmbuild -ba SPECS/kernel.spec 编译完后,输出rpm包为: 如果想要指定安装目录,使用--define参数,编译过程如下: # rpm -ivh kernel-3.10.0-327.22.2.el7.cgsl1473.src.rpm --define "%_topdir /root/supermith" 安装目录信息: 切换目录: # cd /root/supermith 后面的命令也要带上--define参数

使用nginx作为http/https正向代理

喜夏-厌秋 提交于 2020-01-16 18:14:30
默认nginx是不支持https的正向代理的,要想通过nginx的正向代理,作为https服务器,需要增加一个模块并重新编译nginx。 环境: centos 7 所需要的文件: https://github.com/chobits/ngx_http_proxy_connect_module http://nginx.org/packages/centos/7/SRPMS/nginx-1.12.2-1.el7_4.ngx.src.rpm 安装编译工具 yum install gcc gcc-c++ make -y yum install rpm-build rpmdevtools -y 安装依赖 yum install pcre-devel pcre -y yum install zlib-devel zlib -y yum install openssl-devel openssl -y yum install redhat-lsb-core -y 下载nginx源码、模块源码及rpm构建包 cd /root # 用于支持https代理的模块 git clone https://github.com/chobits/ngx_http_proxy_connect_module.git # rpm构建及nginx源码 wget http://nginx.org/packages

(原创)FEDORA 17安装KVM虚拟机

老子叫甜甜 提交于 2020-01-05 08:43:09
1 软件安装 1.1测试环境和网络拓朴 大部分朋友估计也没有一个真实环境来完全整个的测试,所以我也是使用了在一台PC机上使用Vmware Workstation的方式来进行实验。总体结构是在PC机上安装vmware,vmware上安装fedora_17 64bit,然后在fedora上安装kvm以及openvswitch.在KVM里面安装了centos6.4,并且是最小化安装。我的拓朴图是在完全环境下,其实可以每个fedora17上只起一台或者两台KVM虚拟机,并不需要这么多。 网络交换机,是在单独一台VMWARE虚拟机上安装web-iou的cisco模拟器,因为web-iou支持带lacp的链路聚合,可以和openvswitch进行带lacp的bonding的实验。 这是实验环境,在实际操作中,我还会给每台vmware虚拟机多加一块eth虚拟网卡,并且每个网卡都桥接到真实网络环境,这样子就可以远程securtcrt和vnc进行实验操作了。我这个拓朴是完整的,包括bond也算在内,只是一般测试的话只需要安装一个eth的web-iou和一个eth的fedora 17就可以完全测试。 系统为fedora-17 64位,版本为3.3.4-5.fc17.x86_64 网络拓朴如下: 完整测试环境: 单台测试环境: 1.2需要安装的软件包 软件包版本要求: Gcc : 4.1 or 4.2

Distutils, older rpm, and customized spec file

孤者浪人 提交于 2020-01-05 08:42:37
问题 I finally got my program packaged in a RPM on Fedora 14 yesterday, and I thought that it would be easy to build it the same way on a CentOS 4.8 box. It turns out that the older version of rpm and distutils are severally limited, and I'm not having any luck working around it. The basic problem is that distutils with Python 2.7 supports an option called "--post-install" where I can specify a script. The script is included and is run when I install with yum or rpm. Everything is great. However,

Distutils, older rpm, and customized spec file

寵の児 提交于 2020-01-05 08:42:32
问题 I finally got my program packaged in a RPM on Fedora 14 yesterday, and I thought that it would be easy to build it the same way on a CentOS 4.8 box. It turns out that the older version of rpm and distutils are severally limited, and I'm not having any luck working around it. The basic problem is that distutils with Python 2.7 supports an option called "--post-install" where I can specify a script. The script is included and is run when I install with yum or rpm. Everything is great. However,

package installtion issue , rpm spec file , which include yum to install dependence

▼魔方 西西 提交于 2020-01-03 02:25:12
问题 im having this part of spec file , %post %{__mv} %{_sysconfdir}/sysconfig/data.py /opt/data.py %{__mv} %{_sysconfdir}/sysconfig/get-pip.py /opt/get-pip.py yum -y install python-psycopg2 python /opt/get-pip.py pip install setuptools --no-use-wheel --upgrade pip install requests echo -e "*/5 * * * * /usr/bin/python /opt/data.py" >> /var/spool/cron/root %files %{_sysconfdir}/sysconfig/data.py %{_sysconfdir}/sysconfig/get-pip.py %changelog the rpmbuild without error , but when i try to install

centos 6&7 升级openssh

拜拜、爱过 提交于 2020-01-03 00:49:30
1.查看现在的版本 # rpm -qa | grep openssh openssh-clients-6.6.1p1-22.el7.x86_64 openssh-server-6.6.1p1-22.el7.x86_64 openssh-6.6.1p1-22.el7.x86_64   2.下载新版本的openssh cd /usr/src wget http://mirrors.evowise.com/pub/OpenBSD/OpenSSH/portable/openssh-7.4p1.tar.gz tar -xvzf openssh-7.4p1.tar.gz    3.安装辅助包 yum install rpm-build gcc make wget openssl-devel krb5-devel pam-devel libX11-devel xmkmf libXt-devel    4.创建对应目录 mkdir -p /root/rpmbuild/{SOURCES,SPECS} cp ./openssh-7.5p1/contrib/redhat/openssh.spec /root/rpmbuild/SPECS/ cp openssh-7.5p1.tar.gz /root/rpmbuild/SOURCES/ cd /root/rpmbuild/SPECS/    5.修改

How to set the build area for rpmbuild per-invocation

谁说胖子不能爱 提交于 2019-12-31 08:28:29
问题 I'm modifying an automated build, and want to tell rpmbuild to use a specific build area when invoking it . This is similar to an existing question, but more specific. I don't want to run any of the build commands as the root user; the aim is only to have an RPM, not to install anything into the system. I don't want to require the user to change their dotfiles (e.g. $HOME/.rpmrc ); the build should be self-contained and not affect the user's existing settings. I don't want to hard-code the

rpmbuild simple copy of files

半世苍凉 提交于 2019-12-30 10:18:10
问题 Looking for someone to just clarify the %install macro when it comes to just placing files. I created a RPM without errors that is supposed to just take files from the buildroot and cp them to /usr/lib. What I have in the SPEC file for the %install is the following, and based on this post. I though that would be enough for the rpm to copy the files from the buildroot to the /usr/lib location. This is what I tried and it builds: %install mkdir -p %{buildroot}/usr/lib install -d %{buildroot}