CentOS 安装 SVN1.7.7的简单方法
来源:互联网 发布:手机网页源码 编辑:程序博客网 时间:2024/05/22 04:31
可以在这里下载
http://subversion.apache.org/packages.html#centos
CentOS默认的yum --install subversion ,安装的是1.6版本
WANdisco (supported and certified by WANdisco; requires registration)
提供了安装脚本,方便好用
可以卸载yum的1.6版本,升级到1.7版本
sh内容
#!/bin/bash echo WANdisco Subversion Installer for CentOS 5echo Please report bugs or feature suggestions to opensource@wandisco.comecho echo Gathering some information about your system...MINVERSION='2'SVNVER='1.7.7'NOW=$(date +"%b-%d-%y%s")#functionsgather_info () {ARCH=`uname -m`SVNSTATUS=`rpm -qa|grep ^subversion-[0-9]|awk 'BEGIN { FS = "-" } ; { print $1 }'`}check_tools () { COMMANDS="yum wget rpm" for C in $COMMANDS; do if [ -z "$(which $C)" ] ; then echo "This installer uses the $C command which was not found in \$PATH."exit 1 fi done}check_centos_version (){ if [ ! -e /etc/redhat-release ]; then echo "No /etc/redhat-release file, exiting" echo "You are most likely not using CentOS." echo "Installers for other operating systems are available from our downloads page:" echo "http://www.wandisco.com/subversion/download"echo "Exiting.." exit 1 fi;cat /etc/redhat-release |grep -e 5.[0-9]if [ $? == 0 ]; thenecho "CentOS version 5.x confirmed.."else echo "You are most likely using an incompatible version of CentOS."echo "This installer is made for CentOS 5.x" echo "Installers for other operating systems are available from our downloads page:" echo "http://www.wandisco.com/subversion/download" exit 1fi;}check_is_root (){if [[ $EUID -ne 0 ]]; then echo "This script must be run as root" 1>&2 exit 1fi}svn_remove_old (){if [ -f /etc/httpd/conf.d/subversion.conf ]; thenecho Backing up /etc/httpd/conf.d/subversion.conf to /etc/httpd/conf.d/subversion.conf.backup-$NOWcp /etc/httpd/conf.d/subversion.conf /etc/httpd/subversion.conf.backup-$NOWfiecho Removing old packages...yum -y remove mod_dav_svn subversion subversion-devel subversion-perl subversion-python subversion-tools &>/dev/null}add_repo_config (){ echo Adding repository configuration to /etc/yum.repos.d/ echo '# WANdisco Repo[WANdisco-dev]name=WANdisco SVN Repo 1.7enabled=1baseurl=http://opensource.wandisco.com/centos/5/devel/RPMS/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-WANdisco' >/etc/yum.repos.d/WANdisco-1.7.repoecho "Importing GPG key"wget http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco -O /tmp/RPM-GPG-KEY-WANdisco &>/dev/nullrpm --import /tmp/RPM-GPG-KEY-WANdiscorm -rf /tmp/RPM-GPG-KEY-WANdiscoecho " ------ Installing yum repo: Done ------"}install_svn (){ echo Checking to see if you already have Subversion installed via rpm... if [[ "$SVNSTATUS" =~ subversion ]]; then echo Subversion is already installed on the system. echo Do you wish to replace the version of subversion currently installed with the WANdisco version? echo This action will remove the previous version from your system echo "[y/n]"read svn_install_confirmif [ "$svn_install_confirm" == "y" -o "$svn_install_confirm" == "Y" ]; thensvn_remove_oldadd_repo_configechoecho Installing Subversion $SVNVERechoyum -y install subversion.$ARCH subversion-perl.$ARCH subversion-python.$ARCH subversion-javahl.$ARCH subversion-tools.$ARCH echo Would you like to install apache and the apache SVN modules?echo "[y/n]"read dav_svn_confirmif [ "$dav_svn_confirm" == "y" -o "$dav_svn_confirm" == "Y" ]; thenecho Installing apache and subversion modulesyum -y install mod_dav_svn.$ARCH httpdecho "Installation complete."echo "You can find the subversion configuration file for apache HTTPD at /etc/httpd/conf.d/subversion.conf"echo "By default, the modules are commented out in subversion.conf."echo "To enable the modules, please edit subversion.conf and remove the # infront of the LoadModule lines."echo "You should then restart httpd (/etc/init.d/httpd restart)"fi elseecho "Install Cancelled"exit 1fielse# Install SVNecho "Subversion is not currently installed"echo "Starting installation, are you sure you wish to continue?"echo "[y/n]"read svn_install_confirm if [ "$svn_install_confirm" == "y" -o "$svn_install_confirm" == "Y" ]; thenadd_repo_config echo echo Installing Subversion $SVNVER echoyum -y install subversion.$ARCH subversion-perl.$ARCH subversion-python.$ARCH subversion-tools.$ARCH echo Would you like to install apache HTTPD and the apache SVN modules?echo "[y/n]" read dav_svn_confirm if [ "$dav_svn_confirm" == "y" -o "$dav_svn_confirm" == "Y" ]; then echo Installing apache and subversion modulesyum -y install mod_dav_svn.$ARCH httpd echo "Installation complete." echo "You can find the subversion configuration file for apache HTTPD at /etc/httpd/conf.d/subversion.conf" echo "By default, the modules are commented out in subversion.conf." echo "To enable the modules, please edit subversion.conf and remove the # infront of the LoadModule lines." echo "You should then restart httpd (/etc/init.d/httpd restart)" fi else echo "Install Cancelled" exit 1 fi fi}install_32 (){ echo Installing for $ARCHinstall_svn}install_64 (){ echo Installing for $ARCHinstall_svn}#Maincheck_is_rootcheck_centos_versioncheck_toolsgather_infoecho Checking your system archif [ "$ARCH" == "i686" -o "$ARCH" == "i386" ]; thenif [ "$ARCH" == "i686" ]; thenARCH="i386"fi;install_32elif [ "$ARCH" == "x86_64" ];theninstall_64else echo Unsupported platform: $ARCHexit 1fi
- CentOS 安装 SVN1.7.7的简单方法
- CentOS 安装 SVN1.7.7
- svn1.8 服务端 centos 安装
- MyEclipse10.0 采用lnk方法安装SVN1.8.3的步骤
- [MyEclipse Blue 采用lnk方法安装SVN1.8.3的步骤]
- 【MyEclipse Blue 采用lnk方法安装SVN1.8.3的步骤】
- SVN1.8.3简单安装及配置
- CentOS安装GD库的超简单方法
- CentOS安装QEMU(试验成功且简单的方法)
- 安装tensorflow的最简单方法(Ubuntu 16.04 && CentOS)
- centos的安装方法
- MyEclipse10.0 采用lnk方法安装SVN1.8.x
- Centos安装Node.js简单方法
- SVN1.4.3 命令行安装
- MyEclipse安装svn1.6.5
- centos6安装svn1.8
- SVN1.4.5安装
- Svn1.4.6版本的安装与配置及基本用法
- 关于LZ77压缩算法 有代码
- ORA-12154问题分析
- SOAP 介绍
- %EXCEUTE在一个SQL Action里执行多条SQL语句
- 燕十八公益php课程---面向对象课堂笔记(二)
- CentOS 安装 SVN1.7.7的简单方法
- Linux管道编程实例
- Linux/ubuntu下的boost库安装
- I/O Read Rate of Backups-RMAN IO限制【每日一译】--20121119
- git 备忘
- HighCharts 详细使用及API文档说明
- php函数(stream流) 2012.11.19日学
- Java时间格式转换大全
- jQuery的jVectorMap矢量地图用法(部分功能实现)