CentOS 7.6 + Subversion + Usvn 搭建版本管理服务器

  1. 内核版本与系统版本
[root@svn2 ~]# uname -a
Linux svn2 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@svn2 ~]# cat /etc/redhat-release 
CentOS Linux release 7.6.1810 (Core)
  1. 关闭SeLinux和防火墙
[root@svn2 ~]# vim /etc/selinux/config
SELINUX=disabled
[root@svn2 ~]# systemctl stop firewalld.service
[root@svn2 ~]# systemctl disable firewalld.service
  1. 配置yum源(这里使用163yum源和epelyum源)
[root@svn2 ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
[root@svn2 ~]# rpm -ivh https://mirrors.ustc.edu.cn/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm
  1. 编辑配置文件和重新缓存
[root@svn2 ~]# vim /etc/yum.repos.d/CentOS-Base.repo
:%s/$releasever/7/g

[root@svn2 ~]# yum clean all

[root@svn2 ~]# yum makecache
  1. 安装所需软件
# 这里使用的是mariadb作为数据库
[root@svn2 ~]# yum install subversion httpd mod_dav_svn php php-mysql mariadb-server perl-DBI perl-DBD-mysql mysql-devel mod_auth_mysql

# 重要软件版本如下
[root@svn2 ~]# rpm -qa |egrep "subversion|httpd|mariadb"
mariadb-5.5.68-1.el7.x86_64
mariadb-server-5.5.68-1.el7.x86_64
subversion-libs-1.7.14-16.el7.x86_64
httpd-2.4.6-97.el7.centos.5.x86_64
mariadb-devel-5.5.68-1.el7.x86_64
subversion-1.7.14-16.el7.x86_64
mariadb-libs-5.5.68-1.el7.x86_64
httpd-tools-2.4.6-97.el7.centos.5.x86_64
  1. 启动httpd和数据库
[root@svn2 ~]# systemctl start httpd.service mariadb.service 
[root@svn2 ~]# systemctl enable httpd.service mariadb.service
  1. 初始化数据库
[root@svn2 ~]# mysql_secure_installation 
Set root password? [Y/n] y
New password: 这里输入root管理员密码
Re-enter new password: 重复上一步密码
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y
  1. 登录数据库测试
[root@svn2 ~]# mysql -uroot -p123456
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 5.5.68-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> 
  1. 下载USVN
[root@svn2 ~]# wget https://github.com/usvn/usvn/archive/1.0.7.tar.gz --no-check-certificate
  1. 安装配置USVN
[root@svn2 ~]# tar xf 1.0.7.tar.gz 
[root@svn2 ~]# mv usvn-1.0.7/ /var/www/html
[root@svn2 ~]# chown -R apache:apache /var/www/html/usvn-1.0.7/
  1. 配置Apache目录允许重写(默认已经配好)
[root@svn2 ~]# vim /etc/httpd/conf/httpd.conf
# 文件最后加入
<Directory "/var/www/html/">

        AllowOverride all

        Order allow,deny

        Allow from all

</Directory>

13.重启apache服务

[root@svn2 ~]# systemctl restart httpd.service
  1. 浏览器访问安装
# 用自己的ip
http://192.168.58.179/usvn-1.0.7/public/install.php
  1. 选择中文和时区
    在这里插入图片描述

  2. 创建版本库路径

[root@svn2 ~]# mkdir -p /data/subversion/
[root@svn2 ~]# chown -R apache:apache /data/subversion/
  1. 配置成版本库路径
    在这里插入图片描述

  2. 配置数据库
    在这里插入图片描述

  3. 配置管理员信息

  4. 最后一步将生成的配置,添加到/etc/httpd/conf/httpd.conf文件结尾
    在这里插入代码片

  5. 重启服务 安装完毕

[root@svn2 ~]# systemctl restart httpd.service

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值