ช่วยเพื่อน config ให้ใช้งาน ftp ใน google cloud ได้ ครั้งที่สอง

google cloud
google cloud

มีโอกาสช่วยเพื่อน config Linux ซึ่งอยู่ใน google cloud
หรือ http://cloud.google.com ให้สามารถใช้ ftp
สำหรับ upload script เข้าไปในระบบ
ครั้งนี้เป็นครั้งที่สอง ดีกว่าครั้งแรก เพราะใช้ user bitnami ที่มีอยู่
แต่ครั้งแรกคลำทางไม่ถูก สร้าง user ใหม่ เข้าไปครอบ folder เดิมเลย
.. แต่ก็พอใช้งานได้ครับ สรุปว่าต้องใช้ bitnami ถึงจะถูกแนวที่เขากำหนดไว้

ขั้นตอนเริ่มต้นก่อนเข้า ssh (Secure shell)
1. เข้า Compute, Compute Engine, VM instances
2. พบ instance ที่สร้างขึ้น ของเพื่อนผมเป็น nginxstack
3. ในบรรทัดนั้นมีคำว่า default ใต้ network ก็เข้าไป
4. เพิ่ม default-allow-ftp
มี Allowed protocols / ports เป็น tcp:21
มี Source tag/ IP range เป็น 0.0.0.0/0 เพื่ออนุญาตจากที่ใด เฉพาะ port ที่กำหนด
มี Target Tags เป็น Apply to all targets
ขั้นตอนการเข้าจัดการด้วย secure shell
#sudo su
#cd /etc
#vi vsftpd.allowed_users
เปลี่ยนจากผู้ใช้ชื่อ bitnamiftp เป็น bitnami
#vi vsftpd.conf
เพิ่ม # หน้า listen_address=127.0.0.1
#cd /etc/init.d
#./vsftpd restart
#passwd bitnami
#ln -s /opt/bitnami/nginx/html html
#cd /opt/bitnami/nginx/conf/bitnami
#vi bitnami.conf
แล้วเติม index.php ไปหลัง index
เดิม index index.html index.htm;
เป็น index index.php index.html index.htm;
#/etc/init.d/bitnami restart

เพื่อให้แน่ใจผม upload index.php มี phpinfo() เข้าไป
เพื่อให้เห็นว่า php ทำงาน จะได้ติดตั้ง app ต่าง ๆ ได้

Author: บุรินทร์ รุจจนพันธุ์

I am Lecturer, Developer, Researcher, Columnist, Writer, Photographer, and Webmaster - L@mpang man

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.