CentOS 설치에러 정리

CentOS

hostname 영구변경

1
#  hostnamectl set-hostname myhost

Could not retrieve mirrorlist… 해결

1
2
3
4
5
6
# vim /etc/sysconfig/network-scripts/ifcfg-ens33

ONBOOT=yes

# dhclient
# yum update

iptables 방화벽 끄기

웹 서버 데몬을 올리고 iptables 에서 80 포트 해제 해 준 뒤 localhost로 접속하는데 접속이 안된다.

구글링을 좀 했더니 CentOS 7 부터는 firewalld 라는 방화벽 데몬이 따로 돌아간단다. 예전처럼 iptables를 사용하기 위해서는 systemctl 설정을 좀 건드려 줘야한다.

출처 : https://luckyyowu.tistory.com/286

작동 중인 firewalld 데몬을 중지 시킨 후 재부팅 시에도 올라오지 않도록 설정

1
2
$ systemctl stop firewalld
$ systemctl mask firewalld

iptables 명령어 설치

1
$ yum install -y iptables-services

iptables 서비스 중지

1
$ systemctl stop iptables

출처

https://luckyyowu.tistory.com/286