linux install php5
来源:互联网 发布:如何在淘宝买东西便宜 编辑:程序博客网 时间:2024/05/01 22:06
装个软件都要这么麻烦,真他的2.
安装php5,要先要装httpd, apr, apr-utl, prce, libxml2,
1.apr
到http://apr.apache.org/下载最新的apr
到入到下载目录,解压并安装。命令如下:
tar xvf apr.xxx.tar.bz2
cd apr*
./configure --prefix=/usr/local/apr
make
make install
说明./configure --prefix=【安装路径】
2,apr-util
到http://apr.apache.org/download.cgi下载
按照1解压安装
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
3.pcre
下载http://www.pcre.org/
按照1解压安装
./configure --prefix=/usr/local/pcre
4.httpd
就是传说中的apache
下载: http://apr.apache.org/
按照1解压安装
./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --enable-so --enable-rewrite --enable-modules=all
5.libxml2 与 libxml2-dev
libxml2能找到源文件安装,但libxml2-dev实在找不到,就只好用ubuntu的deb文件安装了。
下载与安装,请看 http://blog.csdn.net/chruan/article/details/8719968
6.php5
下载: http://php.net/downloads.php
按照1解压安装
按照1解压安装按照1解压安装./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs
7.start php
vi /usr/local/apache2/conf/httpd.conf
找到 #ServerName XXXX 这一行, 去掉#号,修改成 ServerName 127.0.0.1:80
找到 #AddType text/html .shtml 这一行,在之前加如下二行:
AddType application/x-httpd-php .php .php3
AddType application/x-httpd-php-source .php3
好了,重新启动httpd:
/usr/local/apache2/bin/apachectl stop
/usr/local/apache2/bin/apachectl start
把你的php文件【如a.php】放在下面文件夹内,
/usr/local/apache2/htdocs
这个文件夹可以在httpd.conf中修改。
浏览 http://127.0.0.1:80/a.php
成功!!!!!
- linux install php5
- Linux php5 oci pdo install
- [LAMP] Linux+apache2+mysql5+php5+gd install +
- install php5
- php5 install fqa
- centos install php5.6
- Install PHP5 On IIS7&Vista64
- RHEL5 + Ngnix + PHP5 + Mysql Install
- Install apache2+php5 for Ubuntu
- centos 6.5 install php5.6.9
- centos install source php5.2.17
- Centos 6.5 在线Install php5.6
- Linux-install
- Install Linux
- Linux php5 curl 扩展
- PHP5.4 linux 编译
- linux搭建php5 nginx
- LINUX 安装 PHP5.6.13
- 使用inotify实现实时文件同步shell脚本
- STL之迭代器及traits编程
- error C2440: 'static_cast' : cannot convert from 'void (__thiscall CMainFrame::* )(void)' to 'LRESUL
- .Net启动外部程序 .
- ioctl与unlocked_ioctl区别
- linux install php5
- 我遇到的奇怪问题之一加载出错
- Effective C++(二)构造/析构/赋值运算
- 4-4 正整数类
- 在64位的windows server 2003运行IIS6运行32位的.NET程序 .
- Fedora 18安装google输入法和云拼音
- memcached完全剖析–1. memcached的基础
- Sql分组查询,如何把纵向显示的结果变成横向显示
- 非顶级窗体不能显示为模式对话框错误原因