Everything in /var/www owned by root user and www group: sudo chown -R root:www /var/www Set /var/www directory permission to owner rwx, group rwx, and everyone else to r-x sudo chmod 2775 /var/www Set all current and future directory permissions to owner rwx, group rwx, and everyone else to r-x find /var/www -type d -exec sudo […]

First, back up the server (including the database) by creating the image. This way if anything goes wrong, you can always try again. Then use this fast and easy fix: mysqlcheck –repair –all-databases Or, as is the case at Amazon account that I manage: mysqlcheck -u root -p –repair –all-databases Password: the root MySQL password.  If […]

1. Switch to root user sudo su 2. Open the clock file in the editor nano /etc/sysconfig/clock 3. Make sure that the file contains the correct time zone, for example: ZONE=”America/New_York” NOTE: if you want to check what zones are available, you can see all zones by typing this command: ls /usr/share/zoneinfo 4. Save the file and […]

1. Switch to root user sudo su 2. Create new user adduser [username] (For example, adduser admin ). 3. Assign password to a new user passwd [username] (For example, passwd admin ). 4. Enter password 5. To give the new user necessary privileges, assign that user to the appropriately privileged group. For example, to the www […]

For example, if your main domain name for the given server is certaindomainname.com 1. Switch to root user sudo su 2. Open hosts file on the server nano /etc/hosts and make sure you have this in it: 127.0.0.1 localhost.localdomain localhost certaindomainname.com ::1 localhost.localdomain localhost certaindomainname.com Save the file. 3. Open Apache configuration file nano /etc/httpd/conf/httpd.conf […]

1. Switch to root user sudo su 2. Install postfix yum install postfix -y 3. Stop sendmail (installed on Amazon Linux by default) /etc/init.d/sendmail stop 4. Start postfix /etc/init.d/postfix start 5. Switch MTA from sendmail to postfix alternatives –set mta /usr/sbin/sendmail.postfix 6. Configure postfix to allow email for the same domain name to be received. […]