How to use Rex to manage your server? (1)

Source: Internet
Author: User

Rex is a server coordination and configuration management tool. With Rex, you can manage all servers in a centralized manner through the complete configuration management and software deployment processes.

In short, Rex is like the Make command. There is a centralized Rexfile in which you can define tasks. These tasks are executed on a remote machine through SSH. The task is written in common perl.

You can visit the website http://rexify.org/#rex.

Preface

In this article, I will use Subversion to manage all tasks. You can also use any other Software Configuration Management (SCM) system as long as it supports commands similar to Subversion External commands. I use Ubuntu 12.04, but you can also use other releases.

I will not add the suffix "sudo" after each command. If necessary, use "sudo ".

In this article, I will create two sample projects. One project is "website" and the other is "database", because in large companies, system administrators and database administrators are often set up separately. Both projects use common tasks that can be managed by the central operation team ).

I will use multiple servers:

• Subversion server, svn01

• Database Server, db01

• Web server, web01

• Workstation, wks01

Create a version Library

First, you must install all required software packages. Run this command on the Subversion server.

Svn01 # apt-get install libapache2-svn subversion apache2-mpm-prefork

Now, edit the/etc/apache2/mod-enabled/dav_svn.conf file and paste the following code into the file (Replace the existing content ).

DAV svn

SVNParentPath/var/lib/svn

AuthType Basic

AuthName "Subversion Repository"

AuthUserFile/etc/apache2/dav_svn.passwd

Require valid-user

Now, create the directory/var/lib/svn and all required version libraries. I will describe the version library content later.

Svn01 # mkdir/var/lib/svn

Svn01 # cd/var/lib/svn

Svn01/var/lib/svn # svnadmin create common

Svn01/var/lib/svn # svnadmin create service

Svn01/var/lib/svn # svnadmin create database

Svn01/var/lib/svn # svnadmin create website

Svn01/var/lib/svn # chown-R www-data:

After we create a version library, we need to establish a verification mechanism for apache.

Svn01 # htpasswd-c/etc/apache2/dav_svn.passwd your-user-name

Now you can restart apache.

Svn01 # service apache2 restart

Congratulations! Your Subversion server is now ready. Go straight to your workstation and check out the version library.


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.