顯示具有 centos 標籤的文章。 顯示所有文章
顯示具有 centos 標籤的文章。 顯示所有文章

2020年10月26日 星期一

OpenVAS on CentOS 8

參考網站

https://www.libellux.com/openvas/#install-openvas-20-08-centos


 == 更新 CentOS ==

server@centos:~$ sudo yum -y update


== 關閉root可以登入ssh ==

server@centos:~$ sudo nano /etc/ssh/sshd_config

PermitRootLogin no

server@centos:~$ sudo systemctl restart sshd.service

server@centos:~$ sudo yum update

server@centos:~$ sudo nano /etc/ssh/sshd_config

PermitRootLogin no

server@centos:~$ sudo systemctl restart sshd.service

server@centos:~$ sudo yum update


== 查看SELinux狀態 ==

server@centos:~$ sudo sestatus

SELinux status:                 enabled


== 關閉SELinux ==

server@centos:~$ sudo setenforce 0

server@centos:~$ sudo nano /etc/selinux/config

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

#     enforcing - SELinux security policy is enforced.

#     permissive - SELinux prints warnings instead of enforcing.

#     disabled - No SELinux policy is loaded.

SELINUX=disabled

 

== 重新開機 ==

server@centos:~$ sudo shutdown -r now


== 再次確認SELinux狀態 ==

server@centos:~$ sudo sestatus

SELinux status:                 disabled


== 安裝 wget ==

server@centos:~$ sudo yum install wget


== download the Atomicorp installer ==

server@centos:~$ wget -q -O - https://updates.atomicorp.com/installers/atomic | sudo sh

For supported software packages please contact us at: 

  sales@atomicorp.com

Do you agree to these terms? (yes/no) [Default: yes] yes

Enable repo by default? (yes/no) [Default: yes]: yes


== Enable PowerTools and install extra packages ==

server@centos:~$ sudo yum config-manager --set-enabled PowerTools

server@centos:~$ sudo yum install epel-release


== 安裝 gvm ==

server@centos:~$ sudo yum install gvm


== 更新及設定admin密碼(這個跑很久) ==

server@centos:~$ sudo gvm-setup


== 進入網站 ==

https://127.0.0.1/

https://ipv4/

https://[ipv6]/

2018年12月25日 星期二

CentOS 安裝 zabbix-agent



1.Adding Zabbix repository
#rpm -ivh https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm


2.Agent installation
#yum install zabbix-agent

3.start the agent
#service zabbix-agent start

2017年10月30日 星期一

OpenVAS 9 on CentOS 7

#禁止root ssh

>vi /etc/ssh/sshd_config

PermitRootLogin no

>systemctl restart sshd.service

======================================================================
#更新
yum -y update

======================================================================
#防火牆
http://blog.xuite.net/tolarku/blog/363801991-CentOS+7+Firewalld+防火牆說明介紹

======================================================================
#安裝OpenVAS

>vi /etc/selinux/config

SELINUX=disabled

>reboot

>yum install wget bzip2 texlive net-tools alien

>wget -q -O - http://www.atomicorp.com/installers/atomic | sh

>yum install redis openvas

>vim /etc/redis.conf
unixsocket /tmp/redis.sock
unixsocketperm 700

>systemctl enable redis
>systemctl restart redis

>openvas-setup

(下載更新 跑很久)

(設定admin帳號密碼)

#開啟防火牆
>firewall-cmd --permanent --zone=public --add-port=9392/tcp
>firewall-cmd --reload

======================================================================
#無法產生PDF檔的修正方法
>yum -y install texlive-changepage texlive-titlesec
>mkdir -p /usr/share/texlive/texmf-local/tex/latex/comment
>cd /usr/share/texlive/texmf-local/tex/latex/comment
>wget http://mirrors.ctan.org/macros/latex/contrib/comment/comment.sty
>chmod 644 comment.sty
>texhash