본문 바로가기

리눅스

[리눅스] CentOS 7.x YUM으로 APM 설치

728x90

YUM으로 APM 설치

EPEL 및 YUM Utilities 패키지 설치

yum install -y epel-release yum-utils

$ yum install -y epel-release yum-utils

컴파일에 필요한 라이브러리 설치

yum install -y gcc gcc-c++ gdbm-devel ncurses-devel

$ yum install -y gcc gcc-c++ gdbm-devel ncurses-devel

APM 설치에 필요한 라이브러리 설치

yum install -y openssl-devel gd-devel libpng-devel libjpeg-devel freetype-devel fontconfig-devel libxml2-devel gmp-devel mhash-devel libmcrypt-devel

$ yum install -y openssl-devel gd-devel libpng-devel libjpeg-devel \
 freetype-devel fontconfig-devel libxml2-devel gmp-devel mhash-devel libmcrypt-devel

httpd, ssl 설정

yum install -y httpd mod_ssl

$ yum install -y httpd mod_ssl

MariaDB 설치

MariaDB.repo 리포지토리 생성

$ cat <<EOF >> /etc/yum.repos.d/MariaDB.repo

# MariaDB 10.1 CentOS repository list 
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF

mariadb 설치

yum install -y MariaDB-server MariaDB-client

$ yum install -y MariaDB-server MariaDB-client

PHP 설치

php 5.4 비활성화(default version)

yum-config-manager --disable remi-php54

$ yum-config-manager --disable remi-php54

remi 리포지토리 추가

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

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

remi-php73 활성화

yum-config-manager --enable remi-php73

$ yum-config-manager --enable remi-php73

php 설치

yum install -y php php-cli php-fpm php-devel php-mysql php-mysqlnd php-zip php-gd php-mhash php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json

$ yum install -y php php-cli php-fpm php-devel \
 php-mysql php-mysqlnd php-zip php-gd php-mhash php-mcrypt php-mbstring \
 php-curl php-xml php-pear php-bcmath php-json

php 추가 모듈 설치

yum install -y php73-php-mysqlnd php73-php-pecl-mysql

$ yum install -y php73-php-mysqlnd php73-php-pecl-mysql

애플리케이션 버전 정보

mysql --version

$ mysql --version
mysql  Ver 15.1 Distrib 10.1.45-MariaDB, for Linux (x86_64) using readline 5.1

apachectl -version

$ apachectl -version
Server version: Apache/2.4.6 (CentOS)
Server built:   Apr  2 2020 13:13:23

php --version

$ php --version
PHP 7.3.19 (cli) (built: Jun  9 2020 08:06:30) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.19, Copyright (c) 1998-2018 Zend Technologies
728x90