[목차]
1. APM 설치
centos 7 기본 저장소 설치 버전
- Apache 2.4
- PHP 5.4
- Mariadb 5.5
"다른 버전을 설치하고자 한다면 아래 매뉴얼을 참고해 버전만 변경해서 설치진행."
centos7 - PHP 버전별 설치 방법 (PHP5.x, PHP7.x, PHP8.x)
centos 7 기본 저장소의 php 버전은 5.4 버전으로 설치된다. 상위 버전의 php 설치를 위한 매뉴얼을 정리한다. rpm 패키지 설치를 통해서 처리하였다. 1. 설치 매뉴얼 Remi Collet은 프랑스 출신의 오픈소
gbminnote.com
centos7 - Mariadb 버전별 설치 방법 (Mariadb 10.x, Mariadb 11.x)
centos 7 기본 저장소의 Mariadb 버전은 5.5 버전으로 설치된다. 상위 버전의 Mariadb 설치를 위한 매뉴얼을 정리한다. rpm 패키지 설치를 통해서 처리하였다. 1. 저장소 확인 방법 https://mariadb.org/download/?t
gbminnote.com
1) 패키지 업데이트
# yum update
2) 프로그램 설치를 위한 패키지 설치
# yum install libjpeg* libpng* freetype* gd-* gcc gcc-c++ gdbm-devel libtermcap-devel pcre-devel acc make
3) Apache 설치
# yum install httpd
4) mod_ruid2 모듈 설치
여러 계정으로 각각의 사이트를 운영하기 위해 mod_ruid2 모듈을 설치함.
# yum install mod_ruid2
5) php 및 확장 모듈 설치
yum install php php-mysql php-pdo php-gd php-mbstring
6) Mariadb 설치
# yum install MariaDB-server MariaDB-client
7) vsftpd 설치
# yum install vsftpd
centos7 - vsftpd 설치 및 설정
vsftpd (Very Secure File Transfer Protocol Daemon) 파일을 전송하는 프로그램이고 centos7 기본 저장소에서 설치되고 있다. 이 문서는 vsftpd 설치 및 설정과 vsftpd.conf 설정 방법 등을 작성하였다. - 목차 1. vsftpd
gbminnote.com
APM 설정 및 계정 생성
1. MariaDB 초기 설정
# systemctl status mariadb // 서비스 실행 상태를 확인해 실행한다.
# systemctl enable mariadb.service
# mariadb-secure-installation
Enter current password for root (enter for none) : // 기본 패스워드는 없으니 엔터
Set root password ? [Y/n] : // y 입력후 root 패스워드 설정
Remove anonymous users? [Y/n] : // y (보안상 차단)
Disallow root login remotely? [Y/n] : // y (보안상 차단, 필요시 아이피 허용 방식으로 설정)
Remove test database and access to it? [Y/n] : // y (필요 없음)
Reload privilege tables now? [Y/n] : // y (저장)
2. FTP 계정 및 홈디렉터리 생성
#USER는 사용할 계정명으로 생성한다.
# useradd #USER -d /home/#USER -m -s /bin/bash
# passwd #USER
# chmod 755 /home /home/#USER
3. DB 생성 및 DB 계정 추가
#DBNAME, #DBUSER, #DB_PW는 생성할 정보로 입력한다. 보안상 외부 접근을 차단하고 localhost 만 허용했다.
# mysql -u root -p
MariaDB [(none)]> create database #DBNAME;
MariaDB [(none)]> grant all on #DBNAME.* to '#DBUSER'@'localhost' identified by '#DB_PW';
MariaDB [(none)]> grant all on #DBNAME.* to '#DBUSER'@'127.0.0.1' identified by '#DB_PW';
4. Apache 설정
# systemctl status httpd // 서비스 실행 상태를 확인해 실행한다.
# systemctl start httpd
# vi /etc/httpd/conf/httpd.conf // 여러 사이트 관리를 위해 설정 파일을 따로 관리한다.
+ include conf/httpd-vhosts.conf
5. Apache VirtualHost 설정
#USER, #DOMAIN, 은 생성할 정보로 입력한다.
<VirtualHost *:80>
DocumentRoot "/home/#USER/www"
ServerName #DOMAIN
ServerAlias www.#DOMAIN
ErrorLog "/var/log/httpd/#DOMAIN-error_log"
CustomLog "/var/log/httpd/#DOMAIN-access_log" common
<Directory "/home/#USER/www">
Options Indexes FollowSymLinks
Require all granted
</Directory>
</VirtualHost>
6. FTP 설정
ftp 계정의 상위 디렉터리 이동을 막는다.
vi /etc/vsftpd/vsftpd.conf
+ allow_writeable_chroot=YES
7. 부팅 후 서비스 자동 시작 적용
# systemctl enable httpd.service
# systemctl enable mariadb.service
# systemctl enable vsftpd.service