ubuntu + subversion + apache2 设置
1.下载安装subversion,apache2
sudo apt-get update
sudo apt-get upgrade sudo apt-get install apache2
sudo apt-get install subversion
sudo a2enmod ssl
sudo a2ensite default-ssl
sudo apt-get install subversion libapache2-svn
sudo a2enmod dav_svn
/etc/apache2/mods-enabled下面有dav.load,dav_svn.load和dav_svn.conf三个文件
2. 设置apache2
sudo gedit /etc/apache2/mods-enabled/dav_svn.conf
编辑该文件使之如下:
<Location /svn> (apache下的位置)
DAV svn
SVNPath /home/svn/myproject (指明资源库的路径)
或
SVNParentPath /home/svn (如果有多个库,使用该选项)
SVNListParentPath on (打开这个选项可以列出ParentPath下面的所有库)
AuthType Basic (认证类型为基本认证 )
AuthName "Subversion Repository" (认证名称,将在IE界面弹出一个对话框,其标题)
AuthUserFile /etc/apache2/dav_svn.passwd (认证密码文件)
# AuthzSVNAcessFile /etc/apache2/dav_svn.authz (目录权限文件)
Require valid-user (要求验证用户,即不能匿名访问)
</Location>
如果需要用户每次登录时都进行用户密码验证,就将<LimitExcept GET PROPFIND OPTIONS REPORT>与</LimitExcept>两行注释掉
更改 /home/svn
到任何你要保存仓库的地址。如果没有的话就新建。
sudo mkdir /home/svn
4.是APache成为该仓库的所有者。
3.开启svn服务
sudo svnadmin create /home/svnsudo chown -R www-data /home/svn 5.
建立密码文件
sudo htpasswd -cm /etc/apache2/dav_svn.passwd abc (创建用户abc并按照提示设置密码,网页认证的时候使用该用户名和密码登录。后面再添加用户的时候去掉-c选项。)
abc是你想使用的用户名,然后输入两次密码。
6.重启Apache
sudo /etc/init.d/apache2 restart
7.测试
打开浏览器,
http://you.server/svn
导入版本库
把/var/www/下的内容导入版本号中:
sudo svn import -m "第一次导入" /var/www http://192.168.0.5/svn/project
========================================
系统提示:
认证领域: <http://192.168.0.5:80> myproject subversion repository
“root”的密码:
认证领域: <http://192.168.0.5:80> myproject subversion repository
用户名: test
“test”的密码:
增加 /var/www/index.html
-----------------------------------------------------------------------
注意! 你的密码,对于认证域:
<http://192.168.0.5:80> myproject subversion repository
<Location /svn>
# Uncomment this to enable the repository
DAV svn
# Set this to the path to your repository
#SVNPath /home/svn
# Alternatively, use SVNParentPath if you have multiple repositories under
# under a single directory (/var/lib/svn/repo1, /var/lib/svn/repo2, ...).
# You need either SVNPath and SVNParentPath, but not both.
SVNParentPath /home/svn
SVNListParentPath on
# Access control is done at 3 levels: (1) Apache authentication, via
# any of several methods. A "Basic Auth" section is commented out
# below. (2) Apache <Limit> and <LimitExcept>, also commented out
# below. (3) mod_authz_svn is a svn-specific authorization module
# which offers fine-grained read/write access control for paths
# within a repository. (The first two layers are coarse-grained; you
# can only enable/disable access to an entire repository.) Note that
# mod_authz_svn is noticeably slower than the other two layers, so if
# you don't need the fine-grained control, don't configure it.
# Basic Authentication is repository-wide. It is not secure unless
# you are using https. See the 'htpasswd' command to create and
# manage the password file - and the documentation for the
# 'auth_basic' and 'authn_file' modules, which you will need for this
# (enable them with 'a2enmod').
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
# To enable authorization via mod_authz_svn (enable that module separately):
#<IfModule mod_authz_svn.c>
#AuthzSVNAccessFile /etc/apache2/dav_svn.authz
#</IfModule>
# The following three lines allow anonymous read, but make
# committers authenticate themselves. It requires the 'authz_user'
# module (enable it with 'a2enmod').
#<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
#</LimitExcept>
</Location>
ubuntu上安装mysql非常简单只需要几条命令就可以完成。
3. sudo apt-get install libmysqlclient-dev
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' IDENTIFIED BY 'admin' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'admin' WITH GRANT OPTION;
FLUSH PRIVILEGES;
ubuntu + subversion + apache2 设置的更多相关文章
- ubuntu 安装apache2,mysql,php5,phpmyadmin等软件
1.安装apache2 sudo apt-get install apache2 输入Y回车 apache2 安装完成 检测:在浏览器输入localhost 出现It works则成功. 2. ...
- Ubuntu 16.04设置rc.local开机启动命令/脚本的方法
Ubuntu 16.04设置rc.local开机启动命令/脚本的方法 Ubuntu 16.04设置rc.local开机启动命令/脚本的方法(通过update-rc.d管理Ubuntu开机启 ...
- Ubuntu配置apache2.4配置虚拟主机遇到的问题
update: 偶然看到了 apache的更新说明,直接贴个地址过来吧. http://httpd.apache.org/docs/2.4/upgrading.html 最近想把web开发目录从/va ...
- ubuntu下Apache2配置
Ubuntu下Apache2的CGI简单配置:http://blog.csdn.net/a623891391/article/details/47170355 Ubuntu Apache的安装和配置以 ...
- Ubuntu下apache2安装配置(内含数字证书配置)
Ubuntu下apache2安装配置(内含数字证书配置)安装命令:sudo apt-get updatesudo apt-get install apache2 配置1.查看apache2安装目录命令 ...
- Ubuntu 下 Apache2 和 PHP 服务器环境配置
Ubuntu 下 Apache2 和 PHP 服务器环境配置 1.简介 本文主要是 Ubuntu 下 Apache2 和 PHP 服务器环境配置方法,同样适用于 Debian 系统:Ubuntu 20 ...
- .apache2 设置多个虚拟域名
<VirtualHost 127.0.0.2:80> ServerName www.xylilun.cn DocumentRoot E:/www/ylll <Directory E: ...
- ubuntu的dns设置
ubuntu的dns设置为: dns-nameservers 8.8.8.8 注意不要少s
- Ubuntu防火墙 UFW 设置
Ubuntu防火墙 UFW 设置 1.安装 sudo apt-get install ufw 2.启用 sudo ufw enable sudo ufw default deny 运行以上两条命令后, ...
随机推荐
- 1.django笔记之django基础
一.django简介 Django是一个开放源代码的Web应用框架,由Python写成.采用了MVC的软件设计模式,即模型M,视图V和控制器C.它最初是被开发来用于管理劳伦斯出版集团旗下的一些以新闻内 ...
- DP:Apple Catching(POJ 2385)
牛如何吃苹果 问题大意:一个叫Bessie的牛,可以吃苹果,然后有两棵树,树上苹果每分钟会掉一个,这只牛一分钟可以在两棵树中往返吃苹果(且不吃地上的),然后折返只能是有限次W,问你这只叫Bessie的 ...
- 【USACO】beads
题目: You have a necklace of N red, white, or blue beads (3<=N<=350) some of which are red, othe ...
- Java Hour3
有句名言,叫做10000小时成为某一个领域的专家.姑且不辩论这句话是否正确,让我们到达10000小时的时候再回头来看吧. 本文作者Java 现经验约为2 Hour,请各位不吝赐教. Hour3 包和i ...
- MATLAB学习笔记(八)——MATLAB数值积分与微分
(一)数值积分 一.数值积分的MATLAB实现方法: 1.变步长辛普生法(quad)法: (1)调用格式: [I,n]=quad('fname',a,b,tol,trace); fname是被积函数: ...
- hadoop系列讨论
生产环境下cloudera的cdh版本更受欢迎,但是貌似cloudera对于YARN的开发力度不是很突出,所以在apache与cdh版本选择的时候,大家是怎么考虑的? 主要关注生产环境下的运维成本,期 ...
- android 完美退出所有Activity的demo
项目地址:https://github.com/libill/myapplication 利用android的wheel和参考android完美退出程序做出来的demo,结束掉所有打开的Activit ...
- Hark的数据结构与算法练习之耐心排序
算法说明 耐心排序是插入排序的一种,至少wikipedia是这么分的. 话说我明白这个算法的实现思路了,但是不明白这么做的意义何在? 如果明白的朋友帮忙留个言说一下,以后如果我明白的话,我会来修改这个 ...
- loadrunner常见问题总结
在玩Loadrunner时经常性的出现脚本录制为空的情况,下面是我总结出的解决办法: 1.在用loadrunner录制脚本时发现脚本录制为空,查找原因,我首先看. IE选项->连接->局域 ...
- 关于post和get传递参数的区别
今天一朋友给我一段代码,说使用request.querystrin得不到传过来的值,我们一起找到很长时间,终于给找到了,错误的原因是他将form中的method参数写成了get了,所以使用reques ...