debian php安装pdo扩展,docker安装PHP扩展2020-05-25
示例:
1、docker-php-ext-install pdo_mysql
2、extension=php_pdo_mysql.dll
一、docker按照PHP擴展
先刪除原來的composer容器,重新執行以下命令:
docker run -it --name composer -v E:\docker\nginx\www\YYXTServer:/app --privileged=true composer
二、docker按照php的gd擴展
#容器中
#軟件源修改為網易鏡像站源在安裝過程中會報錯,要更改為以下源:
#echo "deb http://mirrors.ustc.edu.cn/debian stable main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian stable main contrib non-free
deb http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free
" > /etc/apt/sources.list
apt update? #更新軟件源
apt install -y libwebp-dev libjpeg-dev libpng-dev libfreetype6-dev #安裝各種庫
docker-php-source extract #解壓源碼
cd /usr/src/php/ext/gd? #gd源碼文件夾
docker-php-ext-configure gd --with-webp-dir=/usr/include/webp --with-jpeg-dir=/usr/include --with-png-dir=/usr/include --with-freetype-dir=/usr/include/freetype2? #準備編譯
docker-php-ext-install gd? #編譯安裝
php -m | grep gd
總結
以上是生活随笔為你收集整理的debian php安装pdo扩展,docker安装PHP扩展2020-05-25的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: c语言考试常考试卷,c语言面试最必考的十
- 下一篇: 九年级计算机上册教学总结,九年级信息技术