CentOS7 + APM(mariadb) > 리눅스 관련 기술

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

리눅스 관련 기술

CentOS7 + APM(mariadb)

페이지 정보

profile_image
작성자 아름답게
댓글 0건 조회 275회 작성일 18-03-12 15:13

본문

1. setup tools 설치
    #>yum install epel-release
    #>yum install net-tools
    #>yum install NetworkManager-tui
    #>yum install setuptool system-config-firewall-tui ntsysv bind-utils
    #>yum install policycoreutils-python

2. APM 설치
    #>yum --enablerepo=remi,remi-test,remi-php56 install httpd
    #>yum install mariadb-server mariadb
    #>yum --enablerepo=remi,remi-test,remi-php56 install php

3. 추가 라이브러리 설치
    #>yum --enablerepo=remi,remi-test,remi-php56 install gd gd-devel libpng libpng-devel libjpeg libjpeg-devel freetype freetype-devel fontconfig fontconfig-devel libxml2 libxml2-devel openssl openssl-devel gmp gmp-devel mhash mhash-devel libmcrypt libmcrypt-devel mysql-server php-mysql php-devel php-gd php-mbstring php-mhash

4. 기타 업데이트
    #>yum --enablerepo=remi,remi-test,remi-php56 update

5. MariaDB(Mysql) 설정
# yum -y install mariadb-server mariadb
# systemctl start mariadb  /* Maria DB 가동 */
# mysql_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] ; root 계정으로 원격 접속을 막을 것인가? 보안상 y 누르고 엔터 치세요
Remove test database and access to it? [Y/n] ; test 용으로 사용된 데이타 베이스를 삭제할것이냐? y 엔터 치시면 됩니다.
Reload privilege tables now? [Y/n] ; 지금까지 설정한 값을 적용할것이냐? y 엔터 치시면 됩니다.

#>systemctl restart mariadb ; 다시시작

참조
mariadb user 에는 추가된 필드가 있는데 phpMyAdmin 에는 반영이 되어 있지 않아 phpMyAdmin 에서 사용자를 추가하면 오류가 발생됨.
사용자를 추가할 때는
create user '아이디'@'localhost' identified by '비밀번호';
 
 MySQL 자동실행
    #>systemctl enable mariadb
    #>systemctl restart mariadb

6. PHP 설정
    #> vi /etc/httpd/conf.d/php.conf
        DirectoryIndex index.html index.htm index.php
        AddHandler php5-script .php .htm .html -> 추가 
    #>vi /etc/php.ini
        short_open_tag=Off ->short_open_tag=On
        ;error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
        error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
        display_errors = Off -> display_errors = On
        [Date]
        date.timezone = Asia/Seoul -> 주석풀고 타임존 설정

7. Apache 설정
    #>vi /etc/httpd/conf/httpd.conf
        AddDefaultCharset UTF-8 -> AddDefaultCharset EUC-KR  -> 문자셋 조정

8. firewalld 설정
    # 서비스 추가
    # $ firewall-cmd --permanent --zone=public --add-service=서비스명
    #>firewall-cmd --permanent --zone=public --add-service=http
    #>firewall-cmd --permanent --zone=public --add-service=mariadb

    # 포트 추가
    # $ firewall-cmd --permanent --zone=public --add-port=포트번호/프로토콜
    #>firewall-cmd --permanent --zone=public --add-port=80/tcp
    #>firewall-cmd --permanent --zone=public --add-port=3306/tcp

    # 서비스 삭제
    # $ firewall-cmd --permanent --zone=public --remove-service=서비스명
    #>firewall-cmd --permanent --zone=public --remove-service=http
   
    # 포트 삭제
    # $ firewall-cmd --permanent --zone=public --remove-port=포트번호/프로토콜
    #>firewall-cmd --permanent --zone=public --remove-port=80/tcp

 아파치 자동실행
    #>systemctl enable httpd.service
    #>systemctl status httpd.service

    yum 전체 업데이트 후 리부팅
    #>yum --enablerepo=remi,remi-test,remi-php56 update

Drupal을 사용하려면 몇가지 패키지를 추가로 설치합니다.
yum install php-xml php-gd
yum install php-pear php-devel gcc
pecl install uploadprogress

댓글목록

등록된 댓글이 없습니다.


회사소개 개인정보취급방침 서비스이용약관 모바일 버전으로 보기 상단으로

TEL. 042-365-0123 H.P 010-5500-1456. Email: kpcas@pcas.kr
대표:임재관 사업자등록번호:305-08-54668. 개인정보관리책임자:임재관

Copyright © www.PCAS.kr. All rights reserved.