Subversion is relatively easy to install on a cPanel server, it just requires building the modules needed from source due to the way cpanel is created (it doesn't use the centos pre-built packages). This article will help you for step by step setup SVN server on a cPanel/WHM server. Sqlite3 php module 2. Apache moddav module. Installing php sqlite3 module. Run the following command in the server terminal. #php -m grep sqlite. If the module is installed already, it will return. Apr 08, 2011 Google alot of pagess/sites purporting to have good instructions on installing SVN on a WHM/cPanel Cento OS 5 machine but yours were by far the most inclusive and clear ones we did run into trouble because we didnt have davmodules installed built a quick rebuild of apache to include it and then re run your instructions and it was easy peasy thank you Sir you rock! # yum install moddavsvn subversion Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile. addons: centos.bst.lt. base: centos.bst.lt. extras: centos.bst.lt. updates: centos.bst.lt Excluding Packages in global exclude list Finished Setting up Install Process No package moddavsvn available.
These are the step that I took to create a SVN server using CentOS 7, while attaching drives as repositories instead of creating a monstrous system drive and importing everything there.
If you follow to a “T”, you too can have the play-ground I have =)
I will lay out my exact steps, including creating the virtual machine I used for this. If you are currently using a VM or dedicated machine then you can skip those steps. I imagine this would work on CentOS 5 and up, but don’t quote me on that.
1.Create VirtualBox Virtual Machine
a.Have a CentOS ISO ready
i.I chose v7 as the latest
b.Setup with 20G hard disk, Bridged Networking, 4G Ram, 2 Processors, 3 – 1GB test disks, no sound, minimal video memory
c.Install CentOS as Basic Web Server, no GUI
i.Include PHP, Perl, Python, NFS during initial install
ii.No need for CPanel
d.Reboot
e.Run yum update
f.Run systemctl start httpd.service
g.Run systemctl enable httpd.service
h.Run the following 3 to allow ports 80 and 443 through the firewall
i.firewall-cmd –permanent –zone=public –add-service=http
ii.firewall-cmd –permanent –zone=public –add-service=https
iii.firewall-cmd –reload
i.Now change SELinux to disabled in /etc/selinux/config, change SELINUX=enforcing to SELINUX=disabled
j.Run yum install subversion mod_dav_svn
k.Run the following
i.mkdir /svn
ii.mkdir /var/www/svn
iii.chown –R apache:apache /svn
iv.chown –R apache:apache /var/www/svn
l.Now we need to configure SVN
i.Run nano /etc/httpd/conf.modules.d/10-subversion.conf
ii.Add In:
Alias /svn /var/www/svn
<Location /svn>
DAV svn
SVNParentPath /svn/
AuthType Basic
AuthName “Emagine Repositories”
AuthUserFile /etc/svn-auth-users
Require valid-user
</Location>
m.The save the file by hitting CTRL-O, then CTRL-X to exit nano
2.Now we need to setup user access
a.Only the first user created needs the –c flag, all the rest need only the –m flag
b.Run htpasswd –cm /etc/svn-auth-users kpirnie
i.For some reason, I had to run this command twice
ii.Type in the new password twice
3.And now the fun begins… I made 3 1GB dummy disks before, when setting up the VM, now we need to partition, format, mount them
a.Run the following commands on each disk (NOTE: You can skip this step if simply attaching storage, run fdisk –l to see what’s attached for disks)
i.fdisk /dev/sdb
ii.n
iii.default the next 4 to create a primary partition using all space
iv.w
v.mkfs.ext4 /dev/sdb1 (sdc1, sdd1 as well)
b.Mount the disks
i.mkdir /mnt/Disk1 (also for Disk2 and Disk3)
ii.nano /etc/fstab
iii.add in a line for each disk, and make sure there is an empty line at the end of the file
iv./dev/sdb1/mnt/Disk1ext4defaults00
v.Repeat as necessary for each disk attached
vi.Remount everything with mount –a
c.You can use step b above to mount any disk you have attached to the server
d.Now we add the proper permissions
i.Run the following for each disk added (replace Disk* for your mount point)
1.chown -R apache:apache /mnt/Disk1
2.chcon -h system_u:object_r:httpd_sys_content_t /mnt/Disk1
3.chcon -h apache:object_r:httpd_sys_content_t /mnt/Disk1
e.Now create & import the repos (replace Disk* with each disk you mounted, or whatever you want to name it) Lg tv cable connection.
i.mkdir –p /mnt/Disk1/{trunk,branches,tags}
1.Copy all content from the disk to the ‘trunk’ directory we just created
ii.svnadmin create /svn/Disk1
iii.svn import –m “Initial Import” /mnt/Disk1 file:///svn/Disk1