만약 yum install이나 update 명령을 사용 하였을때

yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

위와 같은 오류로 끝난다면


# vim etc/sysconfig/network-scripts/ifcfg-[네트워크 이름]

으로 들어가고


ONBOOT=no를 YES로 바꿔준다.

이후에 wq로 저장후 종료하고


# dhclient

명령어 입력하고 yum 명령어 사용하면 된다.




nameserver등록 등을 하는 이전 자료들은 6버전대 이전 자료들에서만 먹히는 내용이므로, 

7버전부터는 이 내용을 사용하여야 한다.


-------------------



또 다른 문제

[Errno 256] No more mirrors to try.


해결법

# rm -fr /var/cache/yum/*

# yum clean all

# yum repolist all

centos7 부터

기존 iptables -> 변경 firewalld 로 변경됨

iptables 를 사용하려면 패키지 설치하면 사용가능

방화벽에 zone 이 존재하는데

default 값으로 public zone 이 설정되어있다.

/etc/firewalld/firewalld.conf 에서 default zone 설정 확인 가능

centos7 부터 방화벽 설정 파일이 .xml 파일로 변경 되었다.

/etc/firewalld/zones/public.xml 에서 해당 존의 설정 확인 ( default 라서 public.xml )

** 방화벽 최초 설치시의 값 **

[root@centos7 zones]# more public.xml

<?xml version="1.0" encoding="utf-8"?>

<zone>

  <short>Public</short>

  <description>For use in public areas. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are ac

cepted.</description>

  <service name="dhcpv6-client"/>

  <service name="ssh"/>

</zone>

허용하고자 하는 port 열기

# firewall-cmd --permanent --zone=public --add-port=80/tcp

확인

# cat public.xml

<?xml version="1.0" encoding="utf-8"?>

<zone>

  <short>Public</short>

  <description>For use in public areas. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted.</description>

  <service name="dhcpv6-client"/>

  <service name="ssh"/>

  <port protocol="tcp" port="80"/>

</zone>

# firewall-cmd --list-ports

허용한 port 삭제하기
# firewall-cmd --permanent --zone=public --remove-port=80/tcp

리로드로 적용

# firewall-cmd --reload

** 요약 **

centos7 부터 firewalld 로 변경 ( iptables 사용가능 )

zone 별로 적용 할 수 있다. default값으로 public zone 설정

# firewall-cmd --permanent --zone=public --add-port=80/tcp <추가>

# firewall-cmd --permanent --zone=public --remove-port=80/tcp <삭제>

# cat /etc/firewalld/zones/public.xml 에서 값 확인 가능

** firewalld 켜고 / 끄기 **

# systemctl start firewalld

# systemctl enable firewalld

# systemctl stop firewalld

# systemctl disable firewalld

** 기타 확인 명령어 **

# firewall-cmd --state ( 방화벽 상태 확인 )

# firewall-cmd --get-active-zones (활성화된 zone 목록 )

# firewall-cmd --get-service (현재 존재하는 서비스 목록 )

# firewall-cmd --zone=public --list-services ( public zone 에 있는 서비스 목록 )

chcon -R -t httpd_sys_rw_content_t /var/www/html
vim /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="vconsole.font=latarcyrheb-sun16 vconsole.keymap=ko crashkernel=auto  rhgb quiet net.ifnames=0 biosdevname=0"
GRUB_DISABLE_RECOVERY="true"
핵심은 ‘GRUB_CMDLINE_LINUX’ 에 ‘net.ifnames=0 biosdevname=0’ 를 추가

grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-123.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-123.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-123.9.3.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-123.9.3.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-123.8.1.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-123.8.1.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-123.6.3.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-123.6.3.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-babecd961e9a465686311e3f5930f25e
Found initrd image: /boot/initramfs-0-rescue-babecd961e9a465686311e3f5930f25e.img
done

cd /etc/sysconfig/network-scripts/
mv ifcfg-eno16777736 ifcfg-eth0

reboot


1. 업데이트 설치하기
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

yum -y install php56w php56w-opcache

yum -y install php56w-fpm php56w-opcache

yum -y install yum-plugin-replace
yum replace php-common --replace-with=php56w-common

2. 재설정
echo "<?php phpinfo(); ?>" > /var/www/html/info.php
chmod 777 /var/lib/php/session/
systemctl restart httpd

(테스트)


+ Recent posts