상세 컨텐츠

본문 제목

centos7 웹서버 구축 ( apm )

CentOS + Raspberry Pi

by @45gram 2020. 5. 27. 15:05

본문

0.  ifup enp0s3 자동 활성화

 vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
ONBOOT=yes
service network restart

 

 

1. 서버 확인

centos 버전 확인 : cat /etc/redhat-release
커널 - gcc확인 :  cat /proc/version

 

 

2. 의존성 확인

rpm -qa libjpeg* libpng* freetype* gd-* gcc gcc-c++ gdbm-devel libtermcap-devel

 

 

3. 의존성 패키치 설치

yum install libjpeg* libpng* freetype* gd-* gcc gcc-c++ gdbm-devel libtermcap-devel

 

 

4. apm 설치

yum install httpd
yum install mariadb mariadb-server
yum install php php-mysql php-mbstring php-pdo php-gd
yum install php-xml

 

 

5. apm 설치여부 확인

rpm -qa httpd mariadb php

 

 

6. 서비스 실행

systemctl enable httpd.service 
systemctl start httpd
systemctl status httpd
ps -ef | grep httpd
systemctl enable mariadb.service
systemctl start mariadb
systemctl status mariadb 
ps -ef | grep mariadb

 

 

7. 방화벽 해제

setsebool -P httpd_can_network_connect=1
setsebool -P httpd_unified=1
setsebool -P httpd_can_network_connect_db 1
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --add-port=3306/tcp --permanent
firewall-cmd --reload

 

 

8. 사이트오픈

 

 

 

끝!

'CentOS + Raspberry Pi' 카테고리의 다른 글

selinux 사용  (0) 2020.06.04
Raspberry Pi 4 CentOS 7 Setup  (0) 2020.05.25
centos + raspberry pi  (0) 2020.05.25

관련글 더보기