KIC 홈페이지가 리뉴얼 오픈했습니다.

흐림22℃ 습도 71% 서풍 1.3m/s

Notices_영상

KOREA INTERNATIONAL CIRCUIT

# RockyLinux 10.2 + PHP 8.5 + MariaDB 11.8

# RockyLinux 10.2 + PHP 8.5 + MariaDB 11.8

## 기본 필요 툴 설치
```shell
dnf install -y epel-release lynx wget dnf-plugins-core
```

## SELinux Disable
> getenforce 값이 Disabled 인 경우 필요없음
```shell
vi /etc/selinux/config
# 위 파일에서 아래 라인 수정
SELINUX=disabled

# 수정후 재부팅
shutdown -r now
```

## Firewall
> 방화벽 사용중이지 않은 경우 필요없음
```shell
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --zone=public --add-service=ssh

firewall-cmd --reload

firewall-cmd --list-all
```

 

## PHP 8 설치
```shell
# Remi Repository 설치 (Rocky 10)
dnf install https://rpms.remirepo.net/enterprise/remi-release-10.rpm

# PHP 8.5 활성화
dnf module enable php:remi-8.5 -y

# PHP + Module 설치
dnf install -y php-fpm php-devel php-json php-mbstring php-opcache php-pdo php-pecl-geoip php-pecl-imagick php-tidy php-xml php-gd php-mysql php-pecl-zip php-curl php-bcmath

# php-fpm 서비스 등록
systemctl enable php-fpm
```

## PHP 설정
```shell
# 마지막에 로드되는 파일로 설정하여 강제 덮어쓰기
vi /etc/php.d/z-php.ini
```

```ini
# 파일 안에서 아래 부분 수정
expose_php = Off
upload_max_filesize = 200M
max_file_uploads = 100
post_max_size = 800M
date.timezone = Asia/Seoul

session.gc_maxlifetime = 86400
session.cookie_lifetime = 86400
```

## PHP-FPM 설정
```sh
#
vi /etc/php-fpm.d/www.conf

user = 사용자계정
group = 사용자계정

# php-fpm 서비스 시작
systemctl start php-fpm
```