2023. 12. 21. 19:23 WorkHolic

CentOS 5 fail2ban 설치

728x90
반응형

 

 

CentOS 5 fail2ban 설치

 

ssh 무작위 접속 시도 차단에 fail2ban이 좋다.
아래와 같이 설치하면 된다.

 

1. EPEL Repo 설치

CentOS/RHEL 5, 64 Bit (x86_64):
# rpm -Uvh http://dl.fedoraproject.org/pub/archive/epel/5/x86_64/epel-release-5-4.noarch.rpm


2. fail2ban 설치

yum install fail2ban


3. /etc/fail2ban/jail.conf 수정

[ssh-iptables]

enabled  = true
filter   = sshd
action   = iptables[name=SSH, port=ssh, protocol=tcp]
           sendmail-whois[name=SSH, dest=you@example.com, sender=fail2ban@example.com, sendername="Fail2Ban"]
logpath  = /var/log/secure
maxretry = 5

4. 서비스 시작

/etc/init.d/fail2ban start

[root@kl151 fail2ban]# /etc/init.d/fail2ban start
Starting fail2ban:                                         [  OK  ]
[root@kl151 fail2ban]# fail2ban-client status
Status
|- Number of jail:      1
`- Jail list:           ssh-iptables

 

#CentOS5 #fail2ban

 

 

728x90
SMALL
Posted by gromet

2023. 12. 21. 18:58 WorkHolic

CentOS 5 EPEL Repo 설치

728x90
반응형

CentOS 5 EPEL Repo 설치

 

Centos 5.x
==========


wget http://dl.fedoraproject.org/pub/archive/epel/5/x86_64/epel-release-5-4.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
sudo rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

 

#EPEL #CentOS5

 

728x90
SMALL
Posted by gromet
728x90
반응형

CentOS 5 Yum 에러  (ssl connection)

 

CentOS 5 는 지원이 중단되어 기본 저장소인 mirror.centos.org 를 이용할 수 없다.
vault.centos.org 를 이용할 수 있지만, 해당 서버는 TLS 접속만을 허용하여 TLS 접속을 지원하지 않는 CentOS 5 에서는 접속할 수 없다.
mirror.nsc.liu.se 를 이용하면 SSL 오류 없이 접속할 수 있어 yum 사용이 가능해 진다. (2023.12.21 확인)
아래와 같이 CentOS-Base.repo 를 수정해 주면 된다.

 

[base]
name=CentOS-$releasever - Base
baseurl=https://mirror.nsc.liu.se/centos-store/5.11/os/$basearch/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5


[updates]
name=CentOS-$releasever - Updates
baseurl=https://mirror.nsc.liu.se/centos-store/5.11/updates/$basearch/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5


[extras]
name=CentOS-$releasever - Extras
baseurl=https://mirror.nsc.liu.se/centos-store/5.11/extras/$basearch/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

 

 

#CentOS5 #Yum_SSL_Error

728x90
SMALL
Posted by gromet
728x90
반응형

 

 

PHP 5.3 을 PHP 5.2로 다운그레이드 하는 방법

 

모든 PHP-5.2-.rpm을 다운로드 받은 후
rpm –oldpackage -Uvh php*
를 실행 해 주면 된다.

 

[참고사이트]
https://www.serverpronto.com/spu/2011/12/support-of-the-day-downgrade-php-5-3-to-5-2-on-centos-6/

 

 

 

728x90
SMALL
Posted by gromet
728x90
반응형

 

 

CentOS 6에 PHP 5.2 설치하기

 

PHP 5.2 에서 제작된 사이트들을 유지해야 해서 PHP 5.2를 사용할 수 있는 방법을 찾아 보게 되었다.
더불어 현재 운영중인 서버중 많은 수가 CentOS 6로 운영되고 있어 빠른 시간내에 처리할 수 있는 방법으로 CentOS 6에 PHP 5.2를 설치하는 방법을 검토하게 되었다.

방법으로는 컴파일을 하는 수 밖에 없다.
간편하게 제작된 스크립트가 있어 검토 중이다.

 

wget http://mirror.skamasle.com/vestacp/PHP/sk-php52-installer.sh

bash sk-php52-installer.sh

 

아직 실제 진행은 못해 보았다.
진행 해 본 후 업데이트 예정.

 

[참고사이트]
https://forum.vestacp.com/viewtopic.php?t=13406

 

Add PHP 5.2 Support in Centos 6 - Vesta Control Panel - Forum

one wrote:Hello, what about running this script on CentOS 7? I not test this in centos 7. I think need some changes, install some more dependencies maybe

forum.vestacp.com

 

 

#CentOS6 #PHP5.2

 

 

728x90
SMALL
Posted by gromet
728x90
반응형

 

 

CentOS 7 - [drm:radeon_vga_detect [radeon]] ERROR VGA-1: probed a monitor but no|invalid EDID

 

CentOS 7을 설치했는데 터미널과 로그상에 계속해서 아래와 같이 메세지가 뜬다.

Dec 19 16:50:16 localhost kernel: [drm:radeon_vga_detect [radeon]] *ERROR* VGA-2: probed a monitor but no|invalid EDID

 

원인을 찾아보니 모니터 케이블이나 모니터가 지원하지 않아서 나타난다고 하는데
Grub 수정을 통해서 해결 할 수 있었다.

 

추가:
vi /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"


실행:
grub2-mkconfig -o /boot/grub2/grub.cfg

 

grub2-mkconfig 실행 후 오류 메세지는 바로 사라졌다.

 

#Linux #CentOS7

 

 

728x90
SMALL
Posted by gromet

블로그 이미지
나는 운이 좋은 사람이다 나는 나날이 점점 더 좋아진다 내가 하는 선택과 행동은 반드시 성공으로 이어진다 내게는 인내력과 지속력이 있다 네게는 좋은것들만 모여든다
gromet

공지사항

Yesterday
Today
Total
반응형

달력

 « |  » 2024.9
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함

160x600