Redis Server Setup Tutorial

Install and Config

  • sudo apt update
  • sudo apt install redis-server
  • sudo nano /etc/redis/redis.conf ↓

supervised no >> supervised systemd

  • save and exit
  • redis-server /etc/redis/redis.conf 

During the installation, can’t write redis-server.pid error may occur, but it’s OK. Just ignore it.

We can also install redis-server by the official tutorial:

https://redis.io/topics/quickstart >>

wget http://download.redis.io/redis-stable.tar.gz

tar xvzf redis-stable.tar.gz

cd redis-stable

make

  • sudo cp src/redis-server /usr/local/bin/ (or /usr/bin/ my default PATH environment is this one.)
  • sudo cp src/redis-cli /usr/local/bin/

ubuntu部分端口命令的使用—-开启端口/开启防火墙

环境系统: ubuntu

工具:xshell + virtualbox

1.测试远程主机的端口是否开启(windows命令行下执行)

1telnet 192.168.1.103 80

远程访问主机的80端口,测试主机的80端口是否开启

2.查看本地的端口开启情况(ubuntu下执行)


sudo ufw status

3.打开80端口(ubuntu下执行)


sudo ufw allow 80

4.防火墙开启(ubuntu下执行)


sudo ufw enable

5.防火墙重启(ubuntu下执行)


sudo ufw reload

转自:https://www.cnblogs.com/zqunor/p/6417938.html