Knowledge Updates


Gventure provides support for open-source Subversion version control tool. It is open-source and distributed as free software over the internet. It comes by default with most of the GNU/Linux distributions, so it's in your system Might Be Already Installed. Subversion used to keep up present and verifiable variants of records, such as, source code, website pages, and documentation.

To svn installation follows these steps:

Step 1: Download Subversion: First download SVN from the following URL provides URLs about the latest stable releases of Subversion built by third parties for all major operating systems:

Step 2: check whether svn is installed or not, using following command.

[taylor@CentOS ~]$ svn –version
If Subversion client is not installed, then command will report error, otherwise it will display the version of the installed svn software.
[taylor@CentOS ~]$ svn --version
-bash: svn: command not found
Step 3: If you are using RPM-based GNU/Linux, then use yum command for installation.
[taylor@CentOS ~]$ su -
[root@CentOS ~]# yum install subversion
After successful installation, execute the svn --version command.
[taylor@CentOS ~]$ svn --version
svn, version 1.6.11 (r934486)
compiled Jun 23 2012, 00:44:03
And if you are using Debian-based GNU/Linux, then use apt command for installation.
[taylor@Ubuntu]$ sudo apt-get update
[sudo] password for jerry:
[taylor@Ubuntu]$ sudo apt-get install subversion
[taylor@Ubuntu]$ svn --version
svn, version 1.7.5 (r1336830)
compiled Jun 21 2013, 22:11:49

Create Repository:
We have seen how to install Subversion client on GNU/Linux. Let us see how to create a new repository and allow access to the users.

Apache Setup:
On server we have to install Apache httpd module and svnadmin tool.

[taylor@CentOS ~]$ su -
[root@CentOS ~]# yum install mod_dav_svn subversion

The mod_dav_svn package allows access to a repository using HTTP, via Apache httpd server and subversion package installs svnadmin tool.

The subversion reads its configuration from /etc/httpd/conf.d/subversion.conf file. After adding configuration, subversion.conf file looks as follows:

LoadModule dav_svn_module     modules/
LoadModule authz_svn_module   modules/

   DAV svn
   SVNParentPath /var/www/svn
   AuthType Basic
   AuthName "Authorization Realm"
   AuthUserFile /etc/svn-users
   Require valid-user

Let us create Subversion users and grant them access to the repository. htpasswd command is used to create and update the plain-text files which are used to store usernames and passwords for basic authentication of HTTP users. '-c' options creates password file, if password file already exists, it is overwritten. That is why use '-c' option only the first time. '-m' option enables MD5 encryption for passwords.

Create user Setup:
Let us create user tom.

[root@CentOS ~]# htpasswd -cm /etc/svn-users tom
New password: 
Re-type new password: 
Adding password for user tom

Let us create user jerry.

[root@CentOS ~]# htpasswd -m /etc/svn-users taylor
New password: 
Re-type new password: 
Adding password for user taylor
[root@CentOS ~]# 

Create Subversion parent directory to store all the work (see /etc/httpd/conf.d/subversion.conf).

[root@CentOS ~]# mkdir /var/www/svn
[root@CentOS ~]# cd /var/www/svn/

Repository Setup:
Create a project repository named project_repo. svnadmin command will create a new repository and a few other directories inside that to store the metadata.

[root@CentOS svn]# svnadmin create project_repo
[root@CentOS svn]# ls -l project_repo
total 24
drwxr-xr-x. 2 root root 4096 Aug  4 22:30 conf
drwxr-sr-x. 6 root root 4096 Aug  4 22:30 db
-r--r--r--. 1 root root    2 Aug  4 22:30 format
drwxr-xr-x. 2 root root 4096 Aug  4 22:30 hooks
drwxr-xr-x. 2 root root 4096 Aug  4 22:30 locks
-rw-r--r--. 1 root root  229 Aug  4 22:30 README.txt
Let us change the user and group ownership of the repository.
[root@CentOS svn]# chown -R apache.apache project_repo/
Check whether SELinux is enabled or not using the SELinux status tool.
[root@CentOS svn]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   enforcing
Mode from config file:          enforcing
Policy version:                 24
Policy from config file:        targeted
For our server, SELinux is enabled, so we have to change the SELinux security context.
[root@CentOS svn]# chcon -R -t httpd_sys_content_t /var/www/svn/project_repo/
To allow commits over HTTP, execute the following command.
[root@CentOS svn]# chcon -R -t httpd_sys_rw_content_t /var/www/svn/project_repo/
Restart the Apache server and we are done with the configuration of Apache server.
[root@CentOS svn]# service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: httpd: apr_sockaddr_info_get() failed for CentOS
httpd: Could not reliably determine the server's fully qualified domain name, using for ServerName
                                                           [  OK  ]
[root@CentOS svn]# service httpd status
httpd (pid  1372) is running...
[root@CentOS svn]#
We have configured the Apache server successfully, now we will configure the repository. To provide repository access to only authentic users and to use the default authorization files; append the following lines to project_repo/conf/svnserve.conf file.
anon-access = none
authz-db = authz

Conventionally, every Subversion project has trunk, tags, and branches directories directly under the project's root directory.

The trunk is a directory where all the main development happens and is usually checked out by the developers to work on the project.

The tags directory is used to store named snapshots of the project. When creating a production release, the team will tag the code that goes into the release.

The branches directory is used when you want to pursue different lines of development.

Let us create the trunk, tags, and branches directory structure under the project repository.

[root@CentOS svn]# mkdir /tmp/svn-template
[root@CentOS svn]# mkdir /tmp/svn-template/trunk
[root@CentOS svn]# mkdir /tmp/svn-template/branches
[root@CentOS svn]# mkdir /tmp/svn-template/tags
Now import the directories from /tmp/svn-template to the repository.
[root@CentOS svn]# svn import -m 'Create trunk, branches, tags directory structure' /tmp/svn-template/ 
Adding         /tmp/svn-template/trunk
Adding         /tmp/svn-template/branches
Adding         /tmp/svn-template/tags
Committed revision 1.
[root@CentOS svn]#

This is done! We have successfully created the repository and allowed access to Tom and Taylor. From now, they can perform all the supported operations to the repository.



Apache HTTP Server is an open-source HTTP server to develop and maintain modern operating systems including UNIX and Windows NT. The target of this server is to provide a protected, efficient and extensible server that provides HTTP services in synchronous with the current HTTP standards.

Apache is the most widely used web server software. Developed and maintained by Apache Software Foundation, Apache is open source software available for free that runs on 67% of all web servers in the world. It is fast, reliable, and secure and it can be highly customized to gather the needs of many different environments by using extensions and modules. Most WordPress hosting providers use Apache as their web server software. However, WordPress can run on other web server software as well.

Key Features:

  • Improved caching modules (mod_cache, mod_disk_cache, mod_mem_cache).
  • A new structure for authentication and authorization support, replace the authentication modules provided in previous version.
  • Support for proxy load balancing (mod_proxy_balancer)
  • Support for managing huge files (namely, greater than 2GB) on 32-bit platforms

Install Apache HTTP Server

1.First, clean-up yum

sudo yum clean all

2. Update your system

sudo yum update

3. Install Apache

sudo yum install httpd

4. Start Apache

sudo service httpd start

5. Set Apache configuration to start at boot

sudo chkconfig httpd on
Enable name-based virtual hosting on port 80
Open httpd configuration file located at/etc/httpd/conf/httpd.conf
Un-comment the line containing the textNameVirtualHost *:80
Save the file

6. Reload Apache

sudo service httpd restart

7. Test the Apache installation

Visit localhost in your web browser. You should see an Apache Test Page.
Navigate to your Cloud Server IP address (for example,



Currently we are doing replication between two servers i.e. VPN3 and VPN4. Our project needed persistent backup of the business critical database on another server as we don't want to loose any data while server goes down. So we have implemented below mentioned steps. We are using MySQL 5.1 version of mysql. Any higher version is also suitable, as performance of replication has been increased in MySQL 5.6 and above. So below mentioned steps are tested successfully on MySQL5.1, however the same steps might work for other version, that you need to sort out.

  • Step 01: Add my.cnf files as mentioned in the /etc/my.cnf (this holds several mysql environment variables and values for smooth performance of the mysql).Run below queries on both the server to create a user which will handle replications between these two servers.
    mysql > create user 'replicator' identified by 'replicator';
  • Step 02: Once added these files according to server replication architecture you are following.Reboot the services of mysqld to take effect of changes.
    mysql> Service mysqld restart
    on all server you want to do replication settings.(Currently we are doing between two servers, but cyclic replication can be done between multiple servers as per project need).
  • Step 03: Create GRANT access for replication user on each server i.e. VPN3 and VPN4 On VPN3 run following command on mysql CLI
    MYSQL>GRANT REPLICATION SLAVE ON *.* TO 'replicator'@'' IDENTIFIED BY 'replicator';
    On VPN4 run following command on mysql CLI
    MYSQL> GRANT REPLICATION SLAVE ON *.* TO 'replicator'@'' IDENTIFIED BY 'replicator';
    You can verify the replication user added on mysql by running following commands.
    mysql> select user,host from mysql.user;
    Also verify the permissions status by running below command
    mysql> select * from mysql.user where user='replicator';
  • Step 04: Run mysql query on VPN4 server
    | File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
    | mysql-bin.000002 | 35271224 | | |
    1 row in set (0.00 sec) and then run below mentioned mysql command on slave i.e. on VPN3 server with above mentioned details of File and Position in it.
  • Step 05: Run mysql query on VPN3 server
    | File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
    | mysql-bin.000003 | 37416567 | | |
    1 row in set (0.00 sec) and run this mysql command on slave i.e. on VPN4 server with above mentioned details of File and Position in it.
  • Step 06: Run mysql query on VPN4 server
    Wait 5 seconds , then on Server VPN4
    If Slave_IO_Running=Yes and Slave_SQL_Running=Yes, replication is working on VPN4
  • Step 07: Run mysql query on VPN3 server
    Wait 5 seconds,then on Server VPN3
    If Slave_IO_Running=Yes and Slave_SQL_Running=Yes, replication is working.

Now replication is successfully set on both the servers. Changes from one server will automatically copied to another mysql server. Changes always flow from Master Server to Slave Server. As this is asynchronous process so there is slight delay in the copy of data from one server to another server. Generally this process is used for persistent backup of the DB to another server. Since we have created both servers as Master and Slave as well. So any changes on server VPN4 will be reflected back to VPN3 and vice versa.