CPU 온도를 체크 하려고 스트레스 프로그램을 설치하여서 확인해 보았습니다.

# yum install stress

# stress -c 4
stress: info: [1930] dispatching hogs: 4 cpu, 0 io, 0 vm, 0 hdd

CentOS CPU 부하 프로그램

[root@ivps ~]# stress --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 10s
stress: info: [1960] dispatching hogs: 8 cpu, 4 io, 2 vm, 0 hdd
stress: info: [1960] successful run completed in 10s

 

블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,

라즈베리파이와 안드로이드 폰에서 리눅스 명령어로 CPU 온도가 궁금해서 찾아봤습니다.

lm_sensors 유틸을 설치하고 sensors 명령어를 실행하면 됩니다.

# yum install lm_sensors

sensors-detect
# sensors-detect revision 3.4.0-6 (2016-06-01)
# DMI data unavailable, please consider installing dmidecode 2.7
# or later for better results.
# Kernel: 4.14.111-v7.1.el7 armv7l
**********
Your processor's architecture is not yet supported. Beware that sensors-detect might not work properly!
**********

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): YES
  계속 yes 를 입력합니다.

# sensors
...
pm8921_tz-virtual-0 

Adapter: Virtual device
temp1:        +35.5 C  (crit = +145.0 C)

pm8821_tz-virtual-0
Adapter: Virtual device
temp1:        +37.0 C  (crit = +145.0 C)

pm8821 이 CPU 온도로 보여집니다.

위 값은 안드로이드 폰에 설치된 CentOS 에서 가져온 온도입니다.

라즈베리파이에서는 위 유틸로 측정이 안되는군요~

# cat /sys/devices/virtual/thermal/thermal_zone0/temp
37932 ( 아이들 상태 )

44388 ( CPU 부하 상태 )

위 값에서 1000 을 나누면 온도 값인 듯 합니다.

 

블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,

ARM 용 CentOS 7 을 설치했더니 epel-release 가 그냥으로는 설치가 안되는군요~

[root@localhost android]# yum install epel-release
...
No package epel-release available.
Error: Nothing to do

# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
주소를 직접 입력해서 설치가 가능합니다.

File /var/cache/yum/armhfp/7/epel/metalink.xml does not exist 같은 에러가 발생할 겁니다.

삭제하고 아래 처럼 repo 를 추가합니다.

cat > /etc/yum.repos.d/epel.repo << EOF
[epel]
name=Epel rebuild for armhfp
baseurl=https://armv7.dev.centos.org/repodir/epel-pass-1/
enabled=1
gpgcheck=0
EOF

cat > /etc/yum.repos.d/php72-testing.repo << EOF
[php72-testing]
name=Remi php72 rebuild for armhfp
baseurl=https://armv7.dev.centos.org/repodir/community-php72-testing/
enabled=1
gpgcheck=0
EOF

cat > /etc/yum.repos.d/remi.repo << EOF
[remi]
name=Remi's RPM repository for Enterprise Linux 7 - $basearch
mirrorlist=http://cdn.remirepo.net/enterprise/7/remi/mirror
enabled=1
gpgcheck=1
gpgkey=https://rpms.remirepo.net/RPM-GPG-KEY-remi
EOF

epel-release 를 지원했으면 좋겠군요~

 

 

 

블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,

티스토리에 개인 도메인을 적용하려면 blog.tistory.com 을 CNAME 으로 설정을 하여야 합니다.

$TTL    3600
@       IN      SOA     ns.example.kr.    root (
                                        2019041510      ; serial
                                        3H              ; refresh
                                        15M             ; retry
                                        1W              ; expire
                                        1D )            ; minimum
        IN      NS              ns.example.kr.
        IN      MX      10      mail.example.kr.
        IN      A               192.168.1.2
ns      IN      A               192.168.1.2
mail    IN      A               192.168.1.2
www     IN      A               192.168.1.2
blog    IN      CNAME           blog.tistory.com.

뒷쪽에 점(.) 을 꼭찍어야 합니다.

 

블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,

Let's Encrypt 로 무료 인증서를 발급 받을려고 했더니 "DNS problem: SERVFAIL looking up CAA for ..." 에러 메시지가 뜨면서 더 이상 진행이 안되네요~

직접 네임서버 운영으로 해결했습니다.

# certbot certonly --standalone --agree-tos -m email@address -d www.example.kr
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for www.example.kr
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. www.example.kr (http-01): urn:ietf:params:acme:error:dns :: DNS problem: SERVFAIL looking up CAA for www.ivps.kr

IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: www.example.kr
   Type:   None
   Detail: DNS problem: SERVFAIL looking up CAA for www.example.kr

CAA 레코드를 지정하고 난 뒤에 인증서 발급이 되네요~

 

www.example.kr.        CAA 0   issue   "letsencrypt.org"

/var/named/example.kr.zone 파일에 위의 필드를 추가하고 named 재시작 하고 인증서 발급해보세요~

 

블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,

상위 버전에서 덤프 받은 DB 데이터를 하위 버전에 밀어 넣을려고 했더니 아래와 같은 에러가 나는군요~

 

ERROR 1273 (HY000) at line 31: Unknown collation: 'utf8mb4_unicode_520_ci'

 

ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

위와 같은 부분을 찾아서 변경하면 됩니다.

 

vi 에서 하는 방법

:%s/utf8mb4_unicode_520_ci/utf8_general_ci/g

:%s/utf8mb4/utf8/g

 

블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,

아파치 mod_ruid2 모듈과 mod_fcgid 모듈을 같이 사용하니깐 아래와 같은 오류가 뜨네요~

 

 [fcgid:emerg] [pid 24459] (13)Permission denied: [client 192.168.1.2:50024] mod_fcgid: can't lock process table in pid 2445

 

디렉토리, 파일 퍼미션을 이리저리 변경해 봤는데도 안되더군요~

결국 mod_ruid2 를 막던지

 

    <IfModule mod_ruid2.c>
        RMode config
        RUidGid apache apache
    </IfModule>

RUidGid apache apache 로 적용해야 실행이 됩니다.

 

블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,

CentOS 7.x 버전에서 yum 으로 php 를 설치하면 기본으로 5.4 버전이 설치가 됩니다.

5.6 버전 또는 7.0 ~ 7.2 버전으로 설치하는 방법니다.

 

yum install epel-release
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

yum install yum-utils

 

5.6 버전 설치
yum-config-manager --enable remi-php56

 

7.0 버전 설치
yum-config-manager --enable remi-php70

 

7.1 버전 설치
yum-config-manager --enable remi-php71

 

7.2 버전 설치
yum-config-manager --enable remi-php72

 

yum install php php-common php-fpm php-mysql php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml php-pecl-apc php-cli php-pear php-pdo

 

5.4 버전이 설치된 상태라면 yum update 를 하시면 됩니다.

 

블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,

sed 명령어로 문자열 치환시 ' $ 두 문자가 들어가야 되는데 sed -i 's/찾는문자열/바꿀문자열/g' 방법으로는 원하는대로 되지가 않습니다.

 

/etc/phpMyAdmin/config.inc.php 파일의 맨 아랫줄에

"$cfg['LoginCookieValidity'] = 43200;" 를 추가하려고 하는데 애를 먹었네요~

 

sed -i "s/^?>/\$cfg['LoginCookieValidity'] = 43200;\n?>/g" /etc/phpMyAdmin/config.inc.php

 

sed -i "s/찾는문자열/바꿀문자열/g" 파일경로 이렇게 큰따옴표로 감싸면 됩니다.

그리고 $는 앞에 \를 붙여주면 됩니다.

 

 

블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,

[CentOS] 7.x SELINUX 설정 해제



selinux 가 동작을 하고 있으면 보안 설정이 너무 짜증이 납니다.


# vi /etc/selinux/config 수정


#SELINUX=enforcing

SELINUX=disabled


이제 reboot 명령어로 시스템을 재시작 하면 됩니다.



수동으로는 "setenforce 0" 명령어를 실행하면 됩니다.


[root@localhost ~]# getenforce

Enforcing

[root@localhost ~]# setenforce 0

[root@localhost ~]# sestatus

SELinux status:                 enabled

SELinuxfs mount:                /sys/fs/selinux

SELinux root directory:         /etc/selinux

Loaded policy name:             targeted

Current mode:                   permissive

Mode from config file:          disabled

Policy MLS status:              enabled

Policy deny_unknown status:     allowed

Max kernel policy version:      31


설치후 disabled 로 변경하고 재시작을 권합니다.


블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,