Hướng dẫn nâng cấp phiên bản PHP cho VPS DirectAdmin

Hướng dẫn nâng cấp phiên bản PHP cho VPS DirectAdmin

Hiện tại khi sử dụng wordpress hoặc một số mã nguồn, có nhiều plugin yêu cầu server phải hỗ trợ các phiên bản PHP từ 5.6 trở lên mới có thể hoạt động được. Nếu VPS DirectAdmin của bạn đang sử dụng bạn PHP từ 5.5 trở xuống thì bạn nên nâng cấp php lên các phiên bản cao hơn để thuận tiện khi sử dụng.

Các bước thực hiện nâng cấp php trong VPS sử dụng DirectAdmin như sau:

1. Kiểm tra version custombuild

cd /usr/local/directadmin/custombuild
./build version

Nếu custombuild version của bạn đang là 1.0 thực hiện bước 2. Nếu đang là 2.0 thực hiện tiếp bước 3.

2. Nâng version custombuild

cd /usr/local/directadmin
mv custombuild custombuild_1.x
wget –O custombuild.tar.gz http://files.directadmin.com/services/custombuild/2.0/custombuild.tar.gz
cd custombuild
./build
./build all d
./build rewrite_confs —> upgrade custombuild 1.x to 2.0

3. Upgrade version PHP

cd /usr/local/directadmin/custombuild
./build update
./build set php1_release 5.4
./build php d > change version PHP

4. Restart httpd

services httpd restart

Nếu muốn hạ cấp ta sử dụng lệnh sau:

cd /usr/local/directadmin/custombuild
./build set php1_release 5.x (Ví dụ nếu cần hạ xuống 5.6 thì sửa “5.x” thành “5.6”)
./build update
./build php d

Be the first to comment

Leave a Reply

Your email address will not be published.


*