Wordpress install on Debian Sid (post-Wheezy)
For my first post, I will discuss how I installed this website on my Debian Sid installation on my EDIS Virtual Private Server (VPS). I first started with the EDIS VRS STARTER, which includes 512MB RAM, with a 10GB disk, 1Gbps network bandwidth, and 2TB total bandwidth allowed per period. Not much to work with, but it’s only ~$7 per month! The nice thing is, the Wheezy image I started with only takes up 200MB of disk space, so there’s plenty to work with.
Here’s the procedure I followed:
- First thing was to install my bare essentials. This includes vim and tmux. I installed them with the following command, as root:
aptitude install vim tmux
- Now that vim was installed, I could remove nano and edit /etc/apt/sources.list properly:
# aptitude purge nano # DIE EVIL NANO! # vim /etc/apt/sources.list
The /etc/apt/sources.list file ended up like this:
deb http://debian.uchicago.edu/debian sid main contrib
Since this server is in Chicago, IL, USA, I changed the Debian repository server from ftp.at.debian.org (EDIS is based in Austria). The “contrib” parameter was used because several key MySQL components (necessary for WordPress) are not available in the “main” repository because of licensing issues. With that I added the following alias to root’s bash run control file (~/.bashrc):
alias upgrade='aptitude update && aptitude full-upgrade'
I do the above on all of the Debian servers and workstations I manage, to make it a simple matter to update the system to the latest available packages. Sourcing the .bashrc file
source .bashrc
(or what I really use). .bashrc
loaded the new alias. Executing the “upgrade” alias proceeded to update my Wheezy install to Sid, and took about twenty minutes or so. Note thatlsb_release -a
still returns Wheezy; I’ll have to investigate that when I have time. -
Now that my machine had been updated, I rebooted it to load the new kernel (with the command
reboot
. Next, I installed wordpress and mysql. I note that mysql-server is *not* a dependency of wordpress (it merely suggests mysql-server); I discovered this when I tried to start WordPress for the first time and noticed mysql-server was not installed (this led me to adding “contrib” to sources.list above). The command below installed many libraries and helper packages, including apache2 and php5 related packages:# aptitude install wordpress mysql-server libssh2-php
I installed libssh2-php since I wanted to use SSH keys for WordPress to apply updates, plugins, and themes (rather than use FTP or FTPS [I’ve always found installing and securing FTP repositories to be a major pain]). I was then ready to set up apache.
- Setting up apache was as simple as creating the /etc/apache2/sites-available/eldon.me:
DocumentRoot /var/www/eldon.me ServerName eldon.me ServerAlias www.eldon.me ServerAdmin trey@blancher.net ErrorLog /var/log/apache2/wp-error.log TransferLog /var/log/apache2/wp-access.log RedirectPermanent / https://eldon.me SSLEngine on SSLCertificateFile /etc/ssl/certs/eldon.me.pem SSLCertificateKeyFile /etc/ssl/private/eldon.me.crt DocumentRoot /var/www/eldon.me Customlog /var/log/apache2/eldon.me-ssh-access.log combined ErrorLog /var/log/apache2/eldon.me-ssh-error.log HostnameLookups On Options FollowSymLinks AllowOverride Limit Options FileInfo DirectoryIndex index.php I obtained my SSL certificates from StartSSL, based in Israel. The main reason I use them is they offer level 1 certificates for personal use completely free/gratis! The only downside is that many older, out of date browsers and smartphones don’t recognize their certificate authority credentials, which means many browsers issue an SSL warning (as if the site used self-signed certificates). If that becomes a major problem, I may switch.
The next step was to enable the site:
# a2ensite eldon.me
- The next step is to set up the WordPress MySQL user and database (adapted from here). In Debian, when mysql-server is installed apt/dpkg directs you to set root’s password for the MySQL server. The first command below will prompt for that password:
# mysql -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 308 Server version: 5.5.29-1 (Debian) Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create database eldon; Query OK, 1 row affected (0.00 sec) mysql> grant all privileges on eldon.* to "wp_agent"@"localhost" -> identified by "SUPERSECRETPASSWORD"; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.01 sec) mysql> exit
Since wordpress installs to /usr/share/wordpress on Debian, I made a symlink, and then restarted apache2:
ln -s /usr/share/wordpress /var/www/eldon.me service apache2 restart
If I want to add other sites to this VPS, I’ll just need to set up the site as above, and place it in /var/www/
. Note thttps://www.startssl.com/hat I’ll have to be careful when setting up SSL. I had originally found that multiple SSL sites on a single IP was impossible. However, when I tried to find the page that explained that, I found this post instead: “Configure Apache to Support Multiple SSL sites on a single IP address”. I could have saved some money, but having multiple VPS services makes sure I have access to one of them should the other go down (I use my other VPS for IRC as well). - Now, I could finally set up WordPress. I navigated here (you’ll see that it has already been set up). I won’t go into setting up WordPress from there, but this is precisely the same as “Run the Install Script”.
And that’s it for now! Hopefully I didn’t miss any steps.
Comments ()