Linux VPS

Centos 7 Install Redis cache

When your project is growing you will need a proper cache, now there are several different options available in the market including services like Cloudflare, Akamai, and Imperva But if your project isn't that big and you don't want to pay or you want the cache to be stored on your infrastructure, therefore we have several options, but today we will have a look at Redise free solution. Redis is a useful open-source in-memory data structure storage. It can be used in many possible ways for example it can be used as a database, cache, and message broker and supports various data structures such as Strings, Hashes, Lists, Sets, etc. It provides high availability via Redis Sentinel including monitoring, notifications Automatic failover. It also can provide automatic partitioning across multiple Redis nodes if you have installed and configured them with Redis Cluster. As all that is said we can proceed for installation. By the default,…

Centos 7 install Docker, Nginx, Reverse proxy, Let’s encrypt certificate manager and Docker web-based management Portainer

There is no secret, that these day's many applications are running on Docker since Docker is flexible and also easy to scale. We know, that there are many options, that come with Docker, for example, Docker Kubernetes and Docker Swarm, and many companies are starting to develop systems, system architecture, and even apps on Docker-based environments. But some companies use Docker for testing apps before deploying them to a production server. Also, large Linux distributors like Centos are creating a specific Docker-based system, which is a license based one and is getting where large popularity in terms of large industries. But today we will create a manual on how to install Docker, create our first 3 containers. 1. Docker web-based management system known as portainer; 2. Docker Nginx reverse proxy, that forwards incoming traffic to port 80 and 443 to correct container in our tutorial we will be creating a Docker-based environment for some web-based…

How to allow root to login with ssh key

When you are managing multiple Linux servers, one of the safest and best ways to login to your server is via SSH secure key. Also, if your company has several administrators and one is leaving the company, the best way is to disable it's SSH key. Also, another benefit from the SSH key is that you don't need to remember several passwords. How to generate SSH key you can read into this how-to click here, but how to add a user with SSH key you can read here. 1. Login to your Linux server as root and go to user folder cd /root/ 2. Create a .ssh directory in the root home directory and change its file permissions to 700. mkdir /root/.ssh ; chmod 700 /root/.ssh 3. Create the authorized_keys file in the .ssh directory, and then restrict file permissions to 600 to enforce that only the root has read or write access to the…

How to create user with ssh key

Add new user accounts with remote access rights to a Linux instance. Each account can use SSH to connect to the instance from another computer or instance. The new user will be able to use SSH to connect to the instance from another computer or instance. 1. Add a new user to a Linux instance Add a new user account to an instance, where new_user is a placeholder for the new account name. This command creates an associated group, home directory, an entry in the /etc/passwd file of the instance. sudo adduser new_user Note: If you add a new user to an Ubuntu instance, include the –disabled-password option to avoid adding a password to the new account. sudo adduser new_user --disabled-password 2. Change the security context to the new user account so that folders and files you create will have correct permissions. sudo su new_user Note: When you run the sudo su new_user command, the name at the top…

How to generate SSH key on Linux and macOS

These days every company has several servers and they all need administration, but to remember the password for each server is a problem and also sometimes you can lose your password. At the same time you cannot put one universal password for all servers it will be insecure and put your systems at risk. Also, if your company employe leaves you will need to go and change all passwords, so it is better to use SSH key's it will not only be secure but also will be much easy if you maintain many Linux servers. This SSH key also can be used on GIT servers and other systems, that support SSH connection with a key. So let's start, open your Linux or macOS terminal. When opened copy this command and paste it in only replace e-mail with your mail If you are generating key on your macOS then 1 step login as root by opening…

How to Install httpd (apache) + Remi PHP and SSL on centos

In the global internet, there are several user tutorials on How to Install Apache2 and also PHP, but not all tutorial writers are using a specific PHP that is developed by at the moment RedHat employee Remi. In our experience, we find that Remi PHP is much better with stability and performance. So we are creating a tutorial that is with REMI PHP, also this will not be only a tutorial but in the end, you will find another option our created shell script that is hosted on our public git https://www.amberit.in that you can download or clone on to your server and by running it will automatically install on your server Apache2, Remi PHP, Certbot (that will automatically install Let's Encrypt certificate) and newly created vhost (Virtual Host) so basically when you will run this shell script you will have a webserver ready to go. For manual installation: Now with the command below, we…