简体   繁体   English

如何在共享主机上安装Redis?

[英]How to Install Redis on shared hosting?

I am developing a Laravel project and I'm using Predis for caching database queries.我正在开发一个 Laravel 项目,我正在使用 Predis 来缓存数据库查询。 Now I have to install Redis on my server.现在我必须在我的服务器上安装 Redis。 Is it possible to install Redis on shared hosting?是否可以在共享主机上安装 Redis?

Shared Hosting (by the typical definition) does not allow individual users to do anything but upload files.共享主机(根据典型定义)不允许个人用户做任何事情,但上传文件。 If you need to use things like Redis, which isn't offered on Shared Hosting that I've ever seen, you'll need a Virtual Private Server.如果您需要使用我见过的共享主机上没有提供的 Redis 之类的东西,您将需要一个虚拟专用服务器。 You can get one from Vultr or Digital Ocean for almost as cheap as Shared Hosting.您可以从VultrDigital Ocean以几乎与共享主机一样便宜的价格购买。

Not exactly installing, but if your hosting provide CPanel, they may have Redis already installed.不完全安装,但如果您的主机提供 CPanel,他们可能已经安装了 Redis。 Usually they mean it to be used with Wordpress plugin like W3TotalCache.通常他们的意思是它与 W3TotalCache 等 Wordpress 插件一起使用。

Redis on CPanel CPanel 上的 Redis

Yes, some cheap hosting has git, composer, SSH, NodeJS and all the modern stuff that can be enabled on CPanel.是的,一些便宜的主机有 git、composer、SSH、NodeJS 和所有可以在 CPanel 上启用的现代东西。 In my experience, they crippled the SSH use by disconnecting after 3 minutes idle and reject connection with ServerAliveInterval setting.根据我的经验,他们通过在空闲3 分钟后断开连接并拒绝使用 ServerAliveInterval 设置的连接来削弱 SSH 的使用。 So your terminal experience will not be enjoyable.所以你的终端体验不会很愉快。

Installation probably not possible for most application, there's no apt or yum, or even sudo.大多数应用程序可能无法安装,没有 apt 或 yum,甚至没有 sudo。 It is not a full VPS, possibly you cannot update your software version by yourself.它不是完整的 VPS,可能您无法自行更新软件版本。

There maybe other hidden limitation, but you need to find it yourself, YMMV.也许还有其他隐藏的限制,但你需要自己找到它,YMMV。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM