centost6.0 64位自作rpm包64位

(一)Courier-IMAP, Courier-Authlib Maildrop源码编译成rpm 64位包
检查系统是否安装如下软件:
rpm-build gcc mysql-devel openssl-devel cyrus-sasl-devel pkgconfig zlib-devel pcre-devel openldap-devel postgresql-devel expect libtool-ltdl-devel openldap-servers libtool gdbm-devel pam-devel gamin-devel libidn-devel
构建安装包不能在root用户下构建,需要新建一个用户
useradd -m -s /bin/bash mandg
passwd mandg
安装过程中需要使用sudo 以获得root权限
visudo
root    ALL=(ALL)       ALL  
mandg   ALL=(ALL)       ALL  

su - mandg
创建一些环境目录
mkdir $HOME/rpm
mkdir $HOME/rpm/SOURCES
mkdir $HOME/rpm/SPECS
mkdir $HOME/rpm/BUILD
mkdir $HOME/rpm/BUILDROOT
mkdir $HOME/rpm/SRPMS
mkdir $HOME/rpm/RPMS
mkdir $HOME/rpm/RPMS/i386
mkdir $HOME/rpm/RPMS/x86_64 echo "%_topdir $HOME/rpm" >> $HOME/.rpmmacros
创建一个下载目录
mkdir $HOME/downloads
cd $HOME/downloads
wget https://sourceforge.net/projects/courier/files/authlib/0.63.0/courier-authlib-0.63.0.tar.bz2/download
wget
https://sourceforge.net/projects/courier/files/imap/4.9.3/courier-imap-4.9.3.tar.bz2/download
wget
https://sourceforge.net/projects/courier/files/maildrop/2.5.5/maildrop-2.5.5.tar.bz2/download
编译courier-authlib为rpm包
sudo rpmbuild -ta courier-authlib-0.63.0.tar.bz2
安装courier-authlib
sudo rpm -ivh /root/rpmbuild/RPMS/x86_64/courier-authlib-0.63.0-1.el6.x86_64.rpm /root/rpmbuild/RPMS/x86_64/courier-authlib-mysql-0.63.0-1.el6.x86_64.rpm /root/rpmbuild/RPMS/x86_64/courier-authlib-devel-0.63.0-1.el6.x86_64.rpm
创建Courier-Imap需要的目录
cd $HOME/downloads
sudo mkdir -p /var/cache/ccache/tmp
sudo chmod o+rwx /var/cache/ccache/
sudo chmod 777 /var/cache/ccache/tmp
编译Courier-Imap源码为rpm包
rpmbuild -ta courier-imap-4.9.3.tar.bz2
安装courier-imap
cd $HOME/rpm/RPMS/x86_64
sudo rpm -ivh courier-imap-4.9.3-1.x86_64.rpm
编译maildrop源码为rpm包
cd $HOME/downloads
sudo rpmbuild -ta maildrop-2.5.5.tar.bz2
安装maildrop
sudo rpm -ivh /root/rpmbuild/RPMS/x86_64/maildrop-2.5.5-1.x86_64.rpm

本文出自 “dsafsa_技术博客” 博客,谢绝转载!

你可能感兴趣的:(centos,maildrop)