1. Apache 설치
[root@localhost yum.repos.d]# yum list httpd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.navercorp.com
* extras: mirror.navercorp.com
* updates: mirror.navercorp.com
Available Packages
httpd.x86_64 2.4.6-97.el7.centos.5 updates
[root@localhost yum.repos.d]# yum install httpd
설치완료 후 버전확인
[root@localhost yum.repos.d]# httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built: Mar 24 2022 14:57:57
2. MariaDB 10.7 설치
기본 버전은 5.5 버전이므로 10.7 설치를 위해서는 repo 를 등록해야 한다.
# cd /etc/yum.repos.d
[root@localhost yum.repos.d]# ll
합계 40
-rw-r--r--. 1 root root 1664 11월 24 2020 CentOS-Base.repo
-rw-r--r--. 1 root root 1309 11월 24 2020 CentOS-CR.repo
-rw-r--r--. 1 root root 649 11월 24 2020 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 630 11월 24 2020 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 11월 24 2020 CentOS-Sources.repo
-rw-r--r--. 1 root root 8515 11월 24 2020 CentOS-Vault.repo
-rw-r--r--. 1 root root 314 11월 24 2020 CentOS-fasttrack.repo
-rw-r--r--. 1 root root 616 11월 24 2020 CentOS-x86_64-kernel.repo
[root@localhost yum.repos.d]# vi MariaDB.repo
# MariaDB 10.7 CentOS repository list - created 2022-04-16 21:02 UTC
# https://mariadb.org/download/
[mariadb]
name = MariaDB
baseurl = https://mirror.yongbok.net/mariadb/yum/10.7/centos7-amd64
gpgkey=https://mirror.yongbok.net/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1
MariaDB-repo 가 추가되었다.
[root@localhost yum.repos.d]# ll
합계 44
-rw-r--r--. 1 root root 1664 11월 24 2020 CentOS-Base.repo
-rw-r--r--. 1 root root 1309 11월 24 2020 CentOS-CR.repo
-rw-r--r--. 1 root root 649 11월 24 2020 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 630 11월 24 2020 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 11월 24 2020 CentOS-Sources.repo
-rw-r--r--. 1 root root 8515 11월 24 2020 CentOS-Vault.repo
-rw-r--r--. 1 root root 314 11월 24 2020 CentOS-fasttrack.repo
-rw-r--r--. 1 root root 616 11월 24 2020 CentOS-x86_64-kernel.repo
-rw-r--r--. 1 root root 271 4월 17 06:00 MariaDB.repo
[root@localhost yum.repos.d]#
설치
[root@localhost yum.repos.d]# yum install MariaDB-server MariaDB-client
서버 start
[root@localhost yum.repos.d]# systemctl start mariadb
root password 설정
[root@localhost yum.repos.d]# mysqladmin -u root password
시작프로그램에 등록(서버 시작시 자동실행)
[root@localhost yum.repos.d]# systemctl enable mariadb
버전확인
[root@localhost yum.repos.d]# mysql -v
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 6
Server version: 10.7.3-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Reading history-file /root/.mysql_history
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
exit 또는 컨트롤 + c 로 빠져나온다.
3. PHP7.4 설치
MariaDB 처럼 기본 버전이 낮으므로 (5.4) 7.x 버전 설치를 위한 repo를 등록한다.
[root@localhost yum.repos.d]# yum list php
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.navercorp.com
* extras: mirror.navercorp.com
* updates: mirror.navercorp.com
Available Packages
php.x86_64 5.4.16-48.el7 base
[root@localhost yum.repos.d]# yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
[root@localhost yum.repos.d]# ll
합계 112
-rw-r--r--. 1 root root 1664 11월 24 2020 CentOS-Base.repo
-rw-r--r--. 1 root root 1309 11월 24 2020 CentOS-CR.repo
-rw-r--r--. 1 root root 649 11월 24 2020 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 630 11월 24 2020 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 11월 24 2020 CentOS-Sources.repo
-rw-r--r--. 1 root root 8515 11월 24 2020 CentOS-Vault.repo
-rw-r--r--. 1 root root 314 11월 24 2020 CentOS-fasttrack.repo
-rw-r--r--. 1 root root 616 11월 24 2020 CentOS-x86_64-kernel.repo
-rw-r--r--. 1 root root 271 4월 17 06:00 MariaDB.repo
-rw-r--r--. 1 root root 1050 10월 3 2017 epel-testing.repo
-rw-r--r--. 1 root root 951 10월 3 2017 epel.repo
-rw-r--r--. 1 root root 446 2월 15 19:37 remi-glpi91.repo
-rw-r--r--. 1 root root 446 2월 15 19:37 remi-glpi92.repo
-rw-r--r--. 1 root root 446 2월 15 19:37 remi-glpi93.repo
-rw-r--r--. 1 root root 446 2월 15 19:37 remi-glpi94.repo
-rw-r--r--. 1 root root 855 2월 15 19:37 remi-modular.repo
-rw-r--r--. 1 root root 456 2월 15 19:37 remi-php54.repo
-rw-r--r--. 1 root root 1314 2월 15 19:37 remi-php70.repo
-rw-r--r--. 1 root root 1314 2월 15 19:37 remi-php71.repo
-rw-r--r--. 1 root root 1314 2월 15 19:37 remi-php72.repo
-rw-r--r--. 1 root root 1314 2월 15 19:37 remi-php73.repo
-rw-r--r--. 1 root root 1314 2월 15 19:37 remi-php74.repo
-rw-r--r--. 1 root root 1314 2월 15 19:37 remi-php80.repo
-rw-r--r--. 1 root root 1314 2월 15 19:37 remi-php81.repo
-rw-r--r--. 1 root root 750 2월 15 19:37 remi-safe.repo
-rw-r--r--. 1 root root 2605 2월 15 19:37 remi.repo
epel-release (Extra Package for Enterprise Linux) 를 업데이트한다.
[root@localhost yum.repos.d]# yum install epel-release
php repo 버전관리를 위해 yum-utils를 설치한다.
# yum install yum-utils
php-repo 를 7.4 버전으로 지정한다.
[root@localhost yum.repos.d]# yum-config-manager --enable remi-php74
php를 설치한다.
[root@localhost yum.repos.d]# yum install php
php 관련 패키지를 설치한다.
[root@localhost yum.repos.d]# yum install php-fpm php-cli php-redis php-brotli php-intl php-gd php-gmp php-imap php-bcmath php-interbase php-json php-mbstring php-mysqlnd php-odbc php-opcache php-memcached php-tidy php-pdo php-pdo-dblib php-pear php-pgsql php-process php-pecl-apcu php-pecl-geoip php-pecl-imagick php-pecl-hrtime php-pecl-json php-pecl-memcache php-pecl-mongodb php-pecl-rar php-pecl-pq php-pecl-redis4 php-pecl-yaml php-pecl-zip
버전을 확인해 본다.
[root@localhost yum.repos.d]# php -v
PHP 7.4.29 (cli) (built: Apr 12 2022 10:55:38) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.29, Copyright (c), by Zend Technologies
끝.
'PHP' 카테고리의 다른 글
OSX php7.4 설치 (0) | 2022.04.21 |
---|---|
Codeigniter4 encrypter (0) | 2022.04.16 |
Codeigniter3 to Codeigniter4 마이그레이션 (0) | 2022.04.15 |
Codeigniter4 파일 명명 규칙 (0) | 2022.04.15 |
오늘이 이번 달 몇째 주인지 확인. (0) | 2022.04.15 |