diff options
-rw-r--r-- | brain.documentation/QUICKSTART.rst | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/brain.documentation/QUICKSTART.rst b/brain.documentation/QUICKSTART.rst index eb75c61..33a4a36 100644 --- a/brain.documentation/QUICKSTART.rst +++ b/brain.documentation/QUICKSTART.rst @@ -1167,6 +1167,28 @@ Python3 is required too. - Salmon 0.7.2 for mapping RNA-seq data. + - Redis + + Redis is used in publish_mapped_data.py (server side) and get_mapped_data.py (client side) for sending mapped RNA-seq data. + + How to install Python's redis module? sudo pip3.8 install redis (or you can just omit 3.8). + + How to install redis server? sudo apt install python3-redis -y + Check redis server's status: "sudo systemctl status redis" + Configure redis as a remote server. + Edit /etc/redis/redis.conf, comment out the line "127.0.0.1 ::1", use a really strong password for "requirepass" line. + Open port 6379 for incoming request from a certain ip address: sudo ufw allow from 6*.1*.1*.3* to any port 6379 + Test redis using "redis-cli -h redis-server-ip-address", then type "auth the-really-strong-password", then type "ping", should see "pong". + How to save redis password in the environment variables? Edit .bashrc file, add the following two lines: + export REDIS_PASSWORD="the-really-strong-password" + export REDIS_HOST="redis-server-ip-address" # do not need this line for the redis server side + Then type the command "source ~/.bashrc" to let the changes take effect. + The Python script needs REDIS_PASSWORD and is scheduled by crontab, then specify REDIS_PASSWORD on the top line in crontab. + + Troubleshooting + get_mapped_data.py always shows "Timeout connecting to server". This is probably due to the change happened to the client's IP address. Check the client's IP address, and make sure that IP address is allowed in the Redis server's firewall (Use command ``sudo ufw status`` to check). + + Important files and directories ------------------------------- |