Set up svn to boot from Linux

Source: Internet
Author: User

Method One: CentOS 7 setup SVN boot using the new SYSTEMCTL Service command (the author has successfully verified that the method is feasible)
    1. [Email protected] init.d]# Vi/lib/systemd/system/svnserve.service
    2. [Email protected] init.d]# Vi/etc/sysconfig/svnserve
    3. [Email protected] init.d]# Systemctl enable Svnserve.service
    4. Created symlink From/etc/systemd/system/multi-user.target.wants/svnserve.service to/usr/lib/systemd/system/ Svnserve.service.


After the SVN service is installed, the default is not automatically started with the system boot, CentOS 7/etc/rc.d/rc.local is not execute permissions, the system recommends the creation of SYSTEMD service startup services

Then look in the systemd svn configuration file/lib/systemd/system/svnserve.service

    1. [Unit]
    2. Description=subversion Protocol Daemon
    3. After=syslog.target Network.target
    4. [Service]
    5. Type=forking
    6. Environmentfile=/etc/sysconfig/svnserve
    7. Execstart=/usr/bin/svnserve--daemon--pid-file=/run/svnserve/svnserve.pid $OPTIONS
    8. [Install]
    9. Wantedby=multi-user.target

Find the SVN service profile/etc/sysconfig/svnserve Edit the configuration file

Vi/etc/sysconfig/svnserve


Change options= "-R/VAR/SVN" to SVN version inventory: Wq Save exit

At the prompt, enter

Systemctl Enable Svnserve.service

Start the service:
systemctl start svnserve.service
View Service List status
systemctl list-units --type=service

Systemctl List-unit-files

Restart the server, enter

Ps-aux | grep ' SVN '


Look at the SVN service started up no way two: the traditional way to set the SVN boot up (author in Centos7 settings not successful)
1. Installed SVN server, the default is not boot from the boot, each boot itself will be very troublesome, we can set it to boot
First: Write a startup script svn_startup.sh, which I put in/root/svn_startup.sh
#!/bin/bash
/usr/bin/svnserve-d-r/home/svnrepos/Here The Svnserve path is safe, it is best to write the absolute path, because the environment variable may not be loaded when it is started.
How do you find the absolute path?
Which Svnserve

There may also be a problem, if you build and write in Windows under the footsteps, get Linux, with VI or VIM modified may not be able to execute, this is a file format problem

VI svn_startup.sh

Input: Set FF Enter

If the displayed result is not Fileformat=unix

Re-enter

Set Ff=unix

It's OK.

Then modify the Execute permissions for the script

chmod a+x svn_startup.sh or

chmod ug+x svn_startup.sh

or everything.

chmod 777 svn_startup.sh

Last: Join Auto run

Vi/etc/rc.d/rc.local
Add the path to the script at the end, such as:
/root/svn_startup.sh

Now, you can reboot and try again. Do not know how to confirm success? I lost you.

Ps-ef|grep Svnserve

link in original: 74575458

Blog is to remember that they are easy to forget things, but also a summary of their work, the article can be reproduced, without copyright. Hope to do their own efforts to do better, we work together to improve!

If there is any problem, welcome to discuss together, code if there is a problem, you are welcome to the great God!

Set up svn to boot from Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.