Amazon Linux AMI 2018 EOS로 php 기반 서버들의 OS udate가 요구됨
Amazon linux2 EC2 생성
apache 설치
sudo yum update -y
sudo yum install -y httpd
sudo systemctl start httpd
sudo systemctl enable httpd
sudo systemctl status httpd
php 5.4.16 설치
sudo amazon-linux-extras install epel -y
sudo yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum-config-manager --enable remi-php56
sudo yum install -y php php-cli php-common php-devel php-mbstring php-xml php-mysqlnd
sudo systemctl restart httpd
php -v
echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/info.php
http://hostaddress/info.php
sudo rm /var/www/html/info.php
php 5.4.16 > php 5.6.40 변경
sudo yum remove php php-cli php-common php-devel php-mbstring php-xml php-mysqlnd -y
sudo amazon-linux-extras install epel -y
sudo yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo vi /etc/yum.repos.d/remi.repo
[remi]
name=Remi's RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/remi/$basearch/
mirrorlist=https://rpms.remirepo.net/enterprise/7/remi/mirror
enabled=1
priority=1
gpgcheck=1
gpgkey=https://rpms.remirepo.net/RPM-GPG-KEY-remi
[remi-php56]
name=Remi's PHP 5.6 RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/php56/$basearch/
mirrorlist=https://rpms.remirepo.net/enterprise/7/php56/mirror
enabled=1
priority=1
gpgcheck=1
gpgkey=https://rpms.remirepo.net/RPM-GPG-KEY-remi
remi와 remi-php56 항목에 priority=1 추가
sudo yum install -y php php-cli php-common php-devel php-mbstring php-xml php-mysqlnd
php -v
vi /etc/php.ini
short_open_tag = ON
'Infra > Web 데몬' 카테고리의 다른 글
Git 설치부터 AWS CodeCommit으로의 푸시까지 단계별 가이드 (0) | 2024.08.27 |
---|---|
Jenkins 설치와 AWS Code Repository와 연동 (0) | 2024.08.01 |
Docker 설치 및 설정 deploying WSL2 distributionsensuring main distro is deployed error 해결 (0) | 2024.07.30 |
git 설치와 AWS code repository 생성 (0) | 2024.07.22 |
Nginx load balance 설정 with SSL(HTTPS) (0) | 2023.04.17 |