环境:CentOS 7.3.1611

分三步:
第一步:安装subversion
第二步:安装httpd
第三步:安装nginx

操作步骤:
安装subversion, 命令 -> yum -y install subversion;
创建svn目录, 命令 -> mkdir /var/svn, subversion的默认目录, 没有此目录, 启动服务会失败;
创建仓库, 命令 -> svnadmin create /var/svn/repo1;
修改认证授权策略文件svnserve.conf, 命令 -> vi /var/svn/repo1/conf/svnserve.conf, 对anon-access = read、auth-access = write、password-db = passwd、authz-db = authz取消注释;
添加svn用户, 命令 -> vi /var/svn/repo1/conf/passwd, 添加svn = svn;
给用户授权, 命令 -> vi /var/svn/repo1/conf/authz, 添加[repo1:/] svn = rw;
systemctl start svnserve.service;
windows系统可以使用TortoiseSVN访问svn://ip/repo1 ,也可以在本机使用访问, 命令 -> wget http://127.0.0.1:3690/repo1, 正常访问域名配置已生效;

安装httpd, 命令 -> yum -y install httpd;
安装httpd的svn模块, 命令 -> yum -y install mod_dav_svn;
修改httpd的配置文件, 命令 -> vi /etc/httpd/conf/httpd.conf, 搜索“LoadModule”,添加以下两行:
LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module modules/mod_dav_svn.so
在文件结束处添加以下内容:
<Location /svn>
DAV svn
SVNParentPath /var/svn
#Authentication: Basic
AuthName "Subversion repository"
AuthType Basic
AuthUserFile /etc/httpd/svn-auth.htpasswd
#Authorization: Authenticated users only
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
创建svn-auth.htpasswd文件, 并添加用户laohans, 命令 -> htpasswd -c -m /etc/httpd/svn-auth.htpasswd laohans;
将apache用户添加到root组, 命令 -> usermod -a -G root apache;
启动httpd, 命令 -> systemctl start httpd.service;
通过浏览器访问, http://ip:port/repo1;
修改httpd端口, 命令 -> vi /etc/httpd/conf/httpd.conf, 找到Listen 80, 将80修改为81;
重启httpd, 命令 -> systemctl restart httpd.service;

安装nginx, 下载nginx, 命令 -> wget https://nginx.org/download/nginx-1.12.1.tar.gz;
解压nginx, 命令 -> tar -zxvf nginx-1.12.1.tar.gz;
进入解压后的nginx目录, 执行命令 -> ./configure, 会依次出现以下错误提示:
./configure: error: C compiler cc is not found;
./configure: error: the HTTP rewrite module requires the PCRE library;
./configure: error: the HTTP gzip module requires the zlib library;
安装依赖库, 命令 -> yum -y install gcc pcre-devel zlib-devel;
再次执行命令 -> ./configure, 出现以下内容说明安装成功:
Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ using system zlib library

nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/nginx/sbin/nginx"
nginx modules path: "/usr/local/nginx/modules"
nginx configuration prefix: "/usr/local/nginx/conf"
nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
nginx pid file: "/usr/local/nginx/logs/nginx.pid"
nginx error log file: "/usr/local/nginx/logs/error.log"
nginx http access log file: "/usr/local/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"
安装, 命令 -> make install
让nginx代理httpd, 命令 -> vi /usr/local/nginx/conf/nginx.conf, 添加以下内容:
location /svn {
proxy_pass http://127.0.0.1:81
}
启动nginx, 命令 -> /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf;
测试, 浏览器访问:http://123.207.108.213/svn/repo1;
https://www.ibm.com/developerworks/cn/java/j-lo-apache-subversion/

CentOS 7 安装Subversion, 并用Nginx代理的更多相关文章

  1. ubuntu下发布asp.net core并用nginx代理之旅

    asp.net core 1.0.1发布已有些日子了,怀着好奇的心情体验了把ubuntu下的asp.net core 系统运行环境:ubuntu 16.0.4 for developer 首先搭建.n ...

  2. CentOS 7 安装php5.6,Nginx,Memcached环境及配置

    安装php5.6版本以后不再需要安装Zend Guard,而是用yum命令安装php-opcache及php-pecl-apcu就可以有效的提高php执行速度. 1. 配置yum源 事先确认yum源的 ...

  3. Centos下安装并设置nginx开机自启动

    一.在centos环境下安装下载并安装nginx,由于nginx需要依赖一些环境才能安装,主要依赖g++.gcc.openssl-devel.pcre-devel和zlib-devel这些环境,首先得 ...

  4. CentOS 下安装 LEMP 服务(nginx、MariaDB/MySQL 和 php)

    转载自:https://linux.cn/article-4314-1.html 编译自:http://xmodulo.com/install-lemp-stack-centos.html 作者: D ...

  5. [转载]CentOS 下安装LEMP服务(Nginx、MariaDB/MySQL和PHP)

    LEMP 组合包是一款日益流行的网站服务组合软件包,在许多生产环境中的核心网站服务上起着强有力的作用.正如其名称所暗示的, LEMP 包是由 Linux.nginx.MariaDB/MySQL 和 P ...

  6. centos yum安装redis,nginx

    先安装源 yum install epel-release 之后 分别安装redis,nginx

  7. CentOS单机安装FastDFS&整合Nginx

    单机安装 一 准备工作 准备linux服务器或虚拟机,这里是虚拟机,操作系统CentOS 6.4 Tracker 和 Storage 安装在一台机器上 FastDFS 5.08版本 1,准备软件 软件 ...

  8. linux (centOS)安装jdk+tomcat+nginx

    一..安装jdk, 下载jdk有两种方式: 1.直接去官网找相应版本下载:http://www.oracle.com/technetwork/java/javase/downloads/index.h ...

  9. 在centos中安装最新版nginx,同时更改官方文档路径错误

    nginx的可以使用各平台的默认包来安装,本文是介绍使用源码编译安装,包括具体的编译参数信息. 正式开始前,编译环境gcc g ++开发库之类的需要提前装好,这里默认你已经装好. ububtu平台编译 ...

随机推荐

  1. 映射语句之INSERT语句

    1.一个 INSERT SQL 语句可以在<insert>元素在映射器 XML 配置文件中配置 例子: <insert id="insertStudentWithId&qu ...

  2. web开发中前后端传值

    在JavaScript中,页面与页面间的传值需要注意. 比如,我们通过url向下个页面进行传一个数字时,到下个页面进行解析出来后可能是一个字符串.这样会导致一个现象.调试时,发现我要传的值的确传过来了 ...

  3. 15套java架构师、集群、高可用、高可扩 展、高性能、高并发、性能优化Redis、ActiveMQ、Nginx、Mycat、Netty、Jvm大型分布式项目实战视频教程

    * { font-family: "Microsoft YaHei" !important } h1 { color: #FF0 } 15套java架构师.集群.高可用.高可扩 展 ...

  4. Android开发随手记

    本文是作者在Android开发实践中的随手速记,记录一些小问题的解决方案和注意事项,持续更新. 以下是速记内容,若有不严谨的地方,望小伙伴们指出. 1.Module 不生成R文件,可尝试取消对该Mod ...

  5. 【案例分享】SequoiaDB+Spark搭建医院临床知识库系统

    1.背景介绍 从20世纪90年代数字化医院概念提出到至今的20多年时间,数字化医院(Digital Hospital)在国内各大医院飞速的普及推广发展,并取得骄人成绩.不但有数字化医院管理信息系统(H ...

  6. JavaScript学习笔记(三)——留言板知操纵DOM节点

    用JavaScript写了一个简易的留言板,暂不涉及数据库接入等. 1.功能以及流程 主要功能即为留言,用两个文本框接受用户输入的用户名以及留言内容,然后通过"提交留言"按钮将用户 ...

  7. 如何在家自制LED灯?很简单,我来告诉你!

    首先LED分凸头.平头和凹头,当中的凹头是没无方向性. 做示宽灯这类晚间才运用的光源,用凹头就好,它没无方向性,可将整个反光碗照亮. 做转向灯等指示性的光源用,准绳上应该用凸头的,它是个聚光镜,投映的 ...

  8. 消息队列NetMQ 原理分析4-Socket、Session、Option和Pipe

    消息队列NetMQ 原理分析4-Socket.Session.Option和Pipe 前言 介绍 目的 Socket 接口实现 内部结构 Session Option Pipe YPipe Msg Y ...

  9. 关于rem单位

    CSS3的出现,他同时引进了一些新的属性,包括我们今天所说的rem.在W3C官网上是这样描述rem的——“font size of the root element” . em单位是相对于父节点的fo ...

  10. (转载)Java多线程的监控分析工具(VisualVM)

    原文链接:http://blog.csdn.net/chendc201/article/details/22905511 在Java多线程程序运行时,多数情况下我们不知道到底发生了什么,只有出了错误的 ...