Author Topic: Installation subversion on centos web panel  (Read 3001 times)

0 Members and 1 Guest are viewing this topic.

Installation subversion on centos web panel
« on: December 14, 2017, 09:08:42 AM »

After of read differents manuals to installation of subversion in Centos that not works in centos web panel I want to public my instructions for installation of subversion.

First of all, I want to excuse of my bad english. Is more difficult to me explains the instrucctions in other language.

For the installation I use Centos 7 updated and CWP version:

This installation is fresh, without any component aditional and any account created.

1. Firstly update your OS:

Code: [Select]
yum -y update
2. When centos updated you can reset your server for apply the changes if is necessary. I make it because is a fresh installation and don't have any service working.

Code: [Select]
3. Then, we install the necessary package for subversion.

Code: [Select]
yum install subversion mod_dav_svn
Anotation: I usually create a domain account before of step two and change the index.html in /home/<useraccount>/public_html/ for see that apache works fine. I make it because after of step two is likely that domain account showing the default index of apache because the configuration is not ok.

4. The next step and necessary is reinstall cwp-httpd. It's necessary because apache don't work after installation of subversion and the domain accounts don't works:

Code: [Select]
yum reinstall cwp-httpd
Anotation: For me not is necessary rebuild vhosts, but if don't working the vhosts you can rebuild from the panel.

5. By default the instalation of subversion and the modules saves the files in /etc/httpd/ and cwp uses /usr/local/apache for save the configurations of apache. Then we need copy these files:

Code: [Select]
cp /etc/httpd/conf.modules.d/10-subversion.conf /usr/local/apache/conf.d/

cp /etc/httpd/modules/ /usr/local/apache/modules/
cp /etc/httpd/modules/ /usr/local/apache/modules/
cp /etc/httpd/modules/ /usr/local/apache/modules/

6. Now, we need edite the conf file of httpd:/usr/local/apache/conf/httpd.conf

You can use the prefered editor. I use nano.

We search or uncomment these lines:

Code: [Select]
LoadModule dav_module modules/
LoadModule dav_fs_module modules/

For uncomment you only have to delete "#" sign of first character line.

7. Next step is edit /usr/local/apache/conf.d/10-subversion.conf

Add the next lines in end of file

Code: [Select]
<Location /svn>
DAV svn
SVNParentPath /var/www/svn/
AuthType Basic
AuthName "SVN Repository"
AuthUserFile /etc/svn-auth-accounts
Require valid-user

8. Now, we create the file for the users of svn

Code: [Select]
htpasswd -cm /etc/svn-auth-accounts <username>
Change <username> for your user.

If you want add more users the line is:

Code: [Select]
htpasswd -m /etc/svn-auth-accounts <username>

Because you not need create the file again.

9. Now, apply permissions and user to the file

Code: [Select]
chown apache.apache /etc/svn-auth-accounts
chmod 644 /etc/svn-auth-accounts

10. Okey, the configuration finished, now we can create our repository.

Code: [Select]
mkdir /var/www/svn
cd /var/www/svn

#Command to create our first repository
svnadmin create repo

#Change permissions
chown apache.apache repo/

11. Finally you needs restart apache:

Code: [Select]
systemctl restart httpd
All have to work fine, your accounts and your svn repo. You can probe your repo from your prefered web navigator.


If all works fine shows a prompt for access to the repo with your created user.

A greeting!
« Last Edit: December 14, 2017, 09:11:50 AM by safranero »

Re: Installation subversion on centos web panel
« Reply #1 on: December 28, 2017, 02:59:26 PM »
I can't modify my post.

On the last step on the line:

chown apache.apache repo/

You use nobody against apache.

Re: Installation subversion on centos web panel
« Reply #2 on: June 03, 2018, 07:45:33 AM »
i have a message on a commit using Tortoise SVN client

Commit to
Commit failed (details follow):
could not begin a transaction

help please
sory for my english rsrsrs

tanks friends