vi /etc/sysconfig/selinux
SELINUX=disabled:wq!hwclock
yum install wget -y
rm -rf /etc/yum.repos.d/*
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repoyum clean allyum makecachesystemctl stop firewalldsystemctl disable firewalldyum remove firewalldyum install iptables-services -ysystemctl start iptablessystemctl enable iptablessystemctl status iptablessetenforce 0vi /etc/sysconfig/iptablesA INPUT -p tcp -m state --state NEW -m tcp --dport 3690 -j ACCEPT:wq!systemctl restart iptables
cd /etc/sysconfig/network-scripts/mv ifcfg-ens33 ifcfg-eth0
vi ifcfg-eth0
DEVICE="eth0"
NAME="eth0":wq!ip add //查出自己网卡的mac地址,并记录下来备用
在grub新增参数 sudo -e /etc/default/grub 在”GRUB_CMDLINE_LINUX“变量中添加一句”net.ifnames=0 biosdevname=0“ :wq!grub2-mkconfig -o /boot/grub2/grub.cfg //重新生成grub配置并更新内核参数新增udev规则
vi /etc/udev/rules.d/70-persistent-net.rules SUBSYSTEM=="net",ACTION=="add",DRIVERS=="?*",ATTR{address}=="00:0c:29:dc:dd:ad",ATTR{type}=="1" ,KERNEL=="eth*",NAME="eth0" :wq! 注意:上述mac地址必须是该网卡真实mac地址reboot
yum install apr-util apr-util-devel sqlite sqlite-devel serf scons zlib zlib-devel openssl openssl-devel -y
yum install serf scons -yyum install gcc* -yrpm -qa|grep subversionyum remove subversion*yum clean allvi /etc/yum.repos.d/subversion.repo[Subversion]name=Wandisco SVN Repobaseurl=http://opensource.wandisco.com/centos/$releasever/svn-1.9/RPMS/$basearch/enabled=1gpgcheck=0:wq!yum makecache
yum install subversiongroupadd svnuseradd -g svn svnvi /etc/sudoerssvn ALL=(ALL) ALL:wq!rpm -ql subversion
mkdir -p /data/svnRepossudo chmod -R o+rw /data/svnRepossvnadmin create /data/svnRepos/ls -lsa /data/svnRepos/
vi /data/svnRepos/conf/passwd[users]apple=2wsxzaq1vi /data/svnRepos/conf/authz
[/]apple=rwvi /data/svnRepos/conf/svnserve.conf
anon-access = readauth-access = writepassword-db = passwdauthz-db = authozrealm = /data/subRepos
:wq!
systemctl enable svnserver
vi /usr/lib/systemd/system/svnserver.service[Unit]
Description=SVN Server service After=network.target[Service]
Type=forkingExecStart= /usr/bin/svnserve -d -r /data/svnRepos --config-file=/data/svnRepos/conf/svnserve.confExecStop= /home/svn/stopSVN.shUser=svnRestart=on-abort[Install]
WantedBy=multi-user.target:wq!chmod +x /usr/lib/systemd/system/svnserver.service
vi /home/svn/stopSVN.sh
#!/bin/sh#查找是否有svnserve对应的进程,有的话关闭进程ps -ef|grep svnserve |grep -v grepif [ $? -ne 0 ]then echo "the svn server does not start"else killall -9 sh svnservefi:wq!chmod +x /home/svn/stopSVN.sh
systemctl daemon-reloadsystemctl enable svnserver.servicesystemctl start svnserver.service