前提・実現したいこと
環境
・CentOS release 6.10 (Final)
・[vagrant@localhost ~]$ cd /usr/local/src/
・redis 5.0.0
redisをCentOSに導入しようと思い、このサイトを元にソースからダウンロードしました。
設定ファイルを作成するため、既にある設定ファイルを新たな設定ファイルにコピーして以下の設定を行いました。
daemonize yes pidfile /var/run/redis/redis.pid port 6379 bind 127.0.0.1 loglevel notice (debug/info/notice...) logfile "/var/log/redis/redis.log" dbfilename "dump_redis.rdb" dir "/var/run/redis" requirepass ****** maxclients 1024
そのあと設定ファイルを指定して起動・接続させるところまではできたのですが、パスワードを打ってみても”ERR Client sent AUTH, but no password is set”というエラーが出てパスワードが設定されていないような状態になってしまいます。(普通にシャットダウンなどの動作はできます)
また、自動起動スクリプトを作成しようと、ファイルを新しくコピーして”chkconfig: 345 70 15”を追加した上で起動させてみたのですがエラーが出て起動させることができませんでした。
実現したいこと
・パスワードなど変更した設定ファイルの設定を反映させる
・自動起動スクリプトから起動させる
発生している問題
#redisクライアントで起動ポートを引数にセットして接続 [vagrant@localhost redis-5.0.0]$ /usr/local/bin/redis-cli -p 6379 #起動はできるけどパスワードを打つとエラーが出てしまう 127.0.0.1:6379> auth ****** (error) ERR Client sent AUTH, but no password is set #他の動作は特に問題なく動く(多分) 127.0.0.1:6379> ping PONG 127.0.0.1:6379> shutdown not connected> exit [vagrant@localhost redis-5.0.0]$
#用意された自動スクリプトをコピー $ sudo cp -p ./redis-2.8.*/utils/redis_init_script /etc/init.d/redis #ヘッダの5行目にchkconfig: 345 70 15を追加 $ sudo vi /etc/init.d/redis # chkconfig: 345 70 15 #起動させてみるとエラーが出てしまう [vagrant@localhost redis-5.0.0]$ sudo /etc/init.d/redis start Starting Redis server... 11447:C 03 Nov 2018 11:21:43.339 # Fatal error, can't open config file '/etc/redis/6379.conf'
試したこと
実行権限か何かの問題かと思い、このサイトを見て
$ sudo chmod a+w /var/log/redis.log
を実行してみたものの特に変化はありませんでした…。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。