Home Backend Development PHP Tutorial How to use the dynamic shared object pattern to_PHP tutorial

How to use the dynamic shared object pattern to_PHP tutorial

Jul 13, 2016 pm 05:08 PM
linux php unix superior use shared dynamic how install object match operating system model of Pass

PHP is usually installed on Linux/Unix operating systems and used with the Apache server. When installing PHP with the Apache server, you have three different installation methods to choose from: static modules, dynamic shared objects (Dynamic Shared Object, DSO) and CG
I program executable files.

Here I recommend that you use the dynamic shared object mode to install PHP, because this installation method provides great convenience for future maintenance and upgrades. Suppose that when you first installed PHP, you only added PHP's database-related modules. A few days later, you decide to install PHP coding function-related modules. At this time, you only need to enter the make clean command in your system command line, then enter the new PHP setting options, and then enter the make and make install commands, and then After that, the system will generate a new PHP dynamic shared object and install it to the appropriate directory location specified by the Apache server. All you need to do next is to reactivate the Apache server. You don't need to recompile the entire Apache server.

The following basic steps can allow you to install a new Apache server, including PHP dynamic loading module:
1. Go to http://www.apache.org/dist/ to download the latest version of the Apache server source code.

2. Copy the obtained file to a meaningful directory location, such as /usr/local/ or /opt/, or other directory location you feel is appropriate.

3. Unzip the obtained file. After unzipping, you will get some *.tar files.

4. Enter the following command to unpack these *.tar files, and place the unpacked files into a directory location named apache_[version]:
tar -xvf apache_[version] .tar
5. Enter the cd command to switch the working directory to /usr/local/apache_[version] (if you extracted the *.tar file to a different directory in the previous step, then switch to the one you specified directory)
6. Enter the following command to prepare the compiler. Remember to replace the [path] part in the following command with your own directory name, such as /usr/local/apache[version] (do not add the last The slash on the surface! ). What this step does is activate mod_so so that the Apache server can use dynamic shared objects.

./configure --prefix=[path] --enable-module=so
7. Wait until the system returns to the command prompt, enter make, and then continue to wait for the system to return to the command prompt.

8. Enter the make install command.

At this time, the compilation program will generate the directories and files needed for the final use. After completion, you will return to the command prompt again.

Now you can start installing PHP:
1. Go to the PHP official website: http://www.php.net/downloads.php to download the latest version of the PHP original program code.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/629888.htmlTechArticlePHP is usually installed on Linux/Unix operating systems and used with the Apache server. When installing PHP with an Apache server, you have three different installation methods...
Statement of this Website
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

Video Face Swap

Video Face Swap

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

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Linux Architecture: Unveiling the 5 Basic Components Linux Architecture: Unveiling the 5 Basic Components Apr 20, 2025 am 12:04 AM

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.

Docker on Linux: Containerization for Linux Systems Docker on Linux: Containerization for Linux Systems Apr 22, 2025 am 12:03 AM

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

What is the difference between memory leaks in Java programs on ARM and x86 architecture CPUs? What is the difference between memory leaks in Java programs on ARM and x86 architecture CPUs? Apr 19, 2025 pm 11:18 PM

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...

The Compatibility of IIS and PHP: A Deep Dive The Compatibility of IIS and PHP: A Deep Dive Apr 22, 2025 am 12:01 AM

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.

What are the underlying principles and lock upgrade process of synchronized in Java? What are the underlying principles and lock upgrade process of synchronized in Java? Apr 19, 2025 pm 09:48 PM

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...

After the Spring Boot service is running for a period of time, how to troubleshoot? After the Spring Boot service is running for a period of time, how to troubleshoot? Apr 19, 2025 pm 07:45 PM

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...

CentOS: Security, Stability, and Performance CentOS: Security, Stability, and Performance Apr 21, 2025 am 12:11 AM

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.

Linux: A Deep Dive into Its Fundamental Parts Linux: A Deep Dive into Its Fundamental Parts Apr 21, 2025 am 12:03 AM

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.

See all articles