(麒麟V10-x86)apt安装nginx和php
【摘要】 (麒麟V10-x86)apt安装nginx和php
#安装nginx
apt update
apt -y install nginx
nginx -V
/usr/lib/nginx
/usr/share/doc/nginx
/usr/share/nginx
/usr/sbin/nginx
/etc/ufw/applications.d/nginx
/etc/logrotate.d/nginx
/etc/init.d/nginx
/etc/default/nginx
/etc/nginx
/var/lib/nginx
/var/log/nginx
#安装php7.4
apt -y install php7.4
#必要扩展
apt -y install php7.4-dev php-pear
apt -y install php7.4-fpm php7.4-mysql php7.4-curl php7.4-json php7.4-mbstring php7.4-xml php7.4-intl
#可选扩展
apt -y install php7.4-gd php7.4-soap php7.4-gmp php7.4-odbc php7.4-pspell php7.4-bcmath php7.4-enchant php7.4-ldap php7.4-opcache php7.4-readline php7.4-sqlite3 php7.4-xmlrpc php7.4-bz2 php7.4-interbase php7.4-pgsql php7.4-recode php7.4-sybase php7.4-xslphp7.4-cgi php7.4-dbaphp7.4-phpdbg php7.4-snmpphp7.4-tidy php7.4-zip*
#nginx+php
vi /var/www/html/index.php
<?php
phpinfo();
?>
vim /etc/nginx/sites-available/default
#验证配置文件有没有错误、重启Nginx
nginx -t
/etc/init.d/nginx restart
【版权声明】本文为华为云社区用户原创内容,未经允许不得转载,如需转载请自行联系原作者进行授权。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)