1、查看之前是否安装php $rpm -qa | grep php 2、如果安装过,先删除, $rpm -e php --nodeps 3、解压 $tar -zxvf php-5.2.5.tar.gz $cd php-5.2.5之后 对php源码包进行编译: $./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache /bin/ap
1、查看之前是否安装php
$rpm -qa | grep php
2、如果安装过,先删除,
$rpm -e php --nodeps
3、解压
$tar -zxvf php-5.2.5.tar.gz
$cd php-5.2.5之后
对php源码包进行编译:
$./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache
/bin/apxs --with-mysql=/usr/local/mysql
$make生成可以执行的文件
$make install安装
Tips:php如果安装成功,会在apache/modules下生成libphp5.so
打开apache配置文件,(/usr/local/apache/conf/http.conf)在最后加入一行
AddType application/x-httpd-php .php
重启apache
$/usr/local/apache/bin/apachectl restart
创建php文件,(/usr/local/apache/htdocs)名叫test.php输入以下内容
echo phpinfo();
?>
打开浏览器测试:输入:http://localhost/test.php
最后,php-5.2.5目录中的php.ini-dist
cp php.ini-dist /usr/local/php/lib/php.ini

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Dreamweaver CS6
Visual web development tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

SublimeText3 Chinese version
Chinese version, very easy to use
