CentOS 8 초기 설정 세팅 > 개발

본문 바로가기
사이트 내 전체검색

개발

CentOS 8 초기 설정 세팅

페이지 정보

profile_image
작성자 관리자 (61.♡.26.87)
댓글 0건 조회 1,749회 작성일 19-12-15 16:58

본문

# locale issue

텍스트 파일 안의 한글이 제대로 보이지 않는다.
utf-8 파일임에도 불구하고 말이다.

명령어 locale , yum 등등에서도 무슨 디폴트값이 없다고 나온다.

locale 이슈가 있다고 한다.
http://blog.nashcom.de/nashcomblog.nsf/dx/locale-issue-on-linux-centos-rhel.htm

해결방법
```
# yum list | grep langpacks
# yum install -y langpacks-en langpacks-de glibc-all-langpacks
# yum list | grep langpacks
```

실제로 위의 install 전과 후를 비교해 보면,

```
langpacks-ko.noarch .... @AppStream
glibc-all-langpacks.x86_64 .... BaseOS
langpacks-en.noarch .... AppStream
```

```
glibc-all-langpacks.x86_64 .... @BaseOS
langpacks-en.noarch .... @AppStream
langpacks-ko.noarch .... @AppStream
```

이렇게, 다른 두개는 @가 붙지 않았었다가, 후에는 @ 붙어 있다.
그리고, 골뱅이가 붙은 것들이 상단으로 위치하는 듯 하다.

골뱅이가 붙은 것은 real repo 가 아니라는 듯 한데, 특수문자라서 검색이 잘 안된다.
https://unix.stackexchange.com/questions/356614/what-means-anaconda-repo-in-the-yum-list-installed


ㅁ 스왑파일 만들기

https://linuxize.com/post/how-to-add-swap-space-on-centos-8/


ㅁ epel 저장소 설치
```
# yum install epel-release
```


ㅁ 이전 버전에 비해서 달라진점

- 패키지 관리자로 dnf 를 사용한다.
  물론, yum 도 사용할 수 있다. 근데, /usr/bin/yum 은 /usr/bin/dnf-3 으로 link 되어 있다.
  dnf 도 /usr/bin/dnf-3 으로 링크되어 있다.



ㅁ Apache PHP MariaDB 설치

https://linuxize.com/post/how-to-install-apache-on-centos-8/
https://computingforgeeks.com/how-to-install-php-7-2-7-1-on-rhel-8/
https://linuxize.com/post/how-to-install-mariadb-on-centos-8/

DNF 를 이용해서 remi repo 에 있는 여러 버전의 php 를 직접 관리할 수 있는 모양이다. 올~
https://linuxize.com/post/how-to-install-php-on-centos-8/

apache 2.4 가 기본적으로 mpm_event 모듈로 설치가 되고,
php 도 php-fpm 으로 설치가 된다.

mariadb transaction isolation level 을 read-committed 로 변경하기
```
$ vi /etc/my.cnf
[mysqld]
transaction-isolation          = READ-COMMITTED
```

ㅁ SELinux 에서 Apache 설정

SELinux 정책에서 apache 를 허용해 주는 방식이다.
http context(httpd_t) 를 permissive 에 추가(-a) 해 준다.
```
# semanage permissive -a httpd_t
```
실행 시간이 많이 걸린다. 분단위..

httpd_t 를 찾는 방법은
SELinux 가 가동되고 있는 상태에서 아래 명령을 해 보면 비슷한 것을 볼 수가 있다.
```
# ps axZ
```

마찬가지로 아래처럼 하면 fail2ban 의 context 도 찾을 수 있다.
```
# ps axZ | grep fail2ban
```

https://mr.kikni.com/tip/3438
https://wiki.centos.org/HowTos/SELinux
https://www.lesstif.com/pages/viewpage.action?pageId=18219476
https://linuxize.com/post/how-to-disable-selinux-on-centos-8/


# SELinux 관련

SELinux 관련해서는 이슈가 좀 많다.
이전에 세팅했던 서버들은 모두 SELinux 를 disable 시켜 놓고 사용을 했으나,
앞으로는 SELinux 를 켜 놓은 상태에서 서버를 운영하고자 한다.
그리고, 필요한 경우 관련 설정을 추가해 나가야 할 듯이 보인다.
이 경우, 동작하지 않는 이유가 SELinux 때문이라는 것을 떠올려야 할 것이다.

관련 명령어
```
# sestatus
# getenforce
# setenforce -h
```

관련 파일
/etc/selinux/*

ㅇ SELinux 동작모드 변경
SELinux 는 enforce, permissive, disable 세 가지 동작 모드가 있다.
현재 모드 확인
```
# getenforce
```
permissive 모드로 변경
```
# setenforce 0
```
현재 모드 다시 확인
```
# getenforce
```
enforce 모드로 변경
```
# setenforce 1
```

추천0

댓글목록

등록된 댓글이 없습니다.

Total 386건 8 페이지
  • RSS

검색


사이트 정보

Copyright © Baragi.Net. All rights reserved.