{"id":195,"date":"2023-12-22T16:22:23","date_gmt":"2023-12-22T08:22:23","guid":{"rendered":"https:\/\/my.oindalvi.eu.org\/?p=195"},"modified":"2023-12-22T16:23:09","modified_gmt":"2023-12-22T08:23:09","slug":"docker%e5%ae%b9%e5%99%a8php%e5%ae%89%e8%a3%85redis%e6%89%a9%e5%b1%95redis%e6%89%a9%e5%b1%95","status":"publish","type":"post","link":"https:\/\/my.di.cloudns.asia\/index.php\/2023\/12\/22\/195.html","title":{"rendered":"docker\u5bb9\u5668php\u5b89\u88c5redis\u6269\u5c55,redis\u6269\u5c55"},"content":{"rendered":"<pre><code>docker exec -it php bash #\u8fdb\u5165\u5bb9\u5668\nphp -m #\u67e5\u770b\u662f\u4e0d\u662f\u6709redis\u6269\u5c55<\/code><\/pre>\n<p>\u5b89\u88c5redis\u6269\u5c55<\/p>\n<p>1.pecl\u5b89\u88c5<\/p>\n<pre><code> pecl seach redis #\u68c0\u7d22redis\u6269\u5c55\n pecl install redis #\u5b89\u88c5\n docker-php-ext-enable redis.so #\u5b89\u88c5\u5b8c\u6210\u5c06redis.so \u6587\u4ef6\u52a0\u5165\u5230\u914d\u7f6e\u6587\u4ef6\n php -m  #\u67e5\u770bredis\u6269\u5c55\u5c31\u6709\u4e86<\/code><\/pre>\n<p>2.\u6e90\u7801\u5b89\u88c5<\/p>\n<p>1.redis\u6269\u5c55 \u4e0b\u8f7d\u5730\u5740 <a href=\"https:\/\/pecl.php.net\/package\/redis\">https:\/\/pecl.php.net\/package\/redis<\/a><br \/>\n2.\u89e3\u538bredis\u6269\u5c55\u5305 tar -zxvf redis-5.3.4.tgz<br \/>\n3.\u590d\u5236\u5b89\u88c5\u5305\u5230\u5bb9\u5668\u5185\u90e8 docker cp \/home\/redis-5.3.4 php:\/usr\/src\/php\/ext\/redis<br \/>\n4.\u8fdb\u5165\u5bb9\u5668docker exec -it php bash<br \/>\n5.\u67e5\u770b\u6269\u5c55\u662f\u5426\u590d\u5236\u8fdb\u5165\u5bb9\u5668 cd \/usr\/src\/php\/ext\/redis<br \/>\n6.\u5b89\u88c5 docker-php-ext-install redis<br \/>\n7.\u67e5\u770b php -m<\/p>\n","protected":false},"excerpt":{"rendered":"<p>docker exec -it php bash #\u8fdb\u5165\u5bb9\u5668 php -m #\u67e5\u770b\u662f\u4e0d\u662f\u6709redis\u6269\u5c55 \u5b89\u88c5 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-195","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/my.di.cloudns.asia\/index.php\/wp-json\/wp\/v2\/posts\/195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/my.di.cloudns.asia\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/my.di.cloudns.asia\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/my.di.cloudns.asia\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/my.di.cloudns.asia\/index.php\/wp-json\/wp\/v2\/comments?post=195"}],"version-history":[{"count":2,"href":"https:\/\/my.di.cloudns.asia\/index.php\/wp-json\/wp\/v2\/posts\/195\/revisions"}],"predecessor-version":[{"id":197,"href":"https:\/\/my.di.cloudns.asia\/index.php\/wp-json\/wp\/v2\/posts\/195\/revisions\/197"}],"wp:attachment":[{"href":"https:\/\/my.di.cloudns.asia\/index.php\/wp-json\/wp\/v2\/media?parent=195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/my.di.cloudns.asia\/index.php\/wp-json\/wp\/v2\/categories?post=195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/my.di.cloudns.asia\/index.php\/wp-json\/wp\/v2\/tags?post=195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}