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.repo
yum clean all
yum makecache
systemctl stop firewalld
systemctl disable firewalld
yum remove firewalld
yum install iptables-services -y
systemctl start iptables
systemctl enable iptables
systemctl status iptables
setenforce 0
vi /etc/sysconfig/iptables
A 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 -y
yum install gcc* -y
rpm -qa|grep subversion
yum remove subversion*
yum clean all
vi /etc/yum.repos.d/subversion.repo
[Subversion]
name=Wandisco SVN Repo
baseurl=http://opensource.wandisco.com/centos/$releasever/svn-1.9/RPMS/$basearch/
enabled=1
gpgcheck=0
:wq!
yum makecache
yum install subversion
groupadd svn
useradd -g svn svn
vi /etc/sudoers
svn ALL=(ALL) ALL
:wq!
rpm -ql subversion
mkdir -p /data/svnRepos
sudo chmod -R o+rw /data/svnRepos
svnadmin create /data/svnRepos/
ls -lsa /data/svnRepos/
vi /data/svnRepos/conf/passwd
[users]
apple=2wsxzaq1
vi /data/svnRepos/conf/authz
[/]
apple=rw
vi /data/svnRepos/conf/svnserve.conf
anon-access = read
auth-access = write
password-db = passwd
authz-db = authoz
realm = /data/subRepos
:wq!
systemctl enable svnserver
vi /usr/lib/systemd/system/svnserver.service
[Unit]
Description=SVN Server service
After=network.target
[Service]
Type=forking
ExecStart= /usr/bin/svnserve -d -r /data/svnRepos --config-file=/data/svnRepos/conf/svnserve.conf
ExecStop= /home/svn/stopSVN.sh
User=svn
Restart=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 grep
if [ $? -ne 0 ]
then
echo "the svn server does not start"
else
killall -9 sh svnserve
fi
:wq!
chmod +x /home/svn/stopSVN.sh
systemctl daemon-reload
systemctl enable svnserver.service
systemctl start svnserver.service