서버 모니터링 시스템 설치

        sudo apt -y install netdata
        sudo apt -y install sysstat
        sudo apt -y install prometheus prometheus-node-exporter
        sudo apt -y install aide
        wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-3+ubuntu22.04_all.deb 
        dpkg -i zabbix-release_6.0-3+ubuntu22.04_all.deb 
        apt update 
        apt -y install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent2 php-mysql php-gd php-bcmath php-net-socket 
        nano /etc/netdata/netdata.conf  ->  bind socket to IP = 0.0.0.0
        systemctl restart netdata
    

디스크 용량 늘리는 방법

        물리적인 디스크를 추가해주고
        fdisk -l
        fdisk /dev/sdc
        mkfs.ext4 /dev/sdc1
        vgs 로 여유공간 확인
        pvcreate /dev/sdc1
        vgextend /dev/ubuntu-vg /dev/sdc1
        lvextend -L +50G /dev/ubuntu-vg/ubuntu-lv
        resize2fs /dev/ubuntu-vg/ubuntu-lv
        df -h
    

AWStats 설치 및 설정

        sudo apt -y install awstats
        nano /etc/awstats/awstats.conf 
        LogFormat=1
        SiteDomain="st.kr"
        HostAliases="localhost 127.0.0.1 REGEX[^.*www\.srv\.world$]" 

        nano /etc/apache2/conf-available/awstats.conf 
        Alias /awstats-icon/ /usr/share/awstats/icon/
        Alias /awstatsclasses/ /usr/share/java/awstats/

        
            Options FollowSymLinks
            AllowOverride None
            Require ip 127.0.0.1 0.0.0.0/24
        

        a2enconf awstats
        a2enmod cgid
        systemctl restart apache2
        /usr/share/awstats/tools/update.sh 
        /usr/share/awstats/tools/buildstatic.sh 

        192.168.1.3/cgi-bin/awstats.pl
    

Tripwire 설치 (Host-Based Intrusion Detection System)

        sudo apt update
        sudo apt-get install tripwire
        cd /etc/tripwire
        nano twcfg.txt
        twadmin -m F -c tw.cfg -S site.key twcfg.txt
        nano twpolmake.pl
        perl twpolmake.pl twpol.txt > twpol.txt.new
        twadmin -m P -c tw.cfg -p tw.pol -S site.key twpol.txt.new
        tripwire -m i -s -c tw.cfg
        tripwire -m c -s -c /etc/tripwire/tw.cfg
        tripwire -m i -s -c tw.cfg
        tripwire -m u-a-s -c /etc/tripwire/tw.cfg \
        -r /var/lib/tripwire/report/dlp.srv.world-20181129-140452.twr
    

참고사이트: Server World - Tripwire

분석일지를 만들어라