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
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
Install Rsync
Install Apache
Install MYSQL Server
Install PHP
Harden LAMP
Submit your review | |
Thanks for the grat work.