Tag Archives

2 Articles
Sesi PHP dengan Redis pada PHP 7.2

Sesi PHP dengan Redis pada PHP 7.2

 “Well, hell! PMP exam topics That’s no excuse for insulting me! You PMP exam topics 300-320 questions pdf are 300-320 questions pdf Ma’s PMP exam topics PMP exam topics own blood son, but did PMP exam topics she take on that time PMP exam topics Tony Fontaine shot you in the leg? 70-532 answer analysis No, she 70-532 answer analysis just 300-320 questions pdf sent for old Doc 70-532 answer analysis Fontaine to dress it and asked the doctor what ailed Tony’s aim. Said she guessed licker was spoiling his marksmanship. Remember how mad that made Tony?”Both boys yelled 70-532 answer analysis with laughter.“Ma’s a card!” said Brent with loving approval. “You can always count on her to do the right thing 300-320 questions pdf and 70-532 answer analysis not embarrass you in front of PMP exam topics folks.”  But Gerald remained Gerald. 300-320 questions pdf His habits PMP exam topics of living and his ideas changed, but his manners he would 300-075 certification exam not change, 300-075 certification exam even had he been 70-532 answer analysis able to change them. He admired 300-320 questions pdf the drawling 300-075 certification exam elegance of the 300-075 certification exam wealthy rice and cotton planters, who rode into Savannah from their moss-hung kingdoms, mounted 70-532 answer analysis on 300-320 questions pdf thoroughbred horses and followed by the carriages of their 300-320 questions pdf equally elegant ladies 70-532 answer analysis and the wagons 300-320 questions pdf of their slaves. But Gerald could never attain elegance. 70-532 answer analysis Their lazy, blurred voices fell pleasantly 300-075 certification exam 300-075 certification exam 300-320 questions pdf on PMP exam topics his PMP exam topics ears, but his 300-075 certification exam PMP exam topics own 300-075 certification exam brisk brogue clung to his tongue. He liked the casual 70-532 answer analysis 300-075 certification exam grace with which they PMP exam topics conducted affairs 300-320 questions pdf of importance, 300-320 questions pdf risking 300-320 questions pdf a fortune, a plantation or a slave 70-532 answer analysis 300-075 certification exam on the 300-075 certification exam turn 70-532 answer analysis of a card and writing off their losses with careless good humor and no more ado than when they scattered 300-320 questions pdf pennies to pickaninnies. But Gerald had known poverty, and PMP exam topics he could never PMP exam topics learn to lose money with 70-532 answer analysis good 300-075 certification exam humor or good 300-320 questions pdf 70-532 answer analysis 300-320 questions pdf grace. They were PMP exam topics a pleasant race, these coastal Georgians, with their soft-voiced, 70-532 answer analysis PMP exam topics quick rages and their charming inconsistencies, and Gerald liked them. But 300-075 certification exam there was a 300-075 certification exam brisk and 70-532 answer analysis restless vitality 300-075 certification exam about the young Irishman, fresh from a country where winds blew wet and chill, where misty swamps held no fevers, that 300-075 certification exam set him apart from these indolent gentle-folk of semi-tropical weather and malarial marshes.

Saya menggunakan pwgen untuk membuat sandi:

sudo apt install pwgen

Pemasangan

Pasang modul PHP Redis dan peladen Redis.

sudo apt install php-redis redis-server

Karena Anda sering bandel dan main salin saja, maka saya tunjukkan pembuatan sandi yang benar:

export REDIS_PASSWORD=`pwgen 32 1`

Saya asumsikan ada sebuah variabel $REDIS_PASSWORD yang berisi sandi yang benar. Untuk contoh saya, saya gunakan perkakas pwgen untuk menghasilkan sandi 32 karakter. Silakan gunakan sandi sendiri.

Selanjutnya, tambahkan sandi pada Redis:

echo requirepass $REDIS_PASSWORD  | sudo tee -a /etc/redis/redis.conf

dan PHP 7.2:

$ sudo tee /etc/php/7.2/fpm/conf.d/99-redis-session.ini << EOF
session.save_handler = redis
session.save_path = "tcp://127.0.0.1:6379?auth=$REDIS_PASSWORD"
EOF

Untuk penambahan konfigurasi sebaiknya jangan di berkas php.ini. Gunakan berkas terpisah supaya ketika terjadi pembaharuan Debian tidak menimpa konfigurasi yang sudah dimodifikasi.

Muat ulang Redis dan PHP-FPM:

sudo /etc/init.d/redis-server restart
sudo /etc/init.d/php7-fpm stop && sudo /etc/init.d/php7-fpm start

Selesai.

TIPS #1

Untuk menguji apakah Redis berjalan dengan baik, jalankan:

$ redis-cli  -a $REDIS_PASSWORD  keys '*'
1) "PHPREDIS_SESSION:v61gelc0g2vgv6etgst6q3ipm6"
2) "PHPREDIS_SESSION:a286kiqjskupugblas2g6r85lv"
3) "PHPREDIS_SESSION:di8au2o81r8t299br1fpnedmb3"
4) "PHPREDIS_SESSION:bnfsp1587div8pgvdj3qbfq6fu"
5) "PHPREDIS_SESSION:g43f0qiivi182dmriq1g6qa1ak"
6) "PHPREDIS_SESSION:134bts56qhmvm3v5mpvr9ne3nh"
7) "PHPREDIS_SESSION:da38q9a555m2q55m0b5rtocpne"

 

Bacaan Lebih Lanjut