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.