-
-
Save Paprikas/ef55f5b2401c4beec75f021590de6a67 to your computer and use it in GitHub Desktop.
Revisions
-
doejoe13 revised this gist
Apr 12, 2019 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ $ sudo cp -p /etc/redis/redis.conf /etc/redis/redis2.conf $ sudo nano /etc/redis/redis2.conf ```` ```` pidfile /var/run/redis2/redis-server2.pid logfile /var/log/redis/redis-server2.log dir /var/lib/redis2 port 6380 @@ -26,12 +26,14 @@ $ sudo cp /lib/systemd/system/redis-server.service /lib/systemd/system/redis-ser #### Edit the new service file ```` $ sudo nano /lib/systemd/system/redis-server2.service ```` ```` ExecStart=/usr/bin/redis-server /etc/redis/redis2.conf PIDFile=/var/run/redis/redis-server2.pid RuntimeDirectory=redis2 ReadWriteDireRuntimeDirectory=redis2 ReadWriteDirectories=-/var/run/redis2 Alias=redis2.service ```` -
inecmc created this gist
Aug 4, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,47 @@ #### Create the directory for the new instance ```` $ sudo install -o redis -g redis -d /var/lib/redis2 ```` #### Create a new configuration file ```` $ sudo cp -p /etc/redis/redis.conf /etc/redis/redis2.conf ```` #### Edit the new configuration file ```` $ sudo nano /etc/redis/redis2.conf ```` ```` pidfile /var/run/redis/redis-server2.pid logfile /var/log/redis/redis-server2.log dir /var/lib/redis2 port 6380 ```` #### Create new service file ```` $ sudo cp /lib/systemd/system/redis-server.service /lib/systemd/system/redis-server2.service ```` #### Edit the new service file ```` $ sudo vim /lib/systemd/system/redis-server2.service ```` ```` ExecStart=/usr/bin/redis-server /etc/redis/redis2.conf PIDFile=/var/run/redis/redis-server2.pid ReadWriteDirectories=-/var/lib/redis2 Alias=redis2.service ```` #### Enable and start the service ```` $ sudo systemctl enable redis-server2.service $ sudo systemctl start redis-server2.service ```` #### Check status ```` $ ps aux |grep redis ````