linux:php
差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录前一修订版后一修订版 | 前一修订版 | ||
linux:php [2016/02/20 20:00] – Add reference memory | linux:php [2023/12/03 10:24] (当前版本) – 外部编辑 127.0.0.1 | ||
---|---|---|---|
行 1: | 行 1: | ||
====== PHP ====== | ====== PHP ====== | ||
- | [[wp> | + | [[wp> |
注意,我们使用的是Nginx + PHP-fpm的模式。 | 注意,我们使用的是Nginx + PHP-fpm的模式。 | ||
===== Install ===== | ===== Install ===== | ||
+ | |||
+ | ==== Debian jessie ==== | ||
+ | |||
+ | 添加[[https:// | ||
+ | |||
+ | <code - / | ||
+ | deb http:// | ||
+ | deb-src http:// | ||
+ | </ | ||
+ | |||
+ | 安装'' | ||
+ | |||
+ | < | ||
+ | sudo apt update | ||
+ | sudo apt install php7.0-fpm php7.0-xml | ||
+ | </ | ||
+ | |||
+ | ==== Ubuntu ==== | ||
+ | |||
+ | 以下是[[wp> | ||
首先添加'' | 首先添加'' | ||
行 24: | 行 44: | ||
< | < | ||
sudo apt-get update | sudo apt-get update | ||
- | sudo apt-get install php7.0-fpm | + | sudo apt-get install php7.0-fpm |
</ | </ | ||
- | PHP7.0开始不在内置MySQL binding,需要手动安装: | + | PHP7.0开始不再内置MySQL binding,需要手动安装: |
< | < | ||
行 39: | 行 59: | ||
</ | </ | ||
- | ===== Update Nginx configration | + | === Update Nginx configration === |
php-fpm的[[wp> | php-fpm的[[wp> | ||
行 56: | 行 76: | ||
< | < | ||
sudo service nginx reload | sudo service nginx reload | ||
+ | </ | ||
+ | |||
+ | ===== Configuration ===== | ||
+ | ==== 修改时区为东八区 ==== | ||
+ | |||
+ | 编辑 ''/ | ||
+ | |||
+ | < | ||
+ | date.timezone = Asia/ | ||
+ | </ | ||
+ | |||
+ | 重启reload配置生效: | ||
+ | |||
+ | < | ||
+ | sudo systemctl reload php7.0-fpm | ||
</ | </ | ||
行 61: | 行 96: | ||
升级PHP7.0后,能够明显感觉到[[: | 升级PHP7.0后,能够明显感觉到[[: | ||
- | |||
---- | ---- |
linux/php.1455969651.txt.gz · 最后更改: 2023/12/03 10:24 (外部编辑)