- 浏览: 2489891 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
PHP ENV and HTTP Extension
We keep having issues with http.so and iconv.so and others. So at first, we try to fix that in this way.
The Dockerfile is as following:
#Prepre the OS
FROM centos:7
MAINTAINER Carl Luo <cluo@jobs2careers.com>
ENV DEBIAN_FRONTEND noninteractive
ENV PERL_MM_USE_DEFAULT 1
ENV AWS_PHP_CACHE_DIR /tmp/awscache
RUN yum install -y gcc make
RUN yum install -y mysql-devel
RUN yum install -y openssh-clients
RUN yum install -y unzip
RUN mkdir /install/
WORKDIR /install/
#install wget
RUN yum install -y gnutls-devel
RUN curl -O http://ftp.gnu.org/gnu/wget/wget-1.18.tar.gz
RUN tar zxvf wget-1.18.tar.gz
WORKDIR /install/wget-1.18
RUN ./configure
RUN make && make install
WORKDIR /install/
#install php5.6
RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RUN rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
RUN rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
RUN yum install -y php56w
RUN yum install -y php56w-xml
RUN yum install -y php56w-mysqlnd
RUN yum install -y php56w-devel
RUN yum --enablerepo=remi,remi-php56 install -y php-pear
RUN yum install -y php56-php-raphf
#set up php
ADD conf/php.ini /etc/php.ini
ADD conf/20-iconv.ini /etc/php.d/20-iconv.ini
RUN echo "usr/\n" | pecl install pecl_http-2.6.0
The content of 20-iconv.ini is as follow:
; Enable iconv extension module
;extension=iconv.so
In php.ini, I have some configuration as follow:
extension=iconv.so
extension=raphf.so
extension=propro.so
extension=http.so
which I do not like, because the steps in 20-iconv.ini is ugly. And also my colleague who use PHP for years told me “php56w, Presumably the 'w' stands for 'webtatic', to differentiate these packages from the official CentOS ones."
So I am trying to do php56 instead of php56w. Finally we found a better way as follow.
Here is the Dockerfile:
#Prepre the OS
FROM centos:7
MAINTAINER Carl Luo <cluo@jobs2careers.com>
ENV DEBIAN_FRONTEND noninteractive
ENV PERL_MM_USE_DEFAULT 1
ENV AWS_PHP_CACHE_DIR /tmp/awscache
RUN yum install -y gcc make wget
RUN yum install -y mysql-devel
RUN mkdir /install/
WORKDIR /install/
#install php5.6
RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RUN rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
ADD conf/remi.repo /etc/yum.repos.d/remi.repo
RUN yum install -y php
RUN yum install -y php-xml
RUN yum install -y php-mysqlnd
RUN yum install -y php-common
RUN yum install -y php-devel
RUN yum install -y php-raphf
RUN yum install -y php-pecl-http
The remi.repo file is follow, the only changes are that I enabled remi and remi-php56
# Repository: http://rpms.remirepo.net/
# Blog: http://blog.remirepo.net/
# Forum: http://forum.remirepo.net/
[remi]
name=Remi's RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/remi/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/7/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-php55]
name=Remi's PHP 5.5 RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/php55/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/7/php55/mirror
# NOTICE: common dependencies are in "remi-safe"
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-php56]
name=Remi's PHP 5.6 RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/php56/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/7/php56/mirror
# NOTICE: common dependencies are in "remi-safe"
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-test]
name=Remi's test RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/test/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/7/test/mirror
# WARNING: If you enable this repository, you must also enable "remi"
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-debuginfo]
name=Remi's RPM repository for Enterprise Linux 7 - $basearch - debuginfo
baseurl=http://rpms.remirepo.net/enterprise/7/debug-remi/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-php55-debuginfo]
name=Remi's PHP 5.5 RPM repository for Enterprise Linux 7 - $basearch - debuginfo
baseurl=http://rpms.remirepo.net/enterprise/7/debug-php55/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-php56-debuginfo]
name=Remi's PHP 5.6 RPM repository for Enterprise Linux 7 - $basearch - debuginfo
baseurl=http://rpms.remirepo.net/enterprise/7/debug-php56/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-test-debuginfo]
name=Remi's test RPM repository for Enterprise Linux 7 - $basearch - debuginfo
baseurl=http://rpms.remirepo.net/enterprise/7/debug-test/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
That’s it. We do not need php.ini configuration or iconv.ini.
References:
https://www.digitalocean.com/community/questions/how-to-install-php-5-6-on-centos-7-0-x64
We keep having issues with http.so and iconv.so and others. So at first, we try to fix that in this way.
The Dockerfile is as following:
#Prepre the OS
FROM centos:7
MAINTAINER Carl Luo <cluo@jobs2careers.com>
ENV DEBIAN_FRONTEND noninteractive
ENV PERL_MM_USE_DEFAULT 1
ENV AWS_PHP_CACHE_DIR /tmp/awscache
RUN yum install -y gcc make
RUN yum install -y mysql-devel
RUN yum install -y openssh-clients
RUN yum install -y unzip
RUN mkdir /install/
WORKDIR /install/
#install wget
RUN yum install -y gnutls-devel
RUN curl -O http://ftp.gnu.org/gnu/wget/wget-1.18.tar.gz
RUN tar zxvf wget-1.18.tar.gz
WORKDIR /install/wget-1.18
RUN ./configure
RUN make && make install
WORKDIR /install/
#install php5.6
RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RUN rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
RUN rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
RUN yum install -y php56w
RUN yum install -y php56w-xml
RUN yum install -y php56w-mysqlnd
RUN yum install -y php56w-devel
RUN yum --enablerepo=remi,remi-php56 install -y php-pear
RUN yum install -y php56-php-raphf
#set up php
ADD conf/php.ini /etc/php.ini
ADD conf/20-iconv.ini /etc/php.d/20-iconv.ini
RUN echo "usr/\n" | pecl install pecl_http-2.6.0
The content of 20-iconv.ini is as follow:
; Enable iconv extension module
;extension=iconv.so
In php.ini, I have some configuration as follow:
extension=iconv.so
extension=raphf.so
extension=propro.so
extension=http.so
which I do not like, because the steps in 20-iconv.ini is ugly. And also my colleague who use PHP for years told me “php56w, Presumably the 'w' stands for 'webtatic', to differentiate these packages from the official CentOS ones."
So I am trying to do php56 instead of php56w. Finally we found a better way as follow.
Here is the Dockerfile:
#Prepre the OS
FROM centos:7
MAINTAINER Carl Luo <cluo@jobs2careers.com>
ENV DEBIAN_FRONTEND noninteractive
ENV PERL_MM_USE_DEFAULT 1
ENV AWS_PHP_CACHE_DIR /tmp/awscache
RUN yum install -y gcc make wget
RUN yum install -y mysql-devel
RUN mkdir /install/
WORKDIR /install/
#install php5.6
RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RUN rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
ADD conf/remi.repo /etc/yum.repos.d/remi.repo
RUN yum install -y php
RUN yum install -y php-xml
RUN yum install -y php-mysqlnd
RUN yum install -y php-common
RUN yum install -y php-devel
RUN yum install -y php-raphf
RUN yum install -y php-pecl-http
The remi.repo file is follow, the only changes are that I enabled remi and remi-php56
# Repository: http://rpms.remirepo.net/
# Blog: http://blog.remirepo.net/
# Forum: http://forum.remirepo.net/
[remi]
name=Remi's RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/remi/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/7/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-php55]
name=Remi's PHP 5.5 RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/php55/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/7/php55/mirror
# NOTICE: common dependencies are in "remi-safe"
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-php56]
name=Remi's PHP 5.6 RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/php56/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/7/php56/mirror
# NOTICE: common dependencies are in "remi-safe"
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-test]
name=Remi's test RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/test/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/7/test/mirror
# WARNING: If you enable this repository, you must also enable "remi"
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-debuginfo]
name=Remi's RPM repository for Enterprise Linux 7 - $basearch - debuginfo
baseurl=http://rpms.remirepo.net/enterprise/7/debug-remi/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-php55-debuginfo]
name=Remi's PHP 5.5 RPM repository for Enterprise Linux 7 - $basearch - debuginfo
baseurl=http://rpms.remirepo.net/enterprise/7/debug-php55/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-php56-debuginfo]
name=Remi's PHP 5.6 RPM repository for Enterprise Linux 7 - $basearch - debuginfo
baseurl=http://rpms.remirepo.net/enterprise/7/debug-php56/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-test-debuginfo]
name=Remi's test RPM repository for Enterprise Linux 7 - $basearch - debuginfo
baseurl=http://rpms.remirepo.net/enterprise/7/debug-test/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
That’s it. We do not need php.ini configuration or iconv.ini.
References:
https://www.digitalocean.com/community/questions/how-to-install-php-5-6-on-centos-7-0-x64
发表评论
-
Stop Update Here
2020-04-28 09:00 266I will stop update here, and mo ... -
NodeJS12 and Zlib
2020-04-01 07:44 433NodeJS12 and Zlib It works as ... -
Docker Swarm 2020(2)Docker Swarm and Portainer
2020-03-31 23:18 316Docker Swarm 2020(2)Docker Swar ... -
Docker Swarm 2020(1)Simply Install and Use Swarm
2020-03-31 07:58 325Docker Swarm 2020(1)Simply Inst ... -
Traefik 2020(1)Introduction and Installation
2020-03-29 13:52 297Traefik 2020(1)Introduction and ... -
Portainer 2020(4)Deploy Nginx and Others
2020-03-20 12:06 383Portainer 2020(4)Deploy Nginx a ... -
Private Registry 2020(1)No auth in registry Nginx AUTH for UI
2020-03-18 00:56 379Private Registry 2020(1)No auth ... -
Docker Compose 2020(1)Installation and Basic
2020-03-15 08:10 331Docker Compose 2020(1)Installat ... -
VPN Server 2020(2)Docker on CentOS in Ubuntu
2020-03-02 08:04 403VPN Server 2020(2)Docker on Cen ... -
Buffer in NodeJS 12 and NodeJS 8
2020-02-25 06:43 339Buffer in NodeJS 12 and NodeJS ... -
NodeJS ENV Similar to JENV and PyENV
2020-02-25 05:14 419NodeJS ENV Similar to JENV and ... -
Prometheus HA 2020(3)AlertManager Cluster
2020-02-24 01:47 365Prometheus HA 2020(3)AlertManag ... -
Serverless with NodeJS and TencentCloud 2020(5)CRON and Settings
2020-02-24 01:46 294Serverless with NodeJS and Tenc ... -
GraphQL 2019(3)Connect to MySQL
2020-02-24 01:48 214GraphQL 2019(3)Connect to MySQL ... -
GraphQL 2019(2)GraphQL and Deploy to Tencent Cloud
2020-02-24 01:48 395GraphQL 2019(2)GraphQL and Depl ... -
GraphQL 2019(1)Apollo Basic
2020-02-19 01:36 279GraphQL 2019(1)Apollo Basic Cl ... -
Serverless with NodeJS and TencentCloud 2020(4)Multiple Handlers and Running wit
2020-02-19 01:19 267Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(3)Build Tree and Traverse Tree
2020-02-19 01:19 267Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(2)Trigger SCF in SCF
2020-02-19 01:18 255Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(1)Running with Component
2020-02-19 01:17 240Serverless with NodeJS and Tenc ...
相关推荐
软件官网:https://www.phpenv.cn 为什么开发这款集成环境 2017年phpstudy被 php.cn 收购,软件用c++重写了,现在逐渐商业化,用户体验和2016版不能比,决定自己开发一款php集成环境,于是用C# WPF 开发了phpEnv。...
phpenv是简单优雅的php集成环境
curl -L http://git.io/phpenv-installer \ | bash 可选:在其他目录中安装(即系统范围) 如果您希望将phpenv安装在其他目录(即$HOME/myphpenv )中,或者在系统范围(即/usr/local/bin/phpenv )中安装,则很...
cadence快捷键设置env文件
php7.2 开发集成环境, PHPenv 最新5.6绿色版本! 开发集成环境!
ENV常用快捷键,覆盖X:\Cadence17.4\Cadence\SPB_Data\pcbenv中ENV文件即可, W/w拉线,A/a更改,S/s修线,D/d删除,C/c复制,T/t修改文本,R/r旋转器件,H/h高亮,等等有好几个,如果要修改,用文本打开自己修改...
allegro快捷键文件env
# modifier (although Control - C, V and X are reserved for copy, paste and cut) # and Navigation Keys (Home, Up arrow, Esc, etc.) These items may be modifed # by the following: # Modifier ...
PCB入门首选视频-小哥Cadence Allegro 2层板视频中的env快捷键文件。
phpenv:简单PHP版本管理
kmod 查看工作,比较好用,kmod mtk env
cross-env-7.0.3.zip
phpEnv(httpd+php)环境解压可直接用版本,包含httpd-2.4.23-win64-VC14,php-7.0.10-Win32-VC14-x64
javaEnv自动设置环境
Ansible角色:phpenv 使用和安装自定义版本PHP的角色。要求Ansible 1.8.4。依存关系 变数phpenv_env 设置安装类型, user或system 。 phpenv_env : systemphpenv_global 设置全局php版本,必须包含在要安装的版本中...
Env169-Ydjb.apk
AppEnv-Kotlin,exposed模型->appenv.zip
威盛 8650 ENV文件
RT-Thread的env工具无法下载软件包
linux操作系统 命令env详解 查看环境变量一步步详细步骤;