ubuntu20.04安装php + mysql + redis +nginx

安装步骤见下面链接
https://blog.51cto.com/owenzhang24/5178257

使用mysql -uroot -p 无密码进入mysql报错解决办法:
sudo mysql -v 这个可以进入

使用websocket推送消息报错:
PHP Startup: Unable to load dynamic library ‘redis.so’ (tried: /usr/lib/php/20190902/redis.so (/usr/lib/php/20190902/redis.so: undefined symbol: php_json_decode_ex), /usr/lib/php/20190902/redis.so.so (/usr/lib/php/20190902/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

解决办法:
sudo apt install php-igbinary

把程序注册成系统服务
  1. 新建 /data/web/app.sh`
#!/usr/bin/env bash
# chmod 755 app.sh
# workdir=$(dirname $(readlink -f "$0"))
# echo $workdir
daemon_start

你可能感兴趣的:(ubuntu,nginx,ubuntu,redis)