My Christmas present to myself was a new computer of sorts: a Sheeva Plug computer from Marvel. Its a tiny, cheap, wall-wart style computer, and much lower power than the previous dual-core machine I had running this server.
I wanted to document the steps that I used to get the sucker up and running, so I can remember them later. For some of the steps, I am referring to the Computing Plugs wiki, itself running off of a Sheeva plug.
So here is documentation for myself on what I did, and for anyone else who finds it useful.
- Fix the DNS issue
- Get apt-get working
- Add a non-root default user
- Install Additional Software
Fix the DNS issue
The Sheeva Plug won’t use the DNS servers set within my DHCP router without the following line being commented in the file
Get apt-get working
See this article for instructions and options of what to do.
From there, run
apt-get update && apt-get dist-upgrade to update the software on the server.
Add a non-root default user
I don’t want to use root to log in or do much of anything directly. I want to use the typical default Ubuntu
sudo techniques. Thus, I’ll add myself another user, make and add him to the admin group, and disable the ability to log in as root remotely or via
1 2 3 4
-g ### above is the number you want for your admin group. If you don’t care, then leave off that part.
Make the line is
/etc/group with admin look as
### is just the number that you chose, or that the system assigned.
visudo to edit the sudoers file, and add:
Verify that you can now execute a command as sudo successfully, then nuke the root user.
1 2 3 4 5
Finally, remove the ability to log in remotely as root. In
Remotely logging in to the server can now only be done through the new user, and root commands and functionality are preserved through sudo. For added security, use ssh keys rather than passwords, and / or move sshd to a non-standard port.
Install Additional Software
First, lets get some basic software that I consider useful.
man-db: Serious oversight by the creators to neglect the manual pages in the default install.
vim-nox: My text editor of choice is vim.
git-core: Needed for the code repository management through gitosis later.
vnstat: A bandwidth logging tool. Also, a cron job to update the stats hourly should be added.
1 2 3 4 5
- Install gitosis to manage git.
- After installing gitosis, deploy
git-daemonto those made public through gitosis for easy cloning. For Ubuntu 9.04 at least, mind that there is a bug in the
git-daemon-runpackage, and to use this fix.
Webserver through lighttpd
Lighttpd (pronounced “lighty”) is a smaller, lighter webserver especially well suited for this plug with its smaller amount of memory (512M), and the fact that its mostly just static pages.
1 2 3 4 5 6 7
There are two places you could put the git repository: as a subdomain or not (ie, www.example.com/git or git.example.com).
1 2 3 4 5 6 7 8 9 10 11
1 2 3 4 5 6 7 8
To make the repositories managed by gitosis readable by the webserver, I added the webserver user to the gitosis group (git in the Install gitosis tutorial).
I also finally made myself a setup to mirror a few repositories, and tested it with mirroring gitosis and cgit. Creating the repository with
git clone --mirror was easy, and I modified a cron job I found online (but can’t find now, I’m disappointed I can’t credit the source) to iterate through the directory where I put them and automatically update them.
1 2 3 4 5 6 7 8 9 10 11
Finally, viewing the actual files within the tree view of cgit can be enhanced by performing some syntax codeblocking through python-pygments, and then adding the following file (instructions in the header). Again, I want to credit the site I found this on, but it was from back when I was using the old server, and I can’t find it. Author’s email is at least there.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58