리눅스

 

 

 

 

 

 

 

[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls
CentOS-Base.repo       CentOS-Media.repo    CentOS-fasttrack.repo
CentOS-CR.repo         CentOS-Sources.repo
CentOS-Debuginfo.repo  CentOS-Vault.repo
[root@localhost yum.repos.d]# gedit CentOS-Base.repo

 

 

gedit

#released updates 
#[updates]
#name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
#gpgcheck=1
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#enabled = 0

 

아이피 변경

 

 

[root@localhost yum.repos.d]# cd /etc/sysconfig/network-scripts/
[root@localhost network-scripts]# ls
ifcfg-ens32      ifdown-ib      ifdown-sit     ifup-eth    ifup-post         network-functions
ifcfg-lo         ifdown-ippp    ifdown-tunnel  ifup-ib     ifup-ppp          network-functions-ipv6
ifdown           ifdown-ipv6    ifup           ifup-ippp   ifup-routes
ifdown-Team      ifdown-isdn    ifup-Team      ifup-ipv6   ifup-sit
ifdown-TeamPort  ifdown-post    ifup-TeamPort  ifup-isdn   ifup-tunnel
ifdown-bnep      ifdown-ppp     ifup-aliases   ifup-plip   ifup-wireless
ifdown-eth       ifdown-routes  ifup-bnep      ifup-plusb  init.ipv6-global
[root@localhost network-scripts]# gedit ifcfg-ens32 

 

TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens32
UUID=5f9257f6-b931-4ac3-a76a-a13b263f35a1
DEVICE=ens32
ONBOOT=no

 

변경 =>

TYPE=Ethernet
BOOTPROTO=none
IPADDR=192.168.111.100
NETMASK=255.255.255.0
GATEWAY=192.168.111.2
DNSI=192.168.111.2
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens32
UUID=5f9257f6-b931-4ac3-a76a-a13b263f35a1
DEVICE=ens32
ONBOOT=yes

 

[root@localhost network-scripts]# systemctl restart network

 

설정 확인 ifconfig

[root@localhost network-scripts]# ifconfig
ens32: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.111.100  netmask 255.255.255.0  broadcast 192.168.111.255
        inet6 fe80::9c48:e7e0:51d8:55d9  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:fb:21:b2  txqueuelen 1000  (Ethernet)
        RX packets 158  bytes 17571 (17.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 29  bytes 3953 (3.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 564  bytes 49052 (47.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 564  bytes 49052 (47.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:aa:80:66  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 

 

SELinux 는 Linux의 보안을 강화해 주는 보안 강화 커널이고 zero-day 공격 및 buffer overflow 등 어플리케이션 취약점으로 인한 해킹을 방지해 주는 핵심 구성요소이다.

특정 서비스가 SELinux 때문에 동작하지 않는다면 SELinux 를 끄기 보다는 해당 서비스가 SELinux 하에서 잘 동작하도록 설정을 수정하는걸 권장한다.

SELinux 끄기

[root@localhost network-scripts]# gedit  /etc/sysconfig/selinux
 


# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
#SELINUX=enforcing
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted 
SELINUX=disabled

 

vmware 스냅샷

http://startdownload.tistory.com/24

 

 

 

linux

 

about author

PHRASE

Level 60  머나먼나라

실수는 종종 그를 따르는 사람들을 즐겁게 한다. -수피명언

댓글 ( 4)

댓글 남기기

작성
  •    
  •    
  •