نصب #redis در #ubuntu 20.04
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-20-04
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-20-04
Digitalocean
How To Install and Secure Redis on Ubuntu | DigitalOcean
Redis is an in-memory key-value store known for its flexibility, performance, and wide language support. This tutorial demonstrates how to install and config…
راه اندازی #redis در #php
https://github.com/phpredis/phpredis/blob/develop/INSTALL.markdown
بعد به فایل php.ini رفته و این خط رو در اکستنشن ها اضافه می کنید
https://github.com/phpredis/phpredis/blob/develop/INSTALL.markdown
بعد به فایل php.ini رفته و این خط رو در اکستنشن ها اضافه می کنید
extension=redis.so
راه اندازی #redis در #lumen
https://stackoverflow.com/questions/59432814/class-redis-not-found-in-lumen
https://stackoverflow.com/questions/59432814/class-redis-not-found-in-lumen
Stack Overflow
Class 'Redis' not found in Lumen
Lumen Version: 6.0
PHP Version: 7.2
Database Driver & Version: MySql 5.7, Redis
Code
use Illuminate\Support\Facades\Redis;
Redis::set($key, $data, 'EX', $expiry);
in app.php
$app->withF...
PHP Version: 7.2
Database Driver & Version: MySql 5.7, Redis
Code
use Illuminate\Support\Facades\Redis;
Redis::set($key, $data, 'EX', $expiry);
in app.php
$app->withF...
#redis
آموزش کامل ردیس
https://t.me/c/1500601733/2
https://t.me/c/1500601733/3
https://t.me/c/1500601733/4
راه اندازی Redis در lumen
https://t.me/c/1500601733/5
استفاده از redis در پروژههای composer
https://t.me/c/1500601733/12
آموزش کامل ردیس
https://t.me/c/1500601733/2
https://t.me/c/1500601733/3
https://t.me/c/1500601733/4
راه اندازی Redis در lumen
https://t.me/c/1500601733/5
استفاده از redis در پروژههای composer
https://t.me/c/1500601733/12
فعال سازی #soap در #php
قبل از هر اقدامی باید soap را نصب کنید:
قبل از هر اقدامی باید soap را نصب کنید:
sudo apt install php-soaphttps://stackoverflow.com/questions/11391442/fatal-error-class-soapclient-not-found
Stack Overflow
Fatal error: Class 'SoapClient' not found
I'm trying a simple web service example and I get this error even though I uncommented extension=php_soap.dll in the php.ini file:
Fatal error: Class 'SoapClient' not found in C:\Program Files (x...
Fatal error: Class 'SoapClient' not found in C:\Program Files (x...
چرک نویس برنامه نویس pinned «لیست #هشتگ ها #php #laravel #redis آموزش کامل ردیس #lumen آموزش راه اندازی یک http proxy #proxy»
#redis
نصب و استفاده از Redis در پروژه compser
https://github.com/predis/predis
با دستور زیر می تونید توی کامپوزر ردیس رو برای خودتون نصب کنید:
نصب و استفاده از Redis در پروژه compser
https://github.com/predis/predis
با دستور زیر می تونید توی کامپوزر ردیس رو برای خودتون نصب کنید:
composer require predis/predisدر هر کدی که میخواهید استفاده کنید کافیه از دستورهای زیر استفاده کنید:
use Predis\Client as Redis;
// Parameters passed using a named array:
$client = new Redis([
'scheme' => 'tcp',
'host' => '10.0.0.1',
'port' => 6379,
]);
//or
// Same set of parameters, passed using an URI string:
$client = new Predis\Client('tcp://10.0.0.1:6379');
$client = new Redis();
$client->set('foo', 'bar');
$cilent->expire('foo',1);
$value = $client->get('foo');GitHub
GitHub - predis/predis: A flexible and feature-complete Redis/Valkey client for PHP.
A flexible and feature-complete Redis/Valkey client for PHP. - predis/predis
https://www.cyberciti.biz/faq/debian-10-set-up-openvpn-server-in-5-minutes/
کافیگ #OVPN اوپن وی پی ان openvpn پراکسی روی سرور دبیان
کافیگ #OVPN اوپن وی پی ان openvpn پراکسی روی سرور دبیان
nixCraft
Debian 10 Set Up OpenVPN Server In 5 Minutes
A step-by-step guide that explains how to set up OpenVPN server on Debian Linux 10 using simple but secure bash shell script
روش وصل شدن از یک سرور به سرور دیگر با پروکسی
#proxy
شما میتوانید در دبیان با استفاده از squid به راحتی یک http proxy راه اندازی کنید و با یوزر و پسورد خودتون توش لاگین کنید
برای این منظور لینک زیر رو دنبال کنید
https://linuxize.com/post/how-to-install-and-configure-squid-proxy-on-debian-10/
حالا برای این که بتونید از تو سرور خودتون به http سرور بیرونی وصل بشید از این کامنت استفاده کنید:
https://www.cyberciti.biz/faq/linux-unix-set-proxy-environment-variable/?__cf_chl_captcha_tk__=pmd_n0n6E_BSuEJPdnGKyrVQeRvrpQGy.iLQGyR84gZRlLo-1629895189-0-gqNtZGzNAyWjcnBszQhl
export http_proxy=http://USERNAME:PASSWORD@proxy-server-ip:PORT/
what is my IP:
https://www.tecmint.com/find-linux-server-public-ip-address/
curl ifconfig.me
#proxy
شما میتوانید در دبیان با استفاده از squid به راحتی یک http proxy راه اندازی کنید و با یوزر و پسورد خودتون توش لاگین کنید
برای این منظور لینک زیر رو دنبال کنید
https://linuxize.com/post/how-to-install-and-configure-squid-proxy-on-debian-10/
حالا برای این که بتونید از تو سرور خودتون به http سرور بیرونی وصل بشید از این کامنت استفاده کنید:
https://www.cyberciti.biz/faq/linux-unix-set-proxy-environment-variable/?__cf_chl_captcha_tk__=pmd_n0n6E_BSuEJPdnGKyrVQeRvrpQGy.iLQGyR84gZRlLo-1629895189-0-gqNtZGzNAyWjcnBszQhl
export http_proxy=http://USERNAME:PASSWORD@proxy-server-ip:PORT/
what is my IP:
https://www.tecmint.com/find-linux-server-public-ip-address/
curl ifconfig.me
nixCraft
How To Use Proxy Server To Access Internet at Shell Prompt With http_proxy Variable
If you are behind a proxy server, here is how you can set proxy environment variable to let you access internet via proxy server in Linux/Unix
#API_Gateway
راه اندازی API Gateway با Kong
#درحالتکمیل
{توضیحاتی در مورد API Gateway و Kong}
##### Kong start guide
### KONG CORE
# install Kong from repository
# add Kong repository to debian list
# config kong for connect to databse and reply port 8000 and dont reply port 8001 publicaly
# cong configur file put to /etc/kong/kong.conf.default copy this file to kong.conf and edit kong.conf
# save the setting and exit
# initialize Kong to database
# Kong start
# open this url to make sure its work correctly:
# congragulation you start Kong susseccfuly
# for stoping Kong use this command:
برای کانفیگ خود کونگ یک ادمین ای پی ای وجود دارد که فقط از طریق پورت ۸۰۰۱ یا ۸۴۴۴ و از داخل خود سرور (۱۲۷.۰.۰.۱) در دسترس است. برای درست شدن این مشکل میآیید و خود سرویس ادمین کونگ را به عنوان یکی از سرویس های کونگ قرار میدهیم و برایش آتنتیکیشن مینویسییم
تمامی کد های زیر را باید در ترمینال خود دستگاهی که سرویس روی آن ران است بنویسیم
# create admin-api service
در این مرحله باید از طریق ای پی پابلیک سرور در خارج از ان به این سرویس دسترسی داشته باشید و جسون زیر را ببینید
# add basic-auth plugin to admin-api service
# encode the credential
راه اندازی API Gateway با Kong
#درحالتکمیل
{توضیحاتی در مورد API Gateway و Kong}
##### Kong start guide
### KONG CORE
# install Kong from repository
# add Kong repository to debian list
echo "deb [trusted=yes] https://download.konghq.com/gateway-2.x-debian-$(lsb_release -sc)/ default all" | sudo tee /etc/apt/sources.list.d/kong.list# get update
sudo apt-get update# install kong OSS core
sudo apt install -y kong#### isntall postgare database
# config kong for connect to databse and reply port 8000 and dont reply port 8001 publicaly
# cong configur file put to /etc/kong/kong.conf.default copy this file to kong.conf and edit kong.conf
cd /etc/kong#in this file find pg_user (ctrl+w) and set for theis:
cp kong.conf.default kong.conf
nano kong.conf
pg_user = kong# becarful in postgares user and database should be in small case and password is case-sensitive
pg_password = Kong
pg_database = kong
# save the setting and exit
# initialize Kong to database
kong migrations bootstrap [-c /etc/kong/kong.conf]# at the end you should see this message: "Database is up-to-date"
# Kong start
kong start [-c /etc/kong/kong.conf]# see Kong started
# open this url to make sure its work correctly:
http://ServerPublicIP:8000# this json shuold be show: {"message":"no Route matched with those values"}
# congragulation you start Kong susseccfuly
# for stoping Kong use this command:
kong stop### Kong admin-API
برای کانفیگ خود کونگ یک ادمین ای پی ای وجود دارد که فقط از طریق پورت ۸۰۰۱ یا ۸۴۴۴ و از داخل خود سرور (۱۲۷.۰.۰.۱) در دسترس است. برای درست شدن این مشکل میآیید و خود سرویس ادمین کونگ را به عنوان یکی از سرویس های کونگ قرار میدهیم و برایش آتنتیکیشن مینویسییم
تمامی کد های زیر را باید در ترمینال خود دستگاهی که سرویس روی آن ران است بنویسیم
# create admin-api service
curl -X POST http://localhost:8001/services \# create admin-api route
--data name=admin-api \
--data host=localhost \
--data port=8001
curl -X POST http://localhost:8001/services/admin-api/routes \# test new service
--data paths\[\]=/admin-api
در این مرحله باید از طریق ای پی پابلیک سرور در خارج از ان به این سرویس دسترسی داشته باشید و جسون زیر را ببینید
https://serverPublicIP:8443/admin-api# lua_version : ...
# add basic-auth plugin to admin-api service
curl -X POST http://localhost:8001/services/admin-api/plugins \# create a consumer
--data "name=basic-auth" \
--data "config.hide_credentials=true"
curl -d "username=my-user&custom_id=1" http://localhost:8001/consumers/# add password for this consumer
curl -X POST http://localhost:8001/consumers/my-user/basic-auth \# how to access with this consumer
--data "username=my-user" \
--data "password=my-password"
# encode the credential
echo "my-user:my-password" |base64# and make the request:
curl -s -X GET \
--url https://*.*.*.*:8443/admin-api \
--header 'Authorization: Basic ***************='مشکل ارور ۴۰۴ برای لومن، لاراول و ... #e404
حل مشکل rewrite در آپاچی و php 7.3
ابتدا باید این مود را با دستور زیر فعال کنید:
حل مشکل rewrite در آپاچی و php 7.3
ابتدا باید این مود را با دستور زیر فعال کنید:
sudo a2enmod rewrite
سپس در فایل کانفیگ سایت واقع در /etc/apache2/sites-available/
در بین تگ های VirtualHost این کد را اضافه کنید:<Directory /var/www/>در انتها باید کد زیر را در فایل .htaccess قرار دهید:
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>