ubuntu mint 15 编译安装PHP开发环境
2013-08-13 16:17
656 查看
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
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
相关文章推荐
- Ubuntu12下编译安装PHP5.3开发环境
- ubuntu mint 15 编译安装PHP开发环境
- Ubuntu 10.04 安装配置LAMP以及php开发环境 Eclipse PDT的安装
- Mac os编译安装php开发环境
- 【RedHat】手动编译安装部署Apache2.4、PHP7.1、MySql5.7开发环境
- Ubuntu 14.04 安装搭建Android开发编译环境
- Ubuntu16.04安装常用C++编译环境和开发环境qtcreator
- CentOS编译安装PHP开发环境
- CentOS编译安装PHP开发环境
- Ubuntu编译源码搭建PHP开发环境
- 在Mac OS上编译安装Nginx+PHP+MariaDB开发环境的教程
- Ubuntu环境编译安装Nginx+PHP7
- 详解二:CentOS下编译安装PHP开发环境,配置LAMP
- 阿里云学生服务器搭建网站(2)-Ubuntu16.04安装php开发环境
- Ubuntu 11.04 x64 常用软件及编译安装LAMP开发环境
- 【转载】Ubuntu下安装PHP开发环境Zend Studio 5.5.1
- ubuntu安装php开发环境lamp(转载)
- 在ubuntu下安装ACE编译环境 和 Eclipse 开发环境
- Linux ubuntu mint 系统安装和基本开发环境的搭建