How to Set Up a Linode Web Server
2015-03-25 10:20
(The way I like it, at least.)
Deploy minimal linode server size.
Create image with Ubuntu LTS. Boot it.
rsync .ssh keys to root account. Then on the linode:
chown -R root .ssh chgrp -R root .ssh
Update apt for some reason:
apt-get update
install the packages you need:
apt-get install apache2 emacs24 php5 mailutils
update SPF DNS record so you can send mail from the server
set up firewall as described on securing your server.
enable sites and mods for apache:
cd /etc/apache2/sites-enabled ln -s ../sites-available/default-ssl.conf . cd /etc/apache2/mods-enabled/ ln -s ../mods-available/ssl.* ../mods-available/socache_shmcb.load ../mods-available/rewrite.load ../mods-available/include.load . ln -s ../mods-available/cgi.load . apachectl restart
add some options to 000-default.conf:
AddHandler cgi-script .cgi
global options
<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>
Jesus Christ
apt-get install make
CPAN
apt-get install build-essential cpan make install install Bundle::CPAN cpan install LWP:UserAgent
Setting up basic perl CPAN is more of a pain in the butt than I would have liked. But overall I found it so much easier to get a Linode up and running and useful than an EC2 instance. Sure, you can do anything with AWS, scaling up to infinity sized web site. But for that single-server need, Linode is 15 minutes. Click, click, type, done.