如何使用动态共享对象的模式来
PHP 通常被安装在 Linux/Unix 操作系统上,并且搭配 Apache 服务器一起使用。在将 PHP 与 Apache 服务器一起安装的时候,你有三种不同的安装方式可以选择:静态模块,动态共享对象(Dynamic Shared Object, DSO)以及 CG
I 程序执行文件。
在这里我建议大家使用动态共享对象的模式来安装 PHP,这是因为这种安装方式为日后的维护与升级提供了极大的便利。假设你一开始安装 PHP 的时候,只加入了PHP 的数据库相关模块。几天以后你决定再加装 PHP 的编码功能相关模块,这时候你只需要在你的系统命令列输入 make clean 指令,然后输入新的 PHP 设定选项,然后再输入 make 与 make install 指令,接下来系统就会产生一个新的 PHP 动态共享对象,并且安装到 Apache 服务器所指定的适当目录位置去了。接下来你要做的只是重新激活 Apache 服务器就行了,你就不需要把 Apache 服务器整个重新编译过。
下面几个基本步骤可以让你安装一套全新的 Apache 服务器,并且内含 PHP 动态加载模块:
1.到 http://www.apache.org/dist/下载最新版本的 Apache 服务器原始码。
2.将取得的档案复制到某个有意义的目录位置,例如 /usr/local/ 或者 /opt/ ,或者其它你觉得适当的目录位置。
3.将取得的档案解压缩,解开以后你会得到一些 *.tar 档案。
4.输入下面的指令将这些 *.tar 档案解开,并且将解开的档案放置到一个名叫 apache_[version] 的目录位置:
tar -xvf apache_[version].tar
5.输入 cd 指令将工作目录切换到 /usr/local/apache_[version](如果你在上一个步骤把 *.tar 档案解到其它不同目录,那么就切换到你所指定的目录去)
6. 输入下面的指令准备编译程序,记得将下面指令里面的 [path] 部分代换成你自己的目录名称,例如 /usr/local/apache[version] (不要加上最后面的斜线!)。这个步骤所做的工作是激活 mod_so,如此一来 Apache服务器才可以使用动态共享对象。
./configure --prefix=[path] --enable-module=so
7.等到系统回到命令提示符号,输入 make,然后继续等候系统回到命令提示符号。
8.输入 make install指令。
此时编译程序将会产生最后需要用到的目录与档案,完成以后会再度回到命令提示符号。
接下来可以开始安装 PHP 了:
1.到 PHP 官方网站:http://www.php.net/downloads.php 下载最新版本的 PHP 原始程序代码。

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

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The five basic components of the Linux system are: 1. Kernel, 2. System library, 3. System utilities, 4. Graphical user interface, 5. Applications. The kernel manages hardware resources, the system library provides precompiled functions, system utilities are used for system management, the GUI provides visual interaction, and applications use these components to implement functions.

Analysis of memory leak phenomenon of Java programs on different architecture CPUs. This article will discuss a case where a Java program exhibits different memory behaviors on ARM and x86 architecture CPUs...

Docker is important on Linux because Linux is its native platform that provides rich tools and community support. 1. Install Docker: Use sudoapt-getupdate and sudoapt-getinstalldocker-cedocker-ce-clicotainerd.io. 2. Create and manage containers: Use dockerrun commands, such as dockerrun-d--namemynginx-p80:80nginx. 3. Write Dockerfile: Optimize the image size and use multi-stage construction. 4. Optimization and debugging: Use dockerlogs and dockerex

IIS and PHP are compatible and are implemented through FastCGI. 1.IIS forwards the .php file request to the FastCGI module through the configuration file. 2. The FastCGI module starts the PHP process to process requests to improve performance and stability. 3. In actual applications, you need to pay attention to configuration details, error debugging and performance optimization.

Exploring the underlying principle of synchronized and the details of the lock upgrade process In Java, synchronized keyword is one of the tools used to implement thread synchronization, and its underlying...

CentOS is the first choice for server and enterprise environments for its superior security, stability and performance. 1) Security provides forced access control through SELinux to improve system security. 2) Stability is supported by the LTS version for up to 10 years to ensure the stability of the system. 3) Performance significantly improves system response speed and resource utilization by optimizing kernel and system configuration.

The troubleshooting idea of SSH connection failure after SpringBoot service has been running for a period of time has recently encountered a problem: a Spring...

The core components of Linux include kernel, file system, shell, user and kernel space, device drivers, and performance optimization and best practices. 1) The kernel is the core of the system, managing hardware, memory and processes. 2) The file system organizes data and supports multiple types such as ext4, Btrfs and XFS. 3) Shell is the command center for users to interact with the system and supports scripting. 4) Separate user space from kernel space to ensure system stability. 5) The device driver connects the hardware to the operating system. 6) Performance optimization includes tuning system configuration and following best practices.
