ANSIBLE+NGINX+APACHE+SVN Automation Release

Source: Internet
Author: User

ansible+nginx+apache+svn自动化发布(隐藏真实ip以及路径)

A. Ansible is installed according to the following URL
http://blog.51cto.com/8999a/1965139
Two. NGINX+APACHE+SVN Installation

RPM-IVH http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
Yum Install httpd Subversion mod_dav_svn nginx-y
Htpasswd-cm/etc/svn-auth-accounts Root
Remove the-c option when you need to add a new user
Mkdir/var/www/svn
Cd/var/www/svn
Svnadmin Create Repo
Cd/repo/conf
Vim svnserve.conf
Open a Comment
Anon-access = Read
auth-access = Write
Password-db = passwd
Authz-db = Authz
Realm = Repo

Set anon-access = None #可以打开查看日志
Vim passwd
Create user password I'm using the root above.
root = QQQQQQ
Vim Authz
[/]
Root = RW
Chown-r Apache.apache repo/

Vim/etc/httpd/conf/httpd.conf
Listen 90
Change the listening port here to 90.
Add at the end of the file
<Location/svn>
DAV SVN
svnparentpath/var/www/svn/
AuthType Basic
AuthName "SVN Repository"
Authuserfile/etc/svn-auth-accounts
Authzsvnaccessfile/var/www/svn/repo/conf/authz
Require Valid-user
</Location>

/ETC/INIT.D/HTTPD restart
cd/mnt/
mkdir test
CD test/
Touch AAA
Touch BBB
Touch QQQ
Cd..
CD-
SVN import-m "FISASDA"/mnt/test/file:///var/www/svn/repo/test
The test can be edited directly
Vim/etc/nginx/conf.d/default.conf
server {
Listen 80;
server_name svn.test33.com; #这个填写域名以及解析到你服务器的ip
Location/{
Proxy_set_header? Host? $host;
Proxy_set_header? X-real-ip? $remote _addr;
#proxy_set_header? X-forwarded-proto?https; It's not HTTPS, so I'm commenting.
Proxy_set_header? X-forwarded-for? $proxy _add_x_forwarded_for;
proxy_pass?http://localhost:90; #这个就是反向代理到apache进行处理
}

/ETC/INIT.D/HTTPD restart
/etc/init.d/nginx restart
Enter this address to access it on behalf of the successful deployment
Http://svn.test33.com/svn/repo/test
Ansible to set up a key-free login with SVN and SVN to set up a key-free login with a backend server that needs to publish code
Ansible Setting the key-free
SSH-KEYGEN-T RSA
Ssh-copy-id-i ~/.ssh/id_rsa.pub [email protected] Server IP #把公钥拷贝到svn上
SVN set-up key-free login
SSH-KEYGEN-T RSA
Ssh-copy-id-i ~/.ssh/id_rsa.pub [email protected] Backend server IP #把公钥拷贝到svn上
These settings, you can set the automatic release of the

ANSIBLE+NGINX+APACHE+SVN Automation Release

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.