Home Backend Development PHP Tutorial Tutorial on installing php5+pdo_PHP under ubuntu

Tutorial on installing php5+pdo_PHP under ubuntu

Jul 15, 2016 pm 01:22 PM
ubuntu superior Down install Install try develop Bundle system

In the past few days, I have tried to move my work machine to ubuntu for development. After the system is installed, the first task is to install the php+mysql development environment. I plan to install php5 and pdo_mysql directly. The following is a record of the installation process

First, I directly installed apache2, php5, pear and mysql5 using apt-get. In order to facilitate subsequent installation, I also added make and libmysqlclient

sudo apt-get install apache2-mpm-prefork

sudo apt-get install php5

sudo apt-get install php5-dev

sudo apt-get install php5-pear

sudo apt-get install mysql-server-5.0

sudo apt-get install make

sudo apt-get install libmysqlclient15-dev

It seems that pdo can’t find the installation source in ubuntu’s apt , so it is very simple to install this extension through pecl - if the submarine optical fiber can be connected:

pecl install pdo

Add a line:

extension=pdo.so

To the file:

/etc/php/apache2/php.ini

/etc/php/cli/php.ini

Next install pdo_mysql When encountering some problems, some errors will appear when running pecl install pecl_mysql directly. After searching, I found that it is a problem with pecl itself. Here is a relatively simple solution:

wget http://pecl.php.net/ get/PDO_MYSQL-1.0.2.tgz

tar xzvf PDO_MYSQL-1.0.2.tgz

cd PDO_MYSQL-1.0.2

Comment out configure to determine whether it is installed For the code snippet of pdo extension, continue to run:

phpize

./configure

make

make install

and then add the following again Go to the two php.ini mentioned earlier in one line

extension=pdo_mysql.so

After restarting apache, php5 + pdo_mysql is installed on ubuntu, and the documentroot is /var/www

Postscript

A simpler solution is to run:

PHP_PDO_SHARED=1 pecl install pdo_mysql


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/446976.htmlTechArticleIn the past few days, I have tried to move the working machine to ubuntu for development. After the system is installed, the first task is to install php +mysql development environment. I plan to install php5 and pdo_mysql directly. The following is the installation process...
Statement of this Website
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 Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Log in to Ubuntu as superuser Log in to Ubuntu as superuser Mar 20, 2024 am 10:55 AM

Log in to Ubuntu as superuser

CUDA's universal matrix multiplication: from entry to proficiency! CUDA's universal matrix multiplication: from entry to proficiency! Mar 25, 2024 pm 12:30 PM

CUDA's universal matrix multiplication: from entry to proficiency!

Huawei's Qiankun ADS3.0 intelligent driving system will be launched in August and will be launched on Xiangjie S9 for the first time Huawei's Qiankun ADS3.0 intelligent driving system will be launched in August and will be launched on Xiangjie S9 for the first time Jul 30, 2024 pm 02:17 PM

Huawei's Qiankun ADS3.0 intelligent driving system will be launched in August and will be launched on Xiangjie S9 for the first time

Four recommended AI-assisted programming tools Four recommended AI-assisted programming tools Apr 22, 2024 pm 05:34 PM

Four recommended AI-assisted programming tools

How to install Angular on Ubuntu 24.04 How to install Angular on Ubuntu 24.04 Mar 23, 2024 pm 12:20 PM

How to install Angular on Ubuntu 24.04

Which AI programmer is the best? Explore the potential of Devin, Tongyi Lingma and SWE-agent Which AI programmer is the best? Explore the potential of Devin, Tongyi Lingma and SWE-agent Apr 07, 2024 am 09:10 AM

Which AI programmer is the best? Explore the potential of Devin, Tongyi Lingma and SWE-agent

Android TV Box gets unofficial Ubuntu 24.04 upgrade Android TV Box gets unofficial Ubuntu 24.04 upgrade Sep 05, 2024 am 06:33 AM

Android TV Box gets unofficial Ubuntu 24.04 upgrade

How to take screenshots in Ubuntu How to take screenshots in Ubuntu Mar 21, 2024 am 11:30 AM

How to take screenshots in Ubuntu

See all articles