Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The operation method of installing php under linux

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Xiaobian to share with you how to install php under linux, I hope you read this article after the harvest, let us discuss it together!

Linux php installation method: 1, download php source code;2, extract the installation package;3, configure the installation variables;4, compile the source code;5, switch to root user, execute the [make install] command to install php.

Environment:

Linux system

php5.6

The specific steps are as follows:

1, Download php source code

Download php installation source package from php official website.

2. Unzip the installation package

The downloaded installation package is compressed in gz format. In linux, you can use tar to decompress it. In the directory where the installation package is located, execute the command:

tar -zxvf php-5.5.11.tar.gz

3. Configure installation variables

Open the extracted directory-execute the command:

cd php-5.5.11

Configure the installation environment-execute the command:

(Recommended: Linux tutorial)

./ configure --prefix=/usr/local/servers/php

"/usr/local/servers/php" is the installation path, you can change it to your favorite installation path.

4. Compile source code

Execute the compile command in the extract directory:

make

5. Install PHP

Switch to root-execute command:

sudo su root

Installation-Execute command:

make install

Create soft chain: Execute command:

ln -s /usr/local/servers/php/bin/php /usr/local/bin/php After reading this article, I believe you have a certain understanding of the operation method of installing php under linux. If you want to know more about it, welcome to pay attention to the industry information channel. Thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report