全部博文(73)
分类: LINUX
2009-04-23 16:35:12
KDE+Apache+SVN Installation Guide
Server Side:
OS: Fedora 7
Software:
SVN: Subversion
HTTPD: Apache Httpd
APR: Apache Apr
APU: Apache
Apr-Util
1.Build
these software by the following orders:
(1)Apr
(2)Apr-util
(3)Httpd
(4)Svn
1.1 Install Apache Apr
# tar -xzvf apr-
# cd apr-
# ./configure
--prefix=/usr/local/ap
# make
# make install
1.2 Install Apache Apr-Util
# tar -xzvf apr-util-
# cd apr-util-1.3.4
# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
# make
# make install
1.3 Install Apache Httpd
# tar -xzvf httpd-
# cd httpd-2.2.11
# ./configure --prefix=/usr/local/apache2 --enable-dav
--with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
# make
# make install
1.4 Install Subversion
# tar -xzvf
subversion-
# cd subversion-1.5.1
# ./configure --prefix=/usr/local/subversion
--with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local/apr
--with-apr-util=/usr/local/apr-util
# make
# make install
1.5 Check WebDav for SVN
# cd
/usr/local/apache2/modules
Make sure both mod_dav_svn.so and mod_authz_svn.so exists
2. Create Apache
users
# groupadd svn
# useradd -g svn svn
# passwd svn
3. Configure
SVN server
3.1 Create the directory for svn repository
# mkdir /home/svnroot/repository
3.2 Create the file which you want to import to svn repository
# mkdir /home/lx/import
# cd /home/lx/import
# vi test.c
3.3 Create the repository “test”
# cd
/usr/local/subversion/bin
# ./svnadmin create
/home/svnroot/repository/test
# cd
/home/svnroot/repository/test
# ls -l
If some files appear in this directory, then the repository “test” is successfully created.
3.4 Import the file into the repository
# cd
/usr/local/subversion/bin
# ./svn import /home/lx/import
file:///home/svnroot/repository/test -m ""
# chmod a+rw /home/svnroot/repository
3.5.Create Svn users
#htpasswd –c
/home/svnroot/repository/authfile svn
Then input the password for user “svn” twice.
Tips:
The user information will be stored in “/home/svnroot/repository/authfile”
To create the first user, use the option “-c”.
To create the second and the following users, user the option “-m”.
For example:
#htpasswd –m
/home/svnroot/repository/authfile lx
4 configure
httpd
Modify the default httpd user
#vi
/usr/local/apache2/conf/httpd.conf
.........................
#
# If you wish httpd to run
as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or
#number) of the user/group to run httpd as.
# It is usually good
practice to create a dedicated user and group for
# running httpd, as with
most system services.
#
#User daemon
#Group daemon
User svn
Group svn
……………………………………
Add the following configurations at the end of the httpd.conf file
DAV svn
SVNParentPath
/home/svnroot/repository
AuthzSVNAccessFile
/home/svnroot/repository/authz
AuthType Basic
AuthName
"subversion"
AuthUserFile
/home/svnroot/repository/authfile
Require valid-user
5 modify
authentication file
# cp
/home/svnroot/repository/test/conf/authz /home/svnroot/repository/
# vi
/home/svnroot/repository/authz
[groups]
[test:/]
svn = rw //read and write
permission for user svn in root directory of test repository
lx = rw
* = r //all the users have
read permission in test repository
#chmod a+rw
/home/svnroot/repository/authz
6 Start apache
server
# cd
/usr/local/appache2/bin/
# ./apachect1 start
Client Side:
OS: Ubuntu 7.10
Software: kdesvn, konqueror, kdevelop
Since K Desktop Environment contains kdevelop and konqueror, if KDE is installed, you may not install kdevelop and konqueror again. Otherwise, you can use the following commands to install these tools.
sudo apt-get install konqueror
sudo apt-get install kdevelop
Konqueror is a web browser and file manager KDE. We use it here to browse and check out files for a specified project that managed by a SVN server.
Kdevelop is used to edit files, which have been checked out from SVN repository, and check in.
Then install kdesvn, a svn client for KDE.
sudo apt-get install kdesvn
Make sure kdesvn is installed:
Open konqueror, right click and navigate to “Actions” in the pop menu, if the sub menu “Subversion(kdesvn)” appears, that means this is a good installation.
How to use SVN in KDE client:
Open konqueror and navigate to “”, input
the svn userid “svn”and password “
1) Check out the project “test”
a) Right click the mouse, and select “Action->subversion->check out from repository” in the pop menu.
b) Then input the local target directory:”/tmp/lx/” and click OK button. Now the project “test” is under the directory “/tmp/lx”
2) Check in the project “test”
a) Open kdevelop and import the existing project “/tmp/lx/test”,
b) Modify the project option
“Project”-> “Project Options” -> “Version Control”, select “subversion” and click OK.
c) Edit the file “test.c” and save it.
d) Right click and select “subversion” -> “commit to repository”, then you can check in this file.
If you need to add a new file “test2.c” to this project and check in, you may do as follows:
e) Add a new file “test2.c” to this project.
f) Edit and save it.
g) Right click and select “subversion” -> “add to repository”
h) Right click and select “subversion” -> “commit to repository”