Install PHP 5.3 ลงใน Ubuntu 14.04

14 ก.พ. 2019 , 4,205 Views   , หมวดหมู่ AWS Linux โค๊ดดิ้ง   ,


Install PHP 5.3 ลงใน Ubuntu 14.04 โดยใช้ PHPBrew

Requirement

ดูตามลิ้งค์นี้  https://github.com/phpbrew/phpbrew/wiki/Requirement#ubuntu-1304–1404

ให้ทำการ Install ตามคำสั่งด้านล่างนี้ก่อน

INSTALL

เริ่มทำการติดตั้ง PHPBrew ก่อน

ต่อด้วย # Move phpbrew to somewhere can be found by your $PATH

ต่อด้วย # I assume you’re using bash

ต่อด้วย  # For the first-time installation, you don’t have phpbrew shell function yet.

อัพเดทเวอร์ชันเก่าๆ ที่น้อยกว่า 5.4 เข้ามา

แสดงเวอร์ชัน PHP ที่ใช้ได้

ทำการติดตั้ง PHP 5.3

ติดตั้งเสร็จแล้วเรียกใช้งาน

# Install some extensions for php

https://github.com/phpbrew/phpbrew/wiki/Extension-Installer

ตัวอย่าง

ให้ทำการเลือกใช้งาน php ก่อน

จากนั้นก็ install ext ตามที่ต้องการ

GD extension

หากขึ้น sh: 1: cannot create /home/<user>/.phpbrew/build/<phpversion>/ext/gd/build.log: Permission denied

ให้ทำการ เปลี่ยน Owen ของโฟลเดอร์ .phpbrew ก่อน

จากนั้นลองใหม่ครับ

 

เกี่ยวกับลง GD

https://github.com/phpbrew/phpbrew/issues/106

https://github.com/phpbrew/phpbrew/issues/515

ดูเพิ่มเติม

https://github.com/phpbrew/phpbrew

https://github.com/phpbrew/phpbrew/wiki/Quick-Start

https://github.com/phpbrew/phpbrew/issues/767