WSL2&Ubuntu安装LNMP开发环境

KarlXu【原创】 2020-12-17 10:59:13

## WSL2&Ubuntu 安装 LNMP 开发环境 - 更新并升级 ``` sudo apt update sudo apt upgrade ``` - 安装 nginx ``` sudo apt install nginx ``` 验证 nginx 配置 `nginx -t` 报错: ``` nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied) 2020/12/16 16:47:58 [warn] 19050#19050: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1 nginx: the configuration file /etc/nginx/nginx.conf syntax is ok 2020/12/16 16:47:58 [emerg] 19050#19050: open() "/run/nginx.pid" failed (13: Permission denied) nginx: configuration file /etc/nginx/nginx.conf test failed ``` 原因是当前用户权限不足 `su root` 切换到 root 即可 `service nginx start` 启动服务

标签:
windows wsl2 ubuntu
原创
92 浏览

CentOS7下Redis的安装与配置及报错解决

KarlXu【原创】 2017-01-06 11:23:52

wget http://download.redis.io/releases/redis-3.2.100.tar.gz //下载 tar xzf redis-3.2.100.tar.gz //解压 cd redis-3.2.100 //切换到解压的文件 make //编译 make test cd src //切换到src目录 ./redis-server redis.conf //启动 启动服务时没有配置文件会警告

标签:
linux centos redis
原创
1316 浏览