Software Developer. Computer Geek. INTJ.

Tag Linux

Setting up Gitea

This is how I set up my Gitea instance on my Ubuntu server…

Setting up a Quake III Arena private server

Server setup Set up a Linux server. I used a DigitalOcean Standard $5/mo (1GB, 1CPU) droplet with Ubuntu 18.04. A desktop machine would be fine too – even the same one you’re playing on – as long as all players…

Find newly created/modified files in Linux

Find files created today or recently modified…

Installing PHP 5.4 on Debian 6 (Squeeze)

Debian 7 (Wheezy) is due to come out soon, but I didn’t want to wait to upgrade to PHP 5.4, nor to install the release candidate. I tried using the Wheezy repository, but got dependency errors. Fortunately Dotdeb provides packages for…

List the number of open HTTP connections per IP in Linux

This was useful when fighting a DDoS attack on one of our web servers.

Installing Dnsmasq for wildcard local domains on Debian

I use this to point all subdomains of a domain to my local development server.

Automatic updates for Debian

Originally I was using apticron to email me whenever new security updates were available and then manually applying them, but with 3 Debian servers and frequent updates this was getting annoying. So I decided to automate it.

Installing PHP 5.2 FastCGI on a cPanel server (alongside PHP 5.3+)

This is based on my instructions for Debian and a bit from this forum post. It requires root access and you must be comfortable using the command line.

Bulk (batch) rename files in Linux

rename -v s/OLD/NEW/ FILENAMES

Extract images from a .ico file (e.g. favicon.ico) on Linux

icotool -x -o . favicon.ico

Script to delete and re-create a Linux test user account

I use this script to repeatedly delete and re-create a Linux (Debian/Ubuntu) user account for testing my dotfiles installation script.

Sites Manager

Script to manage virtual hosts in Apache and Exim on my Debian servers.

Installing PHP FastCGI with suEXEC on Debian

Most of the time I’m happy with mod_php. It’s certainly the most efficient way to run PHP. But there is one major downside – all scripts are run as the Apache user (www-data). We can get around this by using…

Installing Ruby on Rails 3.1 + Ruby 1.9 on a cPanel 11.30 server

cPanel 11.30 doesn’t support Ruby 1.9 or Ruby on Rails 3.0/3.1, only Ruby 1.8 and Rails 2.3. They are working on supporting Rails 3 in cPanel 11.34, but that could be 12 months away still, so for now we have to install…

Automatically mounting a Samba share at boot on Debian

First you’ll need somewhere safe to put the username & password. We’ll store them in /etc/sambapasswords, and make that only readable by root.

Connecting PHP to Microsoft SQL Server on Linux

Here is how to get PHP 5.2 on Linux (specifically Debian/Ubuntu) talking to a Microsoft SQL Server database

Installing PHP 5.2 FastCGI on Debian 6 (Squeeze)

Debian Squeeze comes with PHP 5.3. This is good, because PHP 5.2 is no longer maintained, but causes problems for old applications that can’t support it (e.g. ViArt 3, because it uses Zend Encoder). Rather than permanently downgrade PHP for the whole server,…


Config files and scripts for Bash, Vim, Git and other Linux software.

Download MySQL database from cPanel to development server (shell script)

This is a tiny script I used to download my live site database onto my development server when I used a web host that used cPanel, but didn’t give me access to mysqldump over SSH (because they have Jailshell enabled).

Setting up Wake-on-LAN (with a Debian server)

Today I set up Wake-on-LAN (WOL) on all the PCs at work. It was pretty easy actually.

Mounting Samba/CIFS on Linux as a regular (non-root) user

smbmount //server/filestore /path/to/mountpoint/ -o user=dave,pass=XXX,dir_mode=0700,file_mode=0600

How I set up my Debian web server

Recently I moved my websites to a Memset virtual private server (VPS). Rather than pay an extra £7.50/month for cPanel, I decided to configure it myself. This is my notes about what I did. It’s not designed to be a guide…

Debian vs Ubuntu

For a while now I’ve been using Ubuntu as my Linux distro of choice. On Monday I have to reinstall one of the Ubuntu servers at work, so I thought I’d have a look at Debian this weekend, to see if it would be…

SUID Shell Scripts

I was trying to work out why my SetUID (chmod ug+s) script wouldn’t work properly, until I came across a page that explains why this is disabled. I’ve changed it to require that sudo ./myscript be used instead.

Devil’s Pie

A very useful tool for Linux users: Devil’s Pie.

Resolving Windows (NetBios) Hostnames from Linux

Installing 3D-Desktop under Fluxbox on Linux

I finally figured out why I couldn’t install 3D-Desktop in my home directory earlier. It works now, and here’s how – I’m using Fluxbox installed in my home directory, but adjust to suit how you like things set up.

Installing Fluxbox on Linux

Continuing my theme of installing extra software in my home directory on the DCS computers, today it’s Fluxbox. (I was fed up of how slowly Gnome loads these days!)

Installing Subversion (svn) In Your Home Directory

I decided to install my own copy of the Subversion 1.4.2 client on Joshua (university server), since they still have version 1.1.3. I don’t really know what the difference is (and it does work fine with the 1.4.2 server), but…

Linux ‘screen’ Command (Multiple Virtual Terminals)

This one’s for anyone who uses the Linux command line a lot: The screen command lets you run multiple virtual terminals inside only one physical terminal or over a single SSH connection. You can then disconnect from that terminal and it keeps…

© 2021 Dave James Miller — Powered by WordPress

Theme by Anders NorenUp ↑