zhk2369 发表于 2018-7-30 09:14:51

使用Ansible部署SVN服务

# mkdir -p ~/tmp/apache/installdir/  
# wget http://pkgs.fedoraproject.org/lookaside/pkgs/httpd/httpd-2.2.22.tar.bz2/9fe3093194c8a57f085ff7c3fc43715f/httpd-2.2.22.tar.bz2   -O httpd-2.2.22.tar.bz2
  
# tar jxvf httpd-2.2.22.tar.bz2
  
# cd httpd-2.2.22
  
# ./configure --prefix=/opt/app/svn_base/httpd--enable-so --enable-dav --enable-dav-fs --enable-maintainer-mode --with-included-apr --enable-rewrite --enable-ssl --enable-proxy --enable-proxy-http
  
# make
  
# make install DESTDIR=~/tmp/apache/installdir/
  

  
# cd ~/tmp/apache
  
# cat beforeinstall.sh
  
#!/bin/bash
  
getent group apache >/dev/null || groupadd -g 48 -r apache
  
getent passwd apache >/dev/null || \
  
useradd -r -u 48 -g apache -s /sbin/nologin-c "Apache" apache
  
exit 0
  

  
# cat afterinstall.sh
  
#!/bin/bash
  
/sbin/chkconfig --add httpd
  
chown -R apache:apache /opt/data/svn_data/
  

  

  
# fpm -s dir -t rpm -n httpd--epoch 0 -v 2.2.22   --iteration 0.el6.centos    --force   --category"System Environment/Daemons"--license "GPL" --description 'The Apache HTTP Server is a powerfull http server'--rpm-summary="Apache HTTP Server" -a "x86_64"--url "http://httpd.apache.org/"    -C ~/tmp/apache/installdir/    --before-install ~/tmp/apache/beforeinstall.sh--after-install ~/tmp/apache/afterinstall.sh
  
Created package {:path=>"httpd-2.2.22-0.el6.centos.x86_64.rpm"}
页: [1]
查看完整版本: 使用Ansible部署SVN服务