Setup a LAMP Server on Debian or Ubuntu

This setup is for Virtual Host server – not a dedicated server with a single domain

SSH to your server
ssh root@IP
Update Debian/Ubuntu
apt-get update && apt-get upgrade --show-upgraded -y
Create User

How To Create a User in Linux

Setup SSH for Remote Access With GPG Keys – No Password

How To Setup SSH for Remote Access

IMPORANT – Block All Traffic to your Server While You Set it Up

Block All Traffic (but mine) to a new Server

Achtung! Do not install Apache/MySQL/PHP before hostname is set exactly the way you want it.

Edit hosts file on the remote server (not your local pc).

sudo vi /etc/hosts

add after (127.0.0.1 localhost)
127.0.1.1 server1.someuncommonname.com server1

Be careful with this line (above), its easy to leave the last part off (server1) and cost hours tracking down what went wrong.

sudo vi /etc/hostname

add this only line

server1

Check if hostname is Set Correctly
hostname

output should be

server1

hostname -f

should be

server1.someuncommonname.com

Set timezone
sudo dpkg-reconfigure tzdata
Solve Future DNS Problems with OpenDNS

Bullet-Proof Your DNS

Install Rsync

Install Rsync

Install Apache

Install Apache

Install MYSQL Server

Install MYSQL Server

Install PHP

Install PHP for WordPress

Harden LAMP

Harden LAMP

Submit your review
1
2
3
4
5
Submit
     
Cancel

Create your own review

Webmaster Notebook | SELeads
Average rating:  
 1 reviews
by Eric Eronsson on Webmaster Notebook | SELeads
Exactly What I Needed

Thanks for the grat work.

You may also like...