월루를 꿈꾸는 대학생

MRTG 구축 본문

Server&Network/Capston

MRTG 구축

하즈시 2020. 12. 25. 00:27
728x90

sudo apt-get install apache2 snmp snmpd -y

 

sudo systemctl start apache2
sudo systemctl enable apache2
sudo systemctl start snmpd
sudo systemctl enable snmpd

 

sudo apt-get install mrtg -y

 

sudo mkdir /var/www/mrtg

 

sudo chown -R www-data:www-data /var/www/mrtg

 

sudo cfgmaker public@localhost > /etc/mrtg.cfg

 

#출력화면

cfgmaker public@localhost > /etc/mrtg.cfg
--base: Get Device Info on public@localhost:
--base: Vendor Id: Unknown Vendor - 1.3.6.1.4.1.8072.3.2.10
--base: Populating confcache
--base: Get Interface Info
--base: Walking ifIndex
--base: Walking ifType
--base: Walking ifAdminStatus
--base: Walking ifOperStatus
--base: Walking ifMtu
--base: Walking ifSpeed

 

sudo indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html

 


sudo nano /etc/apache2/sites-available/mrtg.conf

 

#다음 내용 저장


<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DocumentRoot "/var/www/mrtg"
ServerName yourdomain.com
<Directory "/var/www/mrtg/">
Options None
AllowOverride None
Order allow,deny
Allow from all
Require all granted
</Directory>
TransferLog /var/log/apache2/mrtg_access.log
ErrorLog /var/log/apache2/mrtg_error.log
</VirtualHost>

 

저기서 yourdomain.com 을 자기 ip로 변경

 

sudo a2ensite mrtg
sudo systemctl restart apache2

 

#설치 완료 

 

 

 

 

728x90

'Server&Network > Capston' 카테고리의 다른 글

라즈베리파이 home assistant 구축  (0) 2020.12.26
Ansible 설치  (0) 2020.12.25
GNS3 STP 부하분산  (0) 2020.12.25
tftp 서버 구축  (0) 2020.12.25
Ansible apache2 구축  (0) 2020.12.25