使用Ansible部署SVN服务
2016-06-10 16:14
274 查看
1.使用fpm自定义打包apache和subversion的rpm包(可选,如果使用系统默认安装可以省略)
制作apache的rpm包
制作subversion的rpm包
2.安装使用Ansible
参考文档:
https://github.com/geerlingguy/ansible-role-svn
/article/4405063.html
本文出自 “Linux SA John” 博客,请务必保留此出处http://john88wang.blog.51cto.com/2165294/1787781
制作apache的rpm包
# 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"}
制作subversion的rpm包
# mkdir -p ~/tmp/svn/installdir # wget http://subversion.tigris.org/downloads/subversion-1.6.13.tar.bz2 -O subversion-1.6.13.tar.bz2 # wget http://subversion.tigris.org/downloads/subversion-deps-1.6.13.tar.bz2 -O subversion-deps-1.6.13.tar.bz2 # tar jxvf subversion-1.6.13.tar.bz2 # tar jxvf subversion-deps-1.6.13.tar.bz2 # cd subversion-1.6.13 # ./configure --prefix=/opt/app/svn_base/subversion --with-apxs=/opt/app/svn_ba se/httpd/bin/apxs --with-apr=/opt/app/svn_base/httpd/bin/apr-1-config --with-ap r-util=/opt/app/svn_base/httpd/bin/apu-1-config # make # make install DESTDIR=~/tmp/svn/installdir # fpm -s dir -t rpm -n subversion --epoch 0 -v 1.6.13 --iteration 0.el6.centos --force --category "Development/Tools" --license "GPL" --description 'A Modern Concurrent Version Control System' --rpm-summary="Subversion Control System" -a "x86_64" --url "http://subversion.apache.org/" -C ~/tmp/svn/installdir/ --before-install ~/tmp/svn/beforeinstall.sh --after-install ~/tmp/svn/afterinstall.sh Created package {:path=>"subversion-1.6.13-0.el6.centos.x86_64.rpm"}
2.安装使用Ansible
参考文档:
https://github.com/geerlingguy/ansible-role-svn
/article/4405063.html
本文出自 “Linux SA John” 博客,请务必保留此出处http://john88wang.blog.51cto.com/2165294/1787781
相关文章推荐
- webService学习5:Eclipse的TCP/IP工具
- handler.post和handler.sendMessage的区别和联系
- 01、分页功能
- spring引入properties文件,并在controller等层获得引入文件中属性的值
- pt,px,rem和em之间区别总结
- Android动画使用
- hdu 3861 The King’s Problem【强连通Kosaraju+最小路径覆盖】
- CSS笔记二
- 解决struts 启动过程中出现的 Unable to load configuration错误 3ff8
- GetMessage函数
- Android是选择自学还是选择培训?
- jquery中attr和prop的区别
- Mac平台编译mupdf-qt的开源项目
- mongodb概念
- C#日记——强大的查询LINQ
- WebView的使用(一)
- 九度OJ 1003
- 面试:哈希:最长连续子串
- 剑指offer(五十二)之对称的二叉树
- 购物车中数量增加与减少 根据数量改变总体价格 限制输入框输入其他非数字