mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-04 07:22:34 +00:00
Merge (#127)
This commit is contained in:
24
app/SSH/Services/Redis/Redis.php
Normal file
24
app/SSH/Services/Redis/Redis.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\SSH\Services\Redis;
|
||||
|
||||
use App\Models\Service;
|
||||
use App\SSH\HasScripts;
|
||||
use App\SSH\Services\ServiceInterface;
|
||||
|
||||
class Redis implements ServiceInterface
|
||||
{
|
||||
use HasScripts;
|
||||
|
||||
public function __construct(protected Service $service)
|
||||
{
|
||||
}
|
||||
|
||||
public function install(): void
|
||||
{
|
||||
$this->service->server->ssh()->exec(
|
||||
$this->getScript('install.sh'),
|
||||
'install-redis'
|
||||
);
|
||||
}
|
||||
}
|
7
app/SSH/Services/Redis/scripts/install.sh
Executable file
7
app/SSH/Services/Redis/scripts/install.sh
Executable file
@ -0,0 +1,7 @@
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get install redis-server -y
|
||||
|
||||
sudo sed -i 's/bind 127.0.0.1 ::1/bind 0.0.0.0/g' /etc/redis/redis.conf
|
||||
|
||||
sudo service redis enable
|
||||
|
||||
sudo service redis start
|
Reference in New Issue
Block a user