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

JavaScript to implement checkbox selection or cancellation

This article shares the specific code of JavaScri...

How to configure Nginx load balancing

Table of contents Nginx load balancing configurat...

Implementation of local migration of docker images

I've been learning Docker recently, and I oft...

10 bad habits to avoid in Docker container applications

There is no doubt that containers have become an ...

Summary of data interaction between Docker container and host

Preface When using Docker in a production environ...

How to make an input text box change length according to its content

First: Copy code The code is as follows: <input...

Analysis of the process of simply deploying nginx in Docker container

1. Deploy nginx service in container The centos:7...

Detailed explanation of Vue custom instructions and their use

Table of contents 1. What is a directive? Some co...

Detailed explanation of Vue's custom event content distribution

1. This is a bit complicated to understand, I hop...

How to use binlog for data recovery in MySQL

Preface Recently, a data was operated incorrectly...

Advantages of INSERT INTO SET in MySQL

Insert data into mysql database. Previously commo...

Solution to the problem of web page flash animation not displaying

<br />The solution steps are as follows: Sta...

Methods and steps to access Baidu Maps API with JavaScript

Table of contents 1. Baidu Map API Access 2. Usin...

Example code for implementing fullpage.js full-screen scrolling effect with CSS

When I was studying CSS recently, I found that I ...