Detailed explanation of Svn one-click installation shell script under linxu

Detailed explanation of Svn one-click installation shell script under linxu
#!/bin/bash
#Download SVN
yum -y install subversion
#Alibaba Cloud oss ​​data wget -P /root https://babyrita.oss-cn-beijing.aliyuncs.com/lnmp/quyeweb/ziliao.zip
#Unzip the data file unzip ziliao.zip
#Create a new svndata directory mkdir /home/svndata
#The SVN server listens to the default port 3690 svnserve -d -r /home/svndata
#Create SVN repository svnadmin create /home/svndata/www
#Copy the data to the corresponding location\cp /root/ziliao/passwd.txt /home/svndata/www/conf/passwd
\cp /root/ziliao/svnserve.txt /home/svndata/www/conf/svnserve.conf
\cp /root/ziliao/post-commit.txt /home/svndata/www/hooks/post-commit
#Hook file executable chmod +x /home/svndata/www/hooks/post-commit
cd /home/svndata/www/
#Check out SVN to local and website root directory ---Automation --No need to enter password SVN co svn://127.0.0.1/www --username svn1113 --password svn123 --no-auth-cache
svn co svn://127.0.0.1/www /home/wwwroot/www --username svn1113 --password svn123 --no-auth-cache
#Create users and user groups groupadd www
useradd -g www www
#Set the permissions of the website directory chown -R www:www /home/wwwroot/www

Knowledge point supplement: Let's take a look at the Linux shell script SVN automatically update the project and package, publish, and backup

Here we prepare a configuration file to save the SVN address, destination path, username and password.

Configuration file name: toolConfig.properties

#svn address svnAddress=https://192.168.1.253/[yourPath]
#Local path (destination address)
localDir=E:\shelltest
#svn username userName=jack
#svn password password=123456

Corresponding shell script

#!/bin/bash
source ./toolConfig.properties
svn_ip=${svnAddress}
local_path=${localDir}
u_name=${userName}
p_wd=${password}
 
svn co ${svn_ip} ${local_path} --username ${u_name} --password ${p_wd}

Summarize

The above is the details of how to install shell scripts in Svn with one click under linxu. For more information about installing shell scripts in Linux with one click, please pay attention to other related articles on 123WORDPRESS.COM!

You may also be interested in:
  • Ubuntu, Linux Mint one-click installation of Chrome browser Shell script sharing
  • Shell script to implement one-click installation of SNMP in Linux
  • Alibaba Cloud ECS (Linux) one-click installation web environment sh installation steps
  • A complete guide to installing a web environment in Linux with one click (Alibaba Cloud Server)
  • Creating and executing Linux shell scripts
  • How to get the current working directory in shell script in Linux

<<:  Implementation of React page turner (including front and back ends)

>>:  Vue.js implements simple timer function

Recommend

SQL IDENTITY_INSERT case study

Generally speaking, once a column in a data table...

How to skip errors in mysql master-slave replication

1. Traditional binlog master-slave replication, s...

WeChat applet development practical skills: data transmission and storage

Combining the various problems I encountered in m...

Detailed tutorial of using stimulsoft.reports.js with vue-cli

vue-cli uses stimulsoft.reports.js (nanny-level t...

The basic use of html includes links, style sheets, span and div, etc.

1. Links Hypertext links are very important in HTM...

Complete list of CentOS7 firewall operation commands

Table of contents Install: 1. Basic use of firewa...

How to use Nginx to carry rtmp live server

This time we set up an rtmp live broadcast server...

Summary of the differences between count(*), count(1) and count(col) in MySQL

Preface The count function is used to count the r...

Example code and method of storing arrays in mysql

In many cases, arrays are often used when writing...

Hadoop 3.1.1 Fully Distributed Installation Guide under CentOS 6.8 (Recommended)

Foregoing: This document is based on the assumpti...

Mysql 5.7.19 free installation version encountered pitfalls (collection)

1. Download the 64-bit zip file from the official...

CSS3 achieves cool 3D rotation perspective effect

CSS3 achieves cool 3D rotation perspective 3D ani...

Three ways to communicate between React components (simple and easy to use)

Table of contents 1. Parent-child component commu...

Use docker to build kong cluster operation

It is very simple to build a kong cluster under t...