环境:centos5.8
安装fpm
yum install -y gcc zlib zlib-devel
wget
tar -zxvf ruby-1.8.7-p358.tar.gz
cd ruby-1.8.7-p358
./configure --enable-pthread
make
make install
cd ..
wget
tar zxvf rubygems-1.8.24.tgz
cd rubygems-1.8.24
ruby setup.rb
cd ..
gem source -r &&gem source -a
[-V显示详细信息]
gem install fpm -V
目录打包www目录:
fpm -s dir -t rpm -n myweb -v 0.0.1 /var/www
rpm -pq myweb-0.0.1-1.x86_64.rpm -l
rpm -ivh myweb-0.0.1-1.x86_64.rpm
//依赖关系
fpm -s dir -t rpm -n myweb -v 0.0.2 -d "httpd" /var/www
ruby实例:
实例2:
wget
tar -zxvf ruby-1.8.7-p358.tar.gz
cd ruby-1.8.7-p358
./configure --enable-pthread
make
rm -rf /tmp/installdir&&mkdir /tmp/installdir
make install DESTDIR=/tmp/installdir
fpm -s dir -t rpm -n ruby -v 1.8.7 -C /tmp/installdir usr/local/bin usr/local/lib usr/local/share
会提示修改spec信息
fpm -s dir -t rpm -n ruby -v 1.8.7 -e -C /tmp/installdir usr/local/bin usr/local/lib usr/local/share
阅读(2182) | 评论(0) | 转发(0) |