search
Homephp教程php手册ubuntu 环境搭建 及 php 版本升级

ubuntu 环境搭建 及 php 版本升级

Jun 06, 2016 pm 07:57 PM
phpstepubuntuupgradebuildVersionenvironment

step: 0.apt-getupdate 1.apt-getinstallapache2 2.apt-getinstallphp5libapache2-mod-php5 (5.3) upgradetophp5.5 sudoapt-getupdatesudoapt-getinstallpython-software-properties sudoadd-apt-repositoryppa:ondrej/php5 (if upgrade to php5.4) sudoadd-

 step:

0. apt-get update
1. apt-get install apache2
2. apt-get install php5 libapache2-mod-php5

(5.3)

upgrade to php5.5

sudo apt-get update && sudo apt-get install python-software-properties

sudo add-apt-repository ppa:ondrej/php5

(if upgrade to php5.4) sudo add-apt-repository ppa:ondrej/php5-oldstable

sudo apt-get update && sudo apt-get dist-upgrade


3. apt-get install php5-mysql
4. apt-get install php5-gd
4. pdo:

4.1 apt-get install php-pear

4.2 pecl install pdo

4.3 pecl install pdo_mysql

*4.4 gedit /etc/php5/apache2/php.ini 

*4.5 extension = pdo.so

*4.6 extension = pdo_mysql.so


------------------------------  php升级时,可能会出错  -------------------------------------

Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.8.0-19-generic_3.8.0-19.30~precise1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools