Files
chill_notes/Lunix/阿里云/Ubuntu管理php.md
2026-04-16 00:28:41 +08:00

18 lines
592 B
Markdown
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
安装php7我这里装了好多我也不知道哪些是非必需的
[plain] view plain copy
apt-get install php7.0 php7.0-curl php7.0-gd php7.0-json php7.0-opcache php7.0-xml mcrypt php7.0-curl php7.0-cgi php7.0-xmlrpc php7.0-gd php-pear
重启apache2和mysql
[plain] view plain copy
systemctl restart apache2
systemctl restart mysql
测试php和apache2
[plain] view plain copy
vim /var/www/html/info.php
输入
[php] view plain copy
<?php
phpinfo();
?>
保存后访问你的域名或者公网ipyour_server_ip/info.php看看有没有对应的信息有就说明成功了。