ubuntu mint 15 编译安装PHP开发环境

时间:2022-09-29 08:24:20

php 5.3.5(download zip)

httpd 2.2.24(download zip)

mysql: apt-get install mysql

step 1: install mysql

> apt-get install mysql

> mysql

mysql> show variables like '%sock%'; // copy the output path

step 2: install apache

//uncompress

//cd httpd_2.2.24

>./configure --prefix=/opt/httpd-2.2.24 --enable-so --enable-rewrite --enable-ssl --enable-cgi --enable-cgid --enable-modules=most --enable-mods-shared=most --with-zlib --with-pcre && make && make install

/opt/httpd-2.2.24 is target install path for apache.

step 3: install php

//uncompress

//cd php folder

>'./configure' '--prefix=/opt/php-5.3.25' '--with-apxs2=/opt/httpd-2.2.24/bin/apxs' '--with-curl' '--with-mcrypt' '--enable-mbstring' '--with-iconv' '--with-gd' '--with-jpeg-dir=/usr/local/lib' '--enable-pdo' '--with-pdo-mysql' '--with-mysqli' '--with-mysql'
'--with-xmlrpc' '--with-XMLrpc' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-openssl' '--with-imap-ssl' '--with-kerberos'

/opt/php-5.3.25 is target install path for php.

/opt/httpd-2.2.24/bin/apxs is path of apache.

/var/run/mysqld/mysqld.sock  is the output of mysql> show variables like '%sock%';

Important : this two prefix built the relation between php / mysql /apache.

step 4:

>whereis php

php: /usr/bin/php /usr/bin/X11/php /usr/share/php /opt/lampp/bin/php /opt/php-5.3.25/bin/php /usr/share/man/man1/php.1.gz

// need to copy /opt/php-5.3.25/bin/php to /usr/bin/php, use actual php to cover system's php

>sudo cp /usr/bin/php /usr/bin/php54 // backup system's php

>sudo ln -s /opt/php-5.3.25/bin/php /usr/bin/php -f // link actual php to system php position and force to change name

>php -v

PHP 5.3.25 (cli) (built: Aug 13 2013 16:49:07)

Copyright (c) 1997-2013 The PHP Group

Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies



// the php version will be changed



step 5:

> sudo cp ./php.ini-development /opt/php-5.3.25/lib/php.ini  //php.ini

step 6:

>sudo gedit /opt/httpd-2.2.24/conf/httpd.conf



AddType application/x-httpd-php .php // add this to the end of httpd.conf

Pear install package : need go to :

>cd /opt/php-5.3.25/bin

>pear list

>pear install xml_rpc

ubuntu mint 15 编译安装PHP开发环境的更多相关文章

  1. centos6.5编译安装lamp开发环境

    一.系统以及软件的准备 系统及编译安装包的下载地址:http://pan.baidu.com/s/1jIjqinc   密码:ghc2 说明:由于centos6.5是分卷压缩的,且压缩为三个压缩包,所 ...

  2. 编译安装PHP开发环境

    Linux 系统为 CentOS 7.2 1. 安装 Nginx 安装 Nginx 依赖包: # yum -y install zlib zlib-devel openssl openssl-deve ...

  3. Ubuntu 16.04 一键安装P4开发环境记录

    写在最前 P4开发环境安装可采用陈翔同学的一键安装脚本:p4Installer p4c-bm是P4-14的编译器,p4c是现在主流P4-16的编译器,bmv2是支持P4运行的软件交换机 系统环境 在安 ...

  4. ubuntu 15.10 安装swift开发环境 2016/4/17

    ubuntu 15.10 64位 下载地址 https://swift.org/download/#using-downloads 1.首先在ubuntu终端上 (ctl+alt+t打开) 下载cla ...

  5. Linux安装LAMP开发环境及配置文件管理

    Linux主要分为两大系发行版,分别是RedHat和Debian,lamp环境的安装和配置也会有所不同,所以分别以CentOS 7.1和Ubuntu 14.04做为主机(L) Linux下安装软件,最 ...

  6. 安装gstreamer开发环境

    ubuntu中安装gstreamer开发环境: * 安装gstreamer基本库,工具,以及插件 sudo apt--dev gstreamer-tools gstreamer0.-tools gst ...

  7. 在Ubuntu下搭建ASP.NET 5开发环境

    在Ubuntu下搭建ASP.NET 5开发环境 0x00 写在前面的废话 年底这段时间实在太忙了,各种事情都凑在这个时候,没时间去学习自己感兴趣的东西,所以博客也好就没写了.最近工作上有个小功能要做成 ...

  8. 转[开发环境配置]在Ubuntu下配置舒服的Python开发环境

    在Ubuntu下配置舒服的Python开发环境 Ubuntu 提供了一个良好的 Python 开发环境,但如果想使我们的开发效率最大化,还需要进行很多定制化的安装和配置.下面的是我们团队开发人员推荐的 ...

  9. Ubuntu 12.04下搭建Qt开发环境

    http://download.qt.io/official_releases/qt/ Ubuntu 环境下Gtk与Qt编译环境安装与配置(系统环境是Ubuntu 12.04) 1.配置基础开发环境G ...

随机推荐

  1. JVM内存回收机制简述

    JVM内存回收机制涉及的知识点太多了,了解越多越迷糊,汗一个,这里仅简单做个笔记,主要参考<深入理解Java虚拟机:JVM高级特性与最佳实践(第二版)> 目前java的jdk默认虚拟机为H ...

  2. oracle学习笔记1:windows下oracle数据库安装及&period;net调用oracle数据库

    1.下载32位或64位oracle数据库并且安装,安装时可以选择安装数据库实例或者不安装,如果不安装的话之后可以用Database Configuration Assistant(DBCA) 通过向导 ...

  3. 《C&plus;&plus; Primer Plus 6th》读书笔记 - 第十一章 使用类

    1. 运算符重载 2. 计算时间:一个运算符重载示例 3. 友元 1. 友元有三种: 友元函数 友元类 友元成员函数 4. 重载运算符:作为成员函数还是非成员函数 5. 再谈重载:一个矢量类 6. 类 ...

  4. python基础:列表生成式和生成器

    列表生成式(List Comprehension) 列表生成式即List Comprehensions,是Python内置的非常简单却强大的可以用来创建list的生成式. 举个例子,要生成 list ...

  5. html5中新增的属性和删除的属性

    一.表单新增的属性 1.对input(type="text").select.textarea与button元素指定autofocus属性,它以指定属性的方式让元素在画面打开时自动 ...

  6. Linux虚拟机下与主机通信

    1.更改虚拟机ip和主机ip同一网段 2.配置虚拟机的网络适配器 3.主机进行ping测试

  7. Oracle更改redo log的大小

    因为数据仓库ETL过程中,某个mapping的执行时间超过了一个小时, select event,count(*) fromv$session_wait group by event order by ...

  8. webpack中file-loader和url-loader的关系

    url-loader把资源文件转换为URL,file-loader也是一样的功能. 不同之处在于url-loader更加灵活,它可以把小文件转换为base64格式的URL,从而减少网络请求次数.url ...

  9. &equals;&equals; equals hashCode 总结比较

    在Java中: ==是运算符,用于比较两个变量是否相等. equals,是Objec类的方法,用于比较两个对象是否相等,默认Object类的equals方法是比较两个对象的地址,跟==的结果一样.Ob ...

  10. lua 按拉分析与合成

    -- 将数值分解成bytes_table local function decompose_byte(data) if not data then return data end local tb = ...