ubuntu 環境搭建 及 php 版本升級
阿新 • • 發佈:2019-02-18
step:
0. apt-get update
1. apt-get install apache2
2. apt-get install php5 libapache2-mod-php5
3. apt-get install php5-mysql
4. apt-get install php5-gd
4. pdo:
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)