CentOS 安装 安全狗

一、下载安全狗

法一、64位操作系统下载命令:

wget http://down.safedog.cn/safedog_linux64.tar.gz

32位操作系统下载命令:

wget http://down.safedog.cn/safedog_linux32.tar.gz

法二、官网下载后上传到服务器

服务器安全狗

https://www.safedog.cn/install_desc_server.html

二、解压
[root@localhost wu]# tar xzvf safedog_linux64.tar.gz
三、安装

ls命令查看解压出来的文件夹名称

[root@localhost wu]#  ls
safedog_an_linux64_2.8.32947  safedog_linux64.tar.gz
[root@localhost wu]# cd safedog_an_linux64_2.8.32947/
[root@localhost safedog_an_linux64_2.8.32947]# chmod +x *.py
[root@localhost safedog_an_linux64_2.8.32947]# ./install.py
Selinux is running, can not install safedog!Please run setenforce 0 to disable
Installation aborted!

报错
临时关闭selinux:

[root@localhost safedog_an_linux64_2.8.32947]# setenforce 0
[root@localhost safedog_an_linux64_2.8.32947]# ./install.py 
Selinux is enabled in /etc/selinux/config, can not install safedog!Please set disabled to SELINUX
Installation aborted!

临时关闭无效,修改配置文件:

[root@localhost safedog_an_linux64_2.8.32947]# vim /etc/selinux/config

SELINUX=enforcing
改为
SELINUX=disabled

重新安装:

[root@localhost safedog_an_linux64_2.8.32947]# ./install.py
extracting files ...
create directory:'/etc/safedog/' failed!
installing exiting!
step 1/2, start install common lib                                                                [ok] 
step 2/2, start Install Server Defense Module                                                      
  step 2.1, checking os release version...                                                        [ok] 
sh: ./dependpkg/bin/udinstall: /etc/safedog/libs/sdcc/ld-linux.so.2: bad ELF interpreter: No such file or directory
  step 2.2, installing file...                                                                    [error] 
command:'cp -a -f -r ./dependpkg/lib/libsafedog/* /etc/safedog/libs/safedog/' failed!
cp: target ‘/etc/safedog/libs/safedog/’ is not a directory

Installation aborted!

报错,无权限

[root@localhost safedog_an_linux64_2.8.32947]# mkdir /etc/safedog
mkdir: cannot create directory ‘/etc/safedog’: Permission denied

查看文件属性,无异常

[root@localhost safedog_an_linux64_2.8.32947]# ll /
total 32
...
drwxr-xr-x. 155 root root 12288 Jan 29 17:12 etc
...

lsattr查看属性
lsattr参考:

https://blog.csdn.net/sugarCYF/article/details/108034987

[root@localhost safedog_an_linux64_2.8.32947]# lsattr /
---------------- /boot
----i----------- /etc
....

chattr 去除i属性

[root@localhost safedog_an_linux64_2.8.32947]# chattr -i /etc
[root@localhost safedog_an_linux64_2.8.32947]# lsattr /
---------------- /etc

重新安装

[root@localhost safedog_an_linux64_2.8.32947]# ./install.py
extracting files ...
step 1/2, start install common lib                                                                [ok] 
step 2/2, start Install Server Defense Module                                                      
  step 2.1, checking os release version...                                                        [ok] 
  step 2.2, installing file...                                                                    [ok] 
  step 2.3, start service...                                                                      [ok] 
  step 2.4, save safedog install info...
  Tips: 
  (1)safedog install directory: /etc/safedog 
  (2)install safedog version: 2.8.32947 
install safedog completely
Installation is complete!

安装成功,sdui进入操作页面

[root@localhost safedog_an_linux64_2.8.32947]# sdui

在这里插入图片描述
安全狗成功安装。

按实际需求恢复文件属性、启动selinux
[root@localhost safedog_an_linux64_2.8.32947]# chattr +i /etc
[root@localhost safedog_an_linux64_2.8.32947]# vim /etc/selinux/config

SELINUX=disabled
改回
SELINUX=enforcing

以下为官房说明,未实际操作(登陆后官网个人中心查看服务器)

执行以下命令加入服云,告别Linux传统字符界面,体验更多服云功能(fuyun.safedog.cn):
sdcloud -u 服云帐号
加入服云,云端对服务器进行安全管理

四、官方用户手册

服务器安全狗 Linux 版 V2.5.pdf

五、卸载安全狗

进入安全狗目录,运行uninstall.py

[root@localhost wu]# cd safedog_an_linux64_2.8.32947/
[root@localhost safedog_an_linux64_2.8.32947]# ./uninstall.py 
Would you like to backup safedog logs?[y/n](default:y):y
Collecting setup information                                                                      [ok] 
Uninstall Server Defense Module                                                                   [ok] 
Uninstall Server Defense Module Compeletely
Apache Defense Module is not installed
Nginx Defense Module is not installed
Uninstall Common Module                                                                           [ok] 
Uninstall completely!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值