search
Homephp教程php手册Fedora Linux+Apache+MySQL+PHP安装配置

欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入 1.下载新的MySql_server.rpm rpm -ivh Mysql_server_XXXX.rpm安装server平台 rpm -ivh Mysql_client_xxxx.rpm安装client包 如果你是更新安装的话,可能提示 confict,so replace rpm -ivh 为 rpm -Uv

欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入

        1.下载新的MySql_server.rpm

        rpm -ivh Mysql_server_XXXX.rpm安装server平台

        rpm -ivh Mysql_client_xxxx.rpm安装client包

        如果你是更新安装的话,可能提示 confict,so replace rpm -ivh 为 rpm
    -Uvh

        2.安装 apache

        tar -zxvf httpd-2.2.6.tar.gz

        cd httpd-2.2.6

        。/configure――prefix=/usr/local/apache――enable-module=so

        make

        make install

        3.安装 php-5.2.4

        tar -zxvf php-5.2.4.tar.gz

        cd php-5.2.4

        。/configure――prefix=/usr/local/php ――with-apxs2=/usr/local/apache2/bin/apxs
    ――with-config-file-path=/usr/local/lib――with-mysql

        make

        make install

        cp php.ini-dist /usr/local/lib/php.ini

        4.配置

        vi /usr/local/apache/conf/httpd.conf对apache做如下配置

        #ServerAdmin一行改为您的邮箱地址

        #DocumentRoot "/home/httpd/html/" 此处为html文件主目录

        #Options FollowSymLinks MultiViews为安全起见,去掉"Indexes"

        # DirectoryIndex default.php default.phtml default.php3 default.html
    default.htm

        #

        # 设置apache的默认文件名次序

        #AddType application/x-httpd-php .php .phtml .php3 .inc

        #AddType application/x-httpd-php-source .phps

        # 设置php 文件后缀

        存盘退出

        vi /usr/local/lib/php.ini

        #register-golbals = On

        存盘退出

        5.启动apache

        /usr/local/apache2/bin/apachectl start

        如果提示一下错误:

        Can not load /usr/local/apache2/modules/libphp5.so into server:

        /usr/local/apache2/modules/libphp5.so :

        Can't restore segment prot after reloc: Permission denied

        Linux

        因为无法加载php 模块,在调试PHP 程序是提示下载php ,或者显示php 源
    代码,解决方法:

        修改 httpd.conf

        LoadModule php5_module modules/libphp5.so

        AddType application/x-httpd-php .php

        执行:chcon /usr/local/apache2/modules/libphp5.so -t shlib_t

        注销系统重新进入

        /usr/local/apache2/bin/apachectl start

Fedora Linux+Apache+MySQL+PHP安装配置

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft