All posts

CENTOS 새로 설치

현재 필름메이커스가 서버를 두고 있는라이트세일이 다 괜찮은데, cpu 점유율이 자꾸 치솟아서 뭔가 불안하다. 처리속도가 아주 빠른것도 아니고 비용도 월 25만원 가량이니까 가성비가 좋다고 하기 어렵다.
더 높은 사양으로 옮길 수도 없고 문의해볼 고객센터도 없고… 일단 다른데를 알아볼까 싶은데 마땅한 곳이 없다.
Koreaidc 나 ksidc. 또는 cafe24의 서버호스팅이나 단독웹호스팅, 스마일서브 등도 쭉 살펴보았지만 마땅히 마음에 드는게 없다. 월 트래픽이 3테라 가까이 나오는것 같은데 그 역시 부담스럽다.
고민하다가 vultr에 서울리전이 생겼고.. 마침 NVMe ssd 를 쓰는 서버상품들이 여러가지 나왔고 게다가 두 달은 무료라고 하니까 일단 신청해보았다.
(근데 CPU를 나눠쓰는한 쾌적한 이용은 힘들것 같다. 그 말은 클라우드는 근본적으로 안된다는 얘기. 아무래도 결국 단독서버로 가긴 해야할것 같다)

그 전에 도메인 등록, 네임서버, 메일포워딩 등의 서비스 검색.
godaddy - 도메인등록 / 네임서버 / 메일포워딩 (비싸다 - com 20,600 / kr 24.168)
hosting.kr - 도메인등록 / 네임서버 (싸다 11,000)
cloudflare.com - 네임서버 / 통계 / 캐쉬서버 - SSL
cloudns.net - 네임서버 / 통계/ 메일포워딩 / 디도스 방어 ($36/년)
sparkpost.com - 메일 발송 (20$/월)
improvmx.com - 메일포워딩 (9$/월)
forwardemail.net 메일포워딩 (무료)

  • 원래 centos8를 설치하려고 했는데 커뮤니티를 보니 올해 말에 지원이 끊기고 뭐 어쩌구 얘기가 많다. 그냥 centos7으로 설치하자

확인

OS버전 확인 #

<span class="token comment">cat /etc/redhat-release</span>

세팅

참고 : https://mpjamong.tistory.com/category/Linux?page=4

locale에서 에러가 난다.

vi ~/.bashrc

US English ##
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_COLLATE=C
export LC_CTYPE=en_US.UTF-8

시간 맞추기 # timedatectl set-timezone Asia/Seoul
시스템 시간 동기화 chrony
참고 : https://mpjamong.tistory.com/44?category=927381

일단 #yum update
필요한 패키지 설치
#yum install epel-release rsync wget psmisc net-tools lsof

기본방화벽이 있으니까 firewalld는 없어도 되지 않을까
#systemctl stop firewalld
#systemctl disable firewalld

 

rm -rf /var/tmp
ln -s /tmp /var/tmp

user add filmmakers
user passwd F@2021_01_20!@#Vultr

ssh를 key로 접속하게 변경.

터미널에서 #ssh-keygen -t rsa -b 4096 (아마 이미 만들어져 있다)
터미널에서 ssh-copy-id -i ~/.ssh/id_rsa.pub filmmakers@ip번호 로 서버에 공개키를 보낸다.
참고 : https://psychoria.tistory.com/749

vi /etc/ssh/sshd_config
들어가서 root로 로그인 안되게 하고, 포트 번호 바꾸고

ssh 포트의 번호를 바꿨다면, 그리고 firewalld를 쓴다면
#firewall-cmd --permanent --zone=public --add-port=2202/tcp
#firewall-cmd --reload
같은 경우 selinux도 설정
#semanage port -a -t ssh_port_t -p tcp 2202
#systemctl restart sshd

참고 : http://blog.naver.com/PostView.nhn?blogId=anysecure3&logNo=221687091464&categoryNo=59&parentCategoryNo=0&viewDate=&currentPage=1&postListTopCurrentPage=1&from=postView&userTopListOpen=true&userTopListCount=5&userTopListManageOpen=false&userTopListCurrentPage=1

저장소 추가

#dnf install epel-release
#dnf install elrepo-release
#dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
#dnf install dnf-utils

참고 : https://mpjamong.tistory.com/11

APM 설치
참고 : https://www.burndogfather.com/215

패키지확인
#dnf list | grep httpd
설치여부 확인
#dnf info httpd httpd-tools httpd-devel httpd-manual
설치
#dnf install -y httpd httpd-tools httpd-devel httpd-manual
설치확인
#dnf list installed | grep httpd
시작

<span class="token comment"># systemctl start httpd.service</span>
<span class="token comment"># 상태확인</span>
<span class="token comment"># systemctl status httpd.service</span>
<span class="token comment"># 프로세스 확인</span>
<span class="token comment"># ps -aux | grep httpd</span>
<span class="token comment"># 자동시작 추가</span>
<span class="token comment"># systemctl enable httpd</span>
<span class="token comment"># 자동시작 추가 확인</span>
<span class="token comment"># systemctl is-enabled httpd​</span>

#dnf module list php
#dnf module reset php
#dnf module install php:remi-8.0
#dnf -y install php-{cli,fpm,mysqlnd,zip,devel,gd,mbstring,curl,xml,pear,bcmath,json}
#
dnf install php php-cli php-common

Discussion

No comments yet