- 浏览: 2542908 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
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 310I will stop update here, and mo ... -
NodeJS12 and Zlib
2020-04-01 07:44 468NodeJS12 and Zlib It works as ... -
Docker Swarm 2020(2)Docker Swarm and Portainer
2020-03-31 23:18 362Docker Swarm 2020(2)Docker Swar ... -
Docker Swarm 2020(1)Simply Install and Use Swarm
2020-03-31 07:58 364Docker Swarm 2020(1)Simply Inst ... -
Traefik 2020(1)Introduction and Installation
2020-03-29 13:52 330Traefik 2020(1)Introduction and ... -
Portainer 2020(4)Deploy Nginx and Others
2020-03-20 12:06 424Portainer 2020(4)Deploy Nginx a ... -
Private Registry 2020(1)No auth in registry Nginx AUTH for UI
2020-03-18 00:56 428Private Registry 2020(1)No auth ... -
Docker Compose 2020(1)Installation and Basic
2020-03-15 08:10 367Docker Compose 2020(1)Installat ... -
VPN Server 2020(2)Docker on CentOS in Ubuntu
2020-03-02 08:04 445VPN Server 2020(2)Docker on Cen ... -
Buffer in NodeJS 12 and NodeJS 8
2020-02-25 06:43 377Buffer in NodeJS 12 and NodeJS ... -
NodeJS ENV Similar to JENV and PyENV
2020-02-25 05:14 468NodeJS ENV Similar to JENV and ... -
Prometheus HA 2020(3)AlertManager Cluster
2020-02-24 01:47 414Prometheus HA 2020(3)AlertManag ... -
Serverless with NodeJS and TencentCloud 2020(5)CRON and Settings
2020-02-24 01:46 332Serverless with NodeJS and Tenc ... -
GraphQL 2019(3)Connect to MySQL
2020-02-24 01:48 243GraphQL 2019(3)Connect to MySQL ... -
GraphQL 2019(2)GraphQL and Deploy to Tencent Cloud
2020-02-24 01:48 445GraphQL 2019(2)GraphQL and Depl ... -
GraphQL 2019(1)Apollo Basic
2020-02-19 01:36 321GraphQL 2019(1)Apollo Basic Cl ... -
Serverless with NodeJS and TencentCloud 2020(4)Multiple Handlers and Running wit
2020-02-19 01:19 307Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(3)Build Tree and Traverse Tree
2020-02-19 01:19 310Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(2)Trigger SCF in SCF
2020-02-19 01:18 286Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(1)Running with Component
2020-02-19 01:17 303Serverless with NodeJS and Tenc ...
相关推荐
软件官网:https://www.phpenv.cn 为什么开发这款集成环境 2017年phpstudy被 php.cn 收购,软件用c++重写了,现在逐渐商业化,用户体验和2016版不能比,决定自己开发一款php集成环境,于是用C# WPF 开发了phpEnv。...
**phpenv:简单PHP版本管理** phpenv是一个用于在单个系统上轻松切换和管理多个PHP版本的工具。它使得开发者能够在本地环境安装并切换不同的PHP版本,这对于测试代码兼容性、开发新特性或者保持与生产环境一致是...
【PHPenv】 PHPenv 是一个用于管理多个 PHP 版本的工具,它允许你在同一台计算机上方便地安装和切换不同的 PHP 实际版本。PHPenv 提供了一种灵活的方法来控制开发环境,使得开发者可以轻松地在 PHP 7.2 这样的特定...
phpenv是简单优雅的php集成环境
curl -L http://git.io/phpenv-installer \ | bash 可选:在其他目录中安装(即系统范围) 如果您希望将phpenv安装在其他目录(即$HOME/myphpenv )中,或者在系统范围(即/usr/local/bin/phpenv )中安装,则很...
`env`文件正是这样一个关键元素,它允许用户自定义CADENCE界面的快捷键,以提高设计流程的速度和效率。本文将深入探讨`env`文件的设置及其在CADENCE中的应用。 一、env文件介绍 `env`文件是CADENCE环境下的一种配置...
"env快捷键(中文说明).env"和"env快捷键.env"这两个文件都是用于存储快捷键设置的ENV文件。其中,“env快捷键(中文说明).env”可能包含中文注释,方便不熟悉英文的用户理解各个快捷键的功能。这些文件通常包含了...
phpenv安装程序 安装 + (和其他插件),并在需要时更新所有它们! 安装 这是标准方法:将phpenv安装在$ HOME / .phpenv中(默认$ PHPENV_ROOT值)。 curl -L ...
allegro快捷键文件env
《跨平台环境变量工具——cross-env详解》 在软件开发过程中,尤其是在JavaScript的世界里,由于其跨平台的特性,开发者经常需要处理不同操作系统之间的环境差异。`cross-env`是一个非常实用的npm模块,它允许你在...
**PHPenv:构建高效PHP开发环境的利器** PHPenv 是一个用于管理多个 PHP 版本的工具,它允许你在同一台计算机上安装和切换不同版本的 PHP,这对于开发者来说是极其方便的,尤其是那些需要测试代码在不同 PHP 版本下...
.env文件是一种常见的配置文件格式,它可以存储键值对形式的配置信息,并且具有良好的可读性和易用性。 有时候IDEA网络不好下载不了,我这里提供一个下载包,下载到电脑上,从IDEA直接就能导入。 插件版本:3.4.2 ...
RT-Thread 的 Env 工具无法下载软件包 RT-Thread 是一个开源的实时操作系统, Env 工具是 RT-Thread 的一个重要组件,负责管理软件包。然而,在使用 Env 工具时,有时可能会遇到无法下载软件包的问题。本文将详细...
cadence快捷键设置env文件
"cross-env"是一个在Node.js环境中管理环境变量的开源库,尤其在跨平台(Windows、Linux、MacOS)开发时非常有用。它允许开发者在不同的操作系统间设定和使用一致的环境变量,使得构建脚本无需考虑操作系统的差异。...
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高亮,等等有好几个,如果要修改,用文本打开自己修改...
描述中提到的"配置生产环境和线下环境自动配置",意味着这个压缩包可能包含至少两个`.env`文件:`dev.env.js`用于开发环境,`prod.env.js`用于生产环境。在Vue项目中,`dev.env.js`通常包含开发者在本地开发时使用的...
4. **使用**:在命令行中,你可以通过`php artisan env:sync`或者`php artisan env:sync-from`执行同步操作。如果配置正确,这个过程应该会无缝且安全地完成。 5. **团队协作**:在多人协作的项目中,每个开发者...
# 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 ...
kmod 查看工作,比较好用,kmod mtk env