Archive for the Centos Category

Manage AWS EC2 Snapshots

| November 23rd, 2017
Create and delete snapshots according to retention plan. IAM account:  In the AWS Management Console, go to IAM service.  On the right side click on Users then Add User:  Type In user name and select Programmatic access. Then Next:Permissions  On the next page select "Attach existing policy directly" then click on Create Policy  Click on the JSON tab then copy/paste the code below(we will use one policy for creating and deleting snapshots): { "Version": "2012-10-17", Read more [...]

Fix Amazon EC2 SSH login

| November 20th, 2016
Blocked myself with CSF firewall on a Centos 7 server. With the "Run Command" feature was not available, and no web terminal or VNC console such as the one in digitalocean(https://www.digitalocean.com/community/tutorials/how-to-use-the-digitalocean-console-to-access-your-droplet). After reading around I found out that the only solution is to stop the running instance, detach the volume, create another Linux instance (shouldn't be the same as the running one), then attach the old volume to the newly Read more [...]

Install SSMTP on Centos 7

| August 31st, 2016
Add the repo if it's not added: yum install epel-release -y Install: yum -y install ssmtp (yum install mailx) if not installed Configure: alternatives --config mta   There are 2 programs which provide 'mta'. Selection Command ----------------------------------------------- *+ 1 /usr/sbin/sendmail.postfix 2 /usr/sbin/sendmail.ssmtp Enter to keep the current selection[+], or type selection number: 2   Disable postfix (or sendmail): systemctl Read more [...]