분류 전체보기
-
[ CentOS 7 ] iptables service installLinux/RedHat, CentOS, ubuntu 2019. 4. 19. 21:20
Docs : https://tecadmin.net/install-and-use-iptables-on-centos-rhel-7 Step 1. STOP And Disable Firewalld # systemctl stop firewalld # systemctl disable firewalld # systemctl is-enabled firewalld disabled Step 2. Install Iptables Service # yum install iptables-services # systemctl enable iptables # systemctl start iptables # systemctl is-enabled iptables enabled # systemctl status iptables
-
Apache Tomcat Logging 경로와 Logging 항목 변경Windows/Windows 2008 , 2012 2019. 4. 19. 20:56
OS : Windows 2012 R2 - 로그파일 용량관리를 별도의 디렉토리로 분리와 일 단위 로그파일 생성 - 분석 항목 추가 %a Remote IP address %A Local IP address %b Bytes sent, excluding HTTP headers, or '-' if zero %B Bytes sent, excluding HTTP headers %h Remote host name (or IP address if enableLookups for the connector is false) %H Request protocol %I Remote logical username ..
-
Windows 2012 Tomcat 8 InstallWindows/Windows 2008 , 2012 2019. 4. 19. 20:01
Tomcat Homepage : https://tomcat.apache.org Step 1. Windows Service Installer Download Step 2. "Windows Service Installer Downloadapache-tomcat-8.5.40" Execute - Next Step 2. License Agreement - Next Step 3. Choose Components - Next Step 4. Choose Components - Next Step 5. Configuration Option. Tomcat Administrator Login Input User Name : Input Password : Step 6. Java Vitual Machine Input JRE Pa..
-
[Python] Access Log 유니코드를 한글로 변환Python/Python Programming 2019. 4. 18. 19:02
access log 파일이나 한글 URL경로를 보면 한글이 유니코드로 표기되어 있다. python으로 이를 한글로 쉽게 변환이 가능하다. from urllib.parse import unquote_plus site = '.com/%EA%B3%A0%EB%93%B1-%EC%98%81%EC%96%B4' searchword = unquote_plus(site, encoding='utf-8', errors='replace') print(searchword) ------------------------------------------------------------------- .com/고등-영어
-
Linux Ping (ICMP) check bash Shell ScriptingLinux/Shell Script 2019. 4. 17. 09:49
리눅스의 bash셀을 이용한 ping check 스크립트 - pinglist.txt : ping check iplist - pingcheck.sh : ping shell script pinglist.txt 127.0.0.1 # Loopback (Test) 192.168.x.77 # 정상응답 서버 (Green) 192.168.x.78 # Shutdown 된 서버 (Red) pingcheck.sh #!/bin/bash for i in `cat pinglist.txt`; do ping -c1 $i > /dev/null 2>&1 if [ $? -eq 0 ];then echo $i 'ping check ok' else echo $i 'ping check fail' fi done pingcheck.sh 127.0...
-
[Python] Linux에서 간단한 Web 모니터링 하기Python/Python for Linux 2019. 4. 15. 19:31
Python Version : 2.7.5 #!/usr/bin/python import requests as req from datetime import datetime import time sites = ('http://192.168.x.77','http://192.168.x.77/xxxx.php') for site in sites: try: r = req.get(site) print site, 'return_code :', r.status_code except Exception as e: print site, 'fail' time.sleep(10) ★ 웹 페이지가 기동 중 일 때, 아래와 같이 응답코드 값을 리턴 받을 수 있습니다. http://192.168.x.77 return_code : 200 (..
-
[Python] Linux Sendmail을 이용한 메일 보내기Python/Python for Linux 2019. 4. 13. 22:12
- OS : CentOS 7 - Python 2.7 #!/usr/bin/python from email.mine.text import MIMEText from subprocess import Popen, PIPE msg = MIMEText('Body Text') msg['Subject'] = 'Subject Text' msg['From'] = 'From Email Address' msg['To'] = 'To Email Address' p = Popen(["/usr/sbin/sendmail", "-t"], stdin=PIPE) p.communicate(msg.as_string()) Step 1. sendmail install # yum install sendmailyum install sendmail se..