How to start redis-server on a different port than the default port 6379 in ubuntu

前端 未结 5 1384
时光取名叫无心
时光取名叫无心 2021-01-03 21:04

How to start redis-server on a different port than the default port 6379 in Ubuntu? I have used the following steps to install the redis:

         


        
5条回答
  •  温柔的废话
    2021-01-03 21:24

    To create a development server on your local machine you can simply use

    redis-server --port 6380
    

    Another options:

    #redis-server --help
    
    Usage: ./redis-server [/path/to/redis.conf] [options]
           ./redis-server - (read config from stdin)
           ./redis-server -v or --version
           ./redis-server -h or --help
           ./redis-server --test-memory 
    
    Examples:
           ./redis-server (run the server with default conf)
           ./redis-server /etc/redis/6379.conf
           ./redis-server --port 7777
           ./redis-server --port 7777 --replicaof 127.0.0.1 8888
           ./redis-server /etc/myredis.conf --loglevel verbose
    

提交回复
热议问题