user@server:~$ ssh -v root@10.6.8.56
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 10.6.8.56 [10.6.8.56] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/fd/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/fd/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/fd/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/fd/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/fd/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/fd/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/fd/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/fd/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
// 后审阅message日志,发现是系统内存不够了,重启就好了
ubuntu@server:~$ python3 ./run_flask_api.py
* Serving Flask app "run_flask_api" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://0.0.0.0:18039/ (Press CTRL+C to quit)
root@server:~# mkdir -p /root/src
root@server:~# cd /root/src
root@server:~# wget http://download.redis.io/redis-stable.tar.gz
root@server:~# tar xvzf redis-stable.tar.gz
root@server:~# cd redis-stable
root@server:~# make
root@server:~# make install
root@server:~# which redis-cli
/usr/local/bin/redis-cli
root@server:~#
root@server:~# which redis-server
/usr/local/bin/redis-server
root@server:~# cp ./redis.conf /etc/redis.conf
修改/etc/redis.conf配置文件
配置Redis的监听和一个可靠的随机密码
bind 127.0.0.1
requirepass B230dddeAE678eDb
服务器内存资源不充足的情况下,建议设置
# The above configuration tells Redis to remove any key using the LRU algorithm when the max memory of 256mb is reached.
maxmemory 256mb
maxmemory-policy allkeys-lru
root@server:~# /usr/local/bin/redis-cli -a B230dddeAE678eDb ping
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
PONG
root@server:~#