2023. 6. 18. 02:37ㆍ리눅스
필수 패키지 설치
# yum install -y wget yum-utils epel-release nginx
wget: url을 이용한 파일 다운로드
yum-utils: yum--config-manager를 이용한 php7.4 enable
epel-release : rehat 공식 리포지토리
nginx : Web SErver
wordpress 다운로드, archive 및 압축해제, 파일 복사 후 wp-config.php 생성
# wget https://ko.wordpress.org/wordpress-5.8.6-ko_KR.tar.gz
# ls
# tar xvfz wordpress-5.8.6-ko_KR.tar.gz
# cp -a wordpress/* /usr/share/nginx/html/
# cp /usr/share/nginx/html/{wp-config-sample.php, wpconfig.php}
php 리포지토리 설치 및 php7.4 활성화, php7.4 설치
# yum install-y http://rpms.remirepo.net/enterprise/remi-release-7.rpm
# yum-config-manager --enable remi-php74
# yum install -y php php-cli php-curl php-mcrypt php-gd php-cpcache php-common php-mysqlnd pp-fpm
php-fpm의 www.conf 파일 설정
nginx.conf 파일 설정
vi /etc/nginx/nginx.conf
location ~ |.php$ {
try_files $uri=404;
fastcgi_pass unix:/run/php-fpm/www.sock;
fastcgi_index index.php;
fastcgi_param SCrIpt_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
방화벽 open, package 실행
nginx -t : 문법 확인
systemctl start php-fpm
systemctl start nginx
firewall-cmd --add-port=80/tcp
결과(DB 구성 완료 시)
참고 사이트:
'리눅스' 카테고리의 다른 글
Rocky9 - Client 설치 및 설정 (0) | 2023.06.18 |
---|---|
Rocky9-ServerB 설치 및 셋팅 (0) | 2023.06.18 |
Rocky9 - Server 설치 및 환경 설정 (0) | 2023.06.18 |
DNS (2) | 2023.06.18 |
[이것이 리눅스다_Rocky Linux] 환경 설정 및 개요 (0) | 2023.05.23 |