请选择 进入手机版 | 继续访问电脑版

 找回密码
 立即注册
搜索
查看: 157|回复: 0

Ubuntu 安装 PHP

[复制链接]

263

主题

0

回帖

1028

积分

管理员

积分
1028
发表于 2024-1-31 20:53:15 | 显示全部楼层 |阅读模式

安装:

sudo apt-get install php
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  php-common php7.0 php7.0-cli php7.0-common php7.0-fpm php7.0-json php7.0-opcache php7.0-readline
Suggested packages:
  php-pear
The following NEW packages will be installed:
  php php-common php7.0 php7.0-cli php7.0-common php7.0-fpm php7.0-json php7.0-opcache php7.0-readline
0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,532 kB of archives.
After this operation, 14.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

除了自动安装的 php7.0-cli php7.0-common php7.0-fpm 等,再安装一些模块:

sudo apt-get install php7.0-mysql php7.0-curl php7.0-mcrypt php7.0-mbstring php7.0-xml

测试:

php -v
PHP 7.0.32-0ubuntu0.16.04.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.32-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies

php7.0-fpm 服务控制:

sudo service php7.0-fpm stop
sudo service php7.0-fpm start
sudo service php7.0-fpm restart
sudo service php7.0-fpm status

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|深圳市棱讯科技有限公司 ( 粤ICP备2024228160号-2 )|网站地图

GMT+8, 2024-5-18 09:04 , Processed in 0.020404 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表