shell 安装svn图形界面管理svnadmin

yum -y install subversion subversion-devel httpd mysql-server mod_dav_svn openssl-devel
wget http://test-kkk.googlecode.com/files/jdk-7u15-linux-x64.tar.gz
wget http://test-kkk.googlecode.com/files/svnadmin-3.0.3.zip
wget http://test-kkk.googlecode.com/files/apache-tomcat-7.0.39.tar.gz
tar zxvf jdk-7u15-linux-x64.tar.gz
mv jdk1.7.0_15  /usr/local/
cat >> /etc/profile  << eof
export JAVA_HOME=/usr/local/jdk1.7.0_15
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
eof
source  /etc/profile
rm -rf /usr/bin/java
ln -s /usr/local/jdk1.7.0_15/bin/java  /usr/bin/
tar zxvf apache-tomcat-7.0.39.tar.gz
unzip  svnadmin-3.0.3.zip
mv svnadmin-3.0.3 svnadmin
mv svnadmin/svnadmin.war  apache-tomcat-7.0.39/webapps/
mkdir /svn
sed -i '/^args/s/"$/ -r \/svn"/'  /etc/init.d/svnserve
/etc/init.d/svnserve start   && chkconfig svnserve  on 35
./apache-tomcat-7.0.39/bin/startup.sh
mysql -u root -p -e "create database if not exists svnadmin default character set gbk;"
mysql -u root -p -e  "use svnadmin ; source /root/d/svnadmin/db/mysql5.sql;"
echo  "替换svnadmin链接数据库的密码,请根据实际情况替换,默认是空"
sed -i 's/abc123//g'   /root/d/apache-tomcat-7.0.39/webapps/svnadmin/WEB-INF/jdbc.properties
./bin/shutdown.sh
./apache-tomcat-7.0.39/bin/startup.sh
##现在就可以登录页面进行配置了,首次登录的时候会让用户自己创建用户名密码

##创建项目管理的时候需要注意下项目的类型和url地址都要设置成svn的  即svn://x.x.x.x/demo

你可能感兴趣的:(shell,svn.svnadmin)