Linux system set SVN boot

Linux server set svn boot

   System: centOS6  , if you are centOS7, pull directly below! !

The first:

1. Edit the rc.local file 

vi /etc/rc.d/rc.local

2. Add the command / usr / bin / svnserve -d -r / svn path #svnserve Write the full path for insurance! !

 The second kind:

1. Create a script file in the root directory of the Linux server (under the / root path)

     #  touch svn.sh

2. Enter the script file

      # vim svn.sh

3. Add some content

    #! / bin / bash
    / usr / bin / svnserve -d -r / var / svnRepository #absolute
  path query command (just keep consistent with this article)

   # which svnserve

4. Change the execution authority of the script

    # chmod 777 svn.sh

5. Join automatic operation

     # vi /etc/rc.d/rc.local
add the path of the script at the end:
       /root/svn.sh

6. Restart the Linux server, and check whether the svn server has been started

        # ps -ef | grep svnserve

   You can also try it directly! ! !

** CentOS7 sets the server to boot 

      CentOS 7's /etc/rc.d/rc.local does not have execution authority. The system recommends creating a systemd service to start the service

 

1. Find the svn service configuration file / etc / sysconfig / svnserve to edit the configuration file

vi /etc/sysconfig/svnserve  

 2. Change OPTIONS = "-r / var / svn" to the directory where the svn version is stored, save and exit

3. Set the boot

systemctl enable svnserve.service  

4. Start the service

systemctl start svnserve.service  

5. Then restart the server and check the svn service again

ps -aux | grep 'svn' 

END!!!

Published 48 original articles · praised 65 · 200,000 views

Guess you like

Origin blog.csdn.net/qq_40437152/article/details/105264767