A new tutorial at phpfreaks.com
- September 3rd, 2010
- By trq
- Write comment
I just finished a very quickly written new tutorial over at http://phpfreaks.com
http://www.phpfreaks.com/tutorial/a-simple-debian-based-dev-environment
I just finished a very quickly written new tutorial over at http://phpfreaks.com
http://www.phpfreaks.com/tutorial/a-simple-debian-based-dev-environment
I’ve got the Easter weekend off (and I’m not actually going to work from home) & am planning on enjoying it. Two of my best friends are celebrating birthdays, and tonight I’m going to see one of them play with his band MM9.
These guys are fucking awesome and Ben is (deservedly so) getting a rep as one of Australia’s best drummers. I miss playing in bands, but these guys work far too hard for my liking.
I’m going to have to put off this server build for a little while at least. Looking at the milestones lined up for a few projects I have been working on and it is apparent I’m actually pretty screwed for time.
So yeah, the way I figure it, for the moment this new server may need to take a little bit of a back seat. I do plan however on at least attempting to get some done, so we’ll see I guess.
Over the next few days (hopefully) I’m going to document the process of setting up a dedicated vps server to run from home. I’ve done this a few times before, but have never really gotten around to documenting anything. I’ve a spare box, the need and a little time at my disposal so this time I’m going to give it a go.
Currently I run a few small development wiki’s, issue tracking applications, subversion & this blog from some vps’s (openvz) running on my desktop machine. While this has been a pretty good setup for the last six months or so, I want to get back into making some music and so have the need to run this desktop machine as a dual boot GNU/Linux / Windows machine. In doing so, I’m going to need to shutdown Linux on occasions and seeing that I have people relying on some of the services available on this machine, its time to move on.
I’ve has an old machine (2.6Ghz 1G memory) laying around since it blew a graphics card some 18 months ago. Ive since (last weekend) installed an old card, and she is running again. Ive no spare monitor however, so this will be a headless machine – sitting in the corner of my study (I where I also have a small UPS setup).
At this point in time I’ve done nothing but plug my desktop machine’s monitor into this new (old) machine and do a pretty standard Debian (Lenny) install from a net-install CD. I setup a static IP, when prompted for a host name, I named the machine vpshost, and let it know it was on a domain named lcl. I then also set myself up a user account on this machine called thorpe. When prompted to install any software I deselected desktop machine and simply left standard highlighted. I’ll manually install what I need.
The machine rebooted and I log in as root. The first thing I need to do is update the apt cache, upgrade any old packages & install some essentials.
root # apt-get update && apt-get upgrade
root # apt-get install vim vim-scripts ssh sudo
The first thing I do is reconfigure ssh to use a non standard port & restart the service.
root # sed "s/22/1904/" /etc/ssh/sshd_config && /etc/init.d/ssh restart
Update the alternatives system to use vim as the default system wide text editor.
root # update-alternatives --set editor /usr/bin/vim.basic
Execute….
root # visudo
and un-comment the line that reads %sudo ALL=NOPASSWD: ALL. Place my user (thorpe) into the sudo group.
root # gpasswd -a thorpe sudo
I can now logout and unplug the monitor, putting it back in my desktop machine. Once in my desktop, I added an entry to my dnsmasq server so all the machines on my network can see this machine. I then simply copy over my public ssh key & some handy rc files.
thorpe $ copy-ssh-id
thorpe $ scp .bashrc vpshost.lcl:
thorpe $ scp .vimrc vpshost.lcl:
That’s about it for now. I’ll log in tomorrow and start work.
Recently my wife bought me an iPhone. I love thing and already am finding it hard to imagine how I lived without it.
For a while now, we have been using my iPod (with a tuner attachment) to play my extensive mp3 collection through our main stereo system in the lounge room. This has been ok to a point, but when we are outside at the bbq or spa the reception is just not good enough. The iPhone however has a remote application that allows you to remotely access iTunes installed on your computer. This gave me an idea.
I’m not a Windows user, haven’t been for a long time however the idea I had involved installing Windows on an old pc I have without a monitor. So I pulled her out (8G hard drive and all) installed a wireless card, plugged her into my current monitor and installed XP. From here, the process was simple.
apt-get update && apt-get install rdesktop samba
I already have all my mp3s stored within ~/var/mp3s on my Linux machine. I’m simply going to share this directory with windows. Configure samba to do so…
[mp3s]
comment = Mp3s
path = /home/thorpe/var/mp3s
writeable = yes
browseable = yes
guest ok = no
printable = no
Restart samba….
sudo /etc/init.d/samba restart
I run my own local dns server via dnsmasq so I have no problem accessing any of my machines by name, if your following along, you may want to use ip addresses.
rdesktop -u username -p password -f -r sound:remote lounge-pc.lcl
The -f switch puts you in full screen mode while the -r switch disables the audio being sent to the client.
net use m: \\oblivion.lcl\mp3s
Install the remote application for your iPhone
Enjoy! Now I have a remote control on my iPhone that uses wifi to control iTunes from anywhere in my house. I can also login to this machine whenever I need to do maintenance (or update the iPhone even?) without having to drag it out and hook up any monitor.
Been a while since I last had a blog but here we go again, hopefully I’ve more to rant about this time.
In fact I do, things have changed. Firstly I’m now A full time web developer working for one of the countries largest publishing companies and secondly I have teamed up with a good friend of mine to build what we hope will be a kick ass web application.
Anyway, just wanted to get some sort of intro out of the way. Stay tuned for more.