티스토리 뷰

이글은 구글 클라우드 플랫폼 (GCP)에 워드프레스를 무료로 설치하는 과정을 진행순서대로 적은 것 입니다. 매뉴얼은 아니며, 제가 나중에 다시 설치할때, 참고하기 위해서 작성한것 입니다. IT Report World 님의 오라클 우분투 매뉴얼을 토대로, 현재와 GCP에 맞게, 진행순서에 따라, 필요 명령문만 적은 것입니다.

 

오라클에 워드프레스를 설치를 해봤다면, 이제는 구글 클라우드 플랫폼에 설치를 해보자. 오라클과 거의 유사하며, 초기 설정만 조금 다르다. 주의할점은 사용자명이 ubuntu 가 아니라 지메일 id가 사용자명이 된다.  Linux 폴더 권한 설정에서 ubuntu 가 아니라 지메일 id 이다.

 

1. 회원가입 https://cloud.google.com/

 

클라우드 컴퓨팅 서비스  |  Google Cloud

데이터 관리, 하이브리드 및 멀티 클라우드, AI와 머신러닝 등 Google의 클라우드 컴퓨팅 서비스로 비즈니스 당면 과제를 해결하세요.

cloud.google.com

 

2. 평생 무료(?) 가능한 인스턴스 조건

다음 미국 내 리전 중 한 곳에서 f1-micro VM 인스턴스 1개:
오리건: us-west1
아이오와: us-central1
사우스캐롤라이나: us-east1

HDD 30GB: 표준 영구 디스크

 

3. 인스턴스 생성

 

4. 고정 IP 생성 https://console.cloud.google.com/networking/addresses/add?hl=ko 

5-a. GCP 인스턴스 SFTP 설정 https://jsp-dev.tistory.com/152

 

Google Cloud Platform SFTP / Filezila 접속 / 구글 클라우드 플랫폼 파일질라 사용

Google Cloud Platform SFTP / Filezila 접속 / 구글 클라우드 플랫폼 파일질라 사용 1. Google Cloud Platform 환경을 준비합니다. 들어가서 VM 만들면 되는데, AWS EC2 보다 만들기 훨씬 쉬운 것 같습니다. 자세한 설

jsp-dev.tistory.com

 

5-b. GCP 인스턴스 SFTP 설정 (쉬운 설명, 지메일 ID 포함)

 

GCP VM 인스턴스 FileZilla로 파일 전송하기

공부를 위해 Google Cloud Platform의 VM 인스턴스를 사용하던 중 Local의 파일을 VM 인스턴스로 전송해야 하는 일이 생겼다.VM 인스턴스와 FileZilla를 어떻게 연결하는지 알아보도록 한다.먼저 PuTTYgen을 실

velog.io

 

6. 오라클 클라우드 우분투 서버 환경 설정하기 https://itreport.tistory.com/627

 

4. 오라클 클라우드에서 우분투 LEMP - 오라클 클라우드 우분투 서버 환경 설정하기

Contents 0. 오라클 클라우드에서 Ubuntu LEMP(Linux+Nginx+MariaDB+PHP7)에 WORDPRESS 설치하기 1. 오라클 클라우드 무료 가입 (Oracle Cloud Free Tier)하기 2. 오라클 클라우드에서 Ubuntu(우분투) 인스턴스 서버 생성하

itreport.tistory.com

 

7. NGINX 설치 https://itreport.tistory.com/628

 

5. 오라클 클라우드에서 우분투 LEMP - Nginx 서버 설치하기

Contents 0. 오라클 클라우드에서 Ubuntu LEMP(Linux+Nginx+MariaDB+PHP7)에 WORDPRESS 설치하기 1. 오라클 클라우드 무료 가입 (Oracle Cloud Free Tier)하기 2. 오라클 클라우드에서 Ubuntu(우분투) 인스턴스 서버 생성하

itreport.tistory.com

 

8. Linux 폴더 권한 설정 https://itreport.tistory.com/630

 

6. 오라클 클라우드에서 우분투 LEMP - Linux 폴더 권한 설정 확인하기

Contents 0. 오라클 클라우드에서 Ubuntu LEMP(Linux+Nginx+MariaDB+PHP7)에 WORDPRESS 설치하기 1. 오라클 클라우드 무료 가입 (Oracle Cloud Free Tier)하기 2. 오라클 클라우드에서 Ubuntu(우분투) 인스턴스 서버 생성하

itreport.tistory.com

*ubuntu 가 아니라 지메일 id 

 

9. PHP 설치 https://itreport.tistory.com/631

 

7. 오라클 클라우드에서 우분투 LEMP - Nginx 서버에 PHP7 설치하기

Contents 0. 오라클 클라우드에서 Ubuntu LEMP(Linux+Nginx+MariaDB+PHP7)에 WORDPRESS 설치하기 1. 오라클 클라우드 무료 가입 (Oracle Cloud Free Tier)하기 2. 오라클 클라우드에서 Ubuntu(우분투) 인스턴스 서버 생성하

itreport.tistory.com

PHP 8.2 설치 할 경우 

sudo apt-get install php8.2-fpm
sudo apt-get install php8.2-intl php8.2-curl php8.2-gd php8.2-mysql php8.2-mbstring php8.2-xml php8.2-zip php8.2-imagick php8.2-bcmath -y zip unzip
sudo service php8.2-fpm start
sudo nano /etc/php/8.2/fpm/php.ini

 

10. Maria DB 설치 https://itreport.tistory.com/632

 

8. 오라클 클라우드에서 우분투 LEMP - MariaDB 설치하기

Contents 0. 오라클 클라우드에서 Ubuntu LEMP(Linux+Nginx+MariaDB+PHP7)에 WORDPRESS 설치하기 1. 오라클 클라우드 무료 가입 (Oracle Cloud Free Tier)하기 2. 오라클 클라우드에서 Ubuntu(우분투) 인스턴스 서버 생성하

itreport.tistory.com

마리아 DB최신 버젼 설치

sudo apt-get install software-properties-common
sudo apt-get install apt-transport-https curl
sudo curl -o /etc/apt/trusted.gpg.d/mariadb_release_signing_key.asc 'https://mariadb.org/mariadb_release_signing_key.asc'
sudo sh -c "echo 'deb https://tw1.mirror.blendbyte.net/mariadb/repo/10.11/ubuntu jammy main' >>/etc/apt/sources.list"
sudo apt-get update
sudo apt-get install mariadb-server

 

11. phpMyAdmin 설치 https://itreport.tistory.com/633

 

9. 오라클 클라우드에서 우분투 LEMP - phpMyAdmin 설치하기

Contents 0. 오라클 클라우드에서 Ubuntu LEMP(Linux+Nginx+MariaDB+PHP7)에 WORDPRESS 설치하기 1. 오라클 클라우드 무료 가입 (Oracle Cloud Free Tier)하기 2. 오라클 클라우드에서 Ubuntu(우분투) 인스턴스 서버 생성하

itreport.tistory.com

최신버젼 설치

wget -O /var/www/phpmyadmin5.2.zip https://files.phpmyadmin.net/phpMyAdmin/5.2.1/phpMyAdmin-5.2.1-all-languages.zip
unzip /var/www/phpmyadmin5.2.zip -d /var/www
rm /var/www/phpmyadmin5.2.zip
ln -s /var/www/phpMyAdmin-5.2.1-all-languages /var/www/html/testpagedb
mv /var/www/phpMyAdmin-5.2.1-all-languages/config.sample.inc.php /var/www/phpMyAdmin-5.2.1-all-languages/config.inc.php
mkdir /var/www/phpMyAdmin-5.2.1-all-languages/tmp
sudo chgrp www-data /var/www/phpMyAdmin-5.2.1-all-languages/tmp
sudo chmod 774 /var/www/phpMyAdmin-5.2.1-all-languages/tmp

 

12. DB 생성하기 https://itreport.tistory.com/639

 

13. 오라클 클라우드에서 우분투 LEMP - DB 생성하기

Contents 0. 오라클 클라우드에서 Ubuntu LEMP(Linux+Nginx+MariaDB+PHP7)에 WORDPRESS 설치하기 1. 오라클 클라우드 무료 가입 (Oracle Cloud Free Tier)하기 2. 오라클 클라우드에서 Ubuntu(우분투) 인스턴스 서버 생성하

itreport.tistory.com

DB생성은 phpMyAdmin에서 unicode로 해야한다. putty로 생성하면 general로 생성이 된다. 왜 그런지 모르겠음

 

 

13. 도메인 연결

도메인 등록처에서 외부 IP 주소로 연결!

인증서 받기전 default 화일은 내용 모두 지우고 아래와 같이 함

 

non-WWW

server { 
    listen 80 default_server; 
    listen [::]:80 default_server; 
    root /var/www/html; 
    index index.php index.html index.htm index.nginx-debian.html ; 
    server_name tyzen.net;

    location / {
		try_files $uri $uri/ =404;
                if (!-e $request_filename) { 
	         rewrite ^.*$ /index.php last; 
		}
     }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
       fastcgi_pass unix:/run/php/php8.2-fpm.sock;
       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
       include fastcgi_params; 
       fastcgi_read_timeout 300;
    }

   location ~ /\.ht {
     deny all;
   }
}

server {
	listen 80;
	listen [::]:80;
	server_name www.tyzen.net;
	location / {
		return 301 http://tyzen.net$request_uri;
	}
}

 

WWW

server { 
    listen 80 default_server; 
    listen [::]:80 default_server; 
    root /var/www/html; 
    index index.php index.html index.htm index.nginx-debian.html ; 
    server_name www.tyzen.net;

    location / {
		try_files $uri $uri/ =404;
                if (!-e $request_filename) { 
	         rewrite ^.*$ /index.php last; 
		}
     }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
       fastcgi_pass unix:/run/php/php8.2-fpm.sock;
       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
       include fastcgi_params; 
       fastcgi_read_timeout 300;
    }

   location ~ /\.ht {
     deny all;
   }
}

server {
	listen 80;
	listen [::]:80;
	server_name tyzen.net;
	location / {
		return 301 http://www.tyzen.net$request_uri;
	}
}

 

14. 인증서 설치

sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo certbot --nginx
1,2
sudo nginx -t 
sudo service nginx restart

sendmail 설치 안함, 인스턴스가 느려지고 메일이 오지도 않음, WP SMTP 플러그인 추천

인증서 갱신 설정 불필요, 위의 명령문만 하면, 자동갱신이 됨! 

 

 

15. 워드프레스 설치 https://itreport.tistory.com/640

 

14. 오라클 클라우드에서 우분투 LEMP - Wordpress 설치하기

Contents 0. 오라클 클라우드에서 Ubuntu LEMP(Linux+Nginx+MariaDB+PHP7)에 WORDPRESS 설치하기 1. 오라클 클라우드 무료 가입 (Oracle Cloud Free Tier)하기 2. 오라클 클라우드에서 Ubuntu(우분투) 인스턴스 서버 생성하

itreport.tistory.com

 

'Web Hosting' 카테고리의 다른 글

오라클 클라우드에 무료로 워드프레스 설치하기  (4) 2023.04.30
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함