Try this out, its subversion installation. It should work with any piece of code. Make sure to change the path and directory structure according to your requirements.
Install the necessary packages ----------------------------------- yum install mod_dav_svn subversion
Start httpd service, and make necessary changes according to your requirements.
service httpd start chkconfig httpd on cd /etc/httpd/conf.d/ vim subversion.conf ---------------------------------- # Make sure you uncomment the following if they are commented out
htpasswd -cm /etc/svn-auth-conf yourusername New password: Re-type new password: Adding password for user yourusername htpasswd -m /etc/svn-auth-conf anotherusername New password: Re-type new password: Adding password for user anotherusername
Make the repository --------------------------
cd /var/www/ -- Or wherever you placed your path above mkdir svn cd svn svnadmin create repos chown -R apache.apache repos service httpd restart
cd /tmp mkdir mytestproj cd mytestproj mkdir configurations options main vim configurations/testconf1.cfg -- Add whatever you want to these files. vim options/testopts1.cfg vim main/mainfile1.cfg
Importing ----------
svn import /tmp/mytestproj/ file:///var/www/svn/repos/mytestproj -m "Initial repository layout for mytestproj"
Checking Out -------------- cd /tmp svn co http://yoursvnserver/repos/mytestproj
Edit & Commit ---------------- cd mytestproj vim configurations/testconf1.cfg -- Add or delete something and save. svn commit -m "Added a line to testconf1.cfg."
Adding/Deleting Items ---------------------- svn co http://yoursvnserver/repos/mytestproj cd mytestproj cp /etc/yum.repos.d/CentOS-Base.repo configurations/ svn add configurations/CentOS-Base.repo svn commit -m "Added the CentOS Yum repo file."
Reverting Back --------------- svn log http://yoursvnserver/repos -- For the entire repository svn log http://yoursvnserver/repos/mytestproj -- For the specific project
1 comment:
Try this out, its subversion installation. It should work with any piece of code. Make sure to change the path and directory structure according to your requirements.
Install the necessary packages
-----------------------------------
yum install mod_dav_svn subversion
Start httpd service, and make necessary changes according to your requirements.
service httpd start
chkconfig httpd on
cd /etc/httpd/conf.d/
vim subversion.conf
----------------------------------
# Make sure you uncomment the following if they are commented out
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
# Add the following to allow a basic authentication and point Apache to where the actual
# repository resides.
<Location /repos>
DAV svn
SVNPath /var/www/svn/repos
AuthType Basic
AuthName "Subversion repos"
AuthUserFile /etc/svn-auth-conf
Require valid-user
</Location>
-----------------------------------
htpasswd -cm /etc/svn-auth-conf yourusername
New password:
Re-type new password:
Adding password for user yourusername
htpasswd -m /etc/svn-auth-conf anotherusername
New password:
Re-type new password:
Adding password for user anotherusername
Make the repository
--------------------------
cd /var/www/ -- Or wherever you placed your path above
mkdir svn
cd svn
svnadmin create repos
chown -R apache.apache repos
service httpd restart
cd /tmp
mkdir mytestproj
cd mytestproj
mkdir configurations options main
vim configurations/testconf1.cfg -- Add whatever you want to these files.
vim options/testopts1.cfg
vim main/mainfile1.cfg
Importing
----------
svn import /tmp/mytestproj/ file:///var/www/svn/repos/mytestproj -m "Initial repository layout for mytestproj"
Checking Out
--------------
cd /tmp
svn co http://yoursvnserver/repos/mytestproj
Edit & Commit
----------------
cd mytestproj
vim configurations/testconf1.cfg -- Add or delete something and save.
svn commit -m "Added a line to testconf1.cfg."
Adding/Deleting Items
----------------------
svn co http://yoursvnserver/repos/mytestproj
cd mytestproj
cp /etc/yum.repos.d/CentOS-Base.repo configurations/
svn add configurations/CentOS-Base.repo
svn commit -m "Added the CentOS Yum repo file."
Reverting Back
---------------
svn log http://yoursvnserver/repos -- For the entire repository
svn log http://yoursvnserver/repos/mytestproj -- For the specific project
svn co -r 1 http://yoursvnserver/repos/mytestproj
Post a Comment