1024programmer Linux How to install php-linux operation and maintenance under Linux

How to install php-linux operation and maintenance under Linux

How to install php under linux: 1. Download php source code; 2. Unzip the installation package; 3. Configure installation variables; 4. Compile source code; 5. Switch to the root user and execute the [make install] command to install php.

Environment:

linux system

php5.6

The specific steps are as follows:

(Recommended tutorial: linux video tutorial)

1. Download php source code

Download the php installation source package from php’s official website.

2. Decompress the installation package

The downloaded installation package is in the compressed gz format. In Linux, you can use the built-in tool tar to decompress it. Execute the command in the directory where the installation package is located:

tar -zxvf php-5.5.11.tar.gz

3. Configure installation variables

Open Decompressed directory – execute the command:

cd php-5.5.11

Configure the installation environment – execute the command:

(Graphical tutorial recommendation: 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 the source code

Execute the compilation command in the decompression directory:

make

5. Install php

Switch to the root user – execute the command:

sudo su root

Install- Execute command:

make install

Create soft link: Execute command:

ln -s /usr/local/servers/php/bin/php /usr/local/bin/php

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/how-to-install-php-linux-operation-and-maintenance-under-linux/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索