How to Install Rsync on Ubuntu
I needed to install Rsync on Ubuntu using SSH command line and for some reason I could find this information anywhere. So here it is:
sudo apt-get -y install rsync
As simple as that.
How to Show File Extension in Windows 7
Was simple in Windows XP but took a little bit of effort for find how to show file extensions in Windows 7. Anyway just in case you need to know, do the following:
1. Open Windows Explorer, you can do this by opening up any folder.
2. Click “Organize”, scroll down and click on the “Folder and search options”.
3. Click the “View” tab.
4. Scroll down until you see “Hide extensions for known file types”, un-check this.
5. If you are doing web development you might also want to tick “Don’t show hidden files, folders and drives”.
6. Click “OK” and now your file extensions will now longer be hidden.
Install APC on Ubuntu with PHP 5.3
Installing the APC with PHP5.3 is straightforward (when you know how):
1. Install the required packages:
sudo apt-get install php-pear php5-dev apache2-threaded-dev
2. Install APC:
sudo pecl install apc-3.1.4
3. Create file /etc/php5/conf.d/apc.ini with the following content:
extension=apc.so
4. Restart Apache:
sudo /etc/init.d/apache2 restart
After restarting the Apache2 web server apc.ini section should be included in the phpinfo() output.
How to Enable SSL on Xampp with Vhosts
If you need to enable SSL on Xampp whilst stilling using vhosts, follow the next few steps. It assumes that you already have vhosts enabled.
Open xampp/apache/conf/extra/httpd-vhosts.conf
Around line 19 you should see “NameVirtualHost *:80″, below this line add “NameVirtualHost *:443″ (without quotes)
Then add a new vhost site just like a normal one but with *443 instead on *80 and the following lines:
SSLEngine on SSLCertificateFile conf/ssl.crt/server.crt SSLCertificateKeyFile conf/ssl.key/server.key
An example of this is:
DocumentRoot "C:/xampp/htdocs/myproject/public" ServerName mysite.local ServerAlias mysite.local SSLEngine on SSLCertificateFile conf/ssl.crt/server.crt SSLCertificateKeyFile conf/ssl.key/server.key
Restart Xampp apache and everything should work fine.
Install Python and Django with Xampp on Windows 7
Install Apache
You will need to have Apache and MySQL installed on you PC, I used Xampp which you can download from here:
Xampp for Windows
Download and Install Python 2.7
Do to the Python website and download version 2.7 Windows Installer (http://www.python.org/download/). At the time of writing version 3 lacks a lot of 3rd party plugin support.
Go through the standard install process, it should install Python to C:\Python27\
Install modwsgi for Apache
Download modwsgi for Apache http://code.google.com/p/modwsgi/ and put the file into the Apache module folder (in Xampp found here: C:\xampp\apache\modules)
Add the link to httpd.conf around line 130 (but it doesn’t really matter where), the file is usually found in C:\xampp\apache\conf\
LoadModule wsgi_module modules/mod_wsgi.so
Add Python to System Path
Add the following to windows system path. In windows 7 this is found in Control Panel\All Control Panel Items\System then advanced system settings, then environment variables, then under system variables you should see path, click edit and add this to the end of the line.
;C:\Python27;C:\Python27\Scripts
Restart Computer
Download Django
Go to Django Download Page and download Django, unzip it (I use zip). Out Django into a folder you can remember, I put it into the folder in C:\xampp\htdocs. Open up command prompt by clicking start, and type the following into the search box, then press enter. A black window should appear this is windows command prompt.
cmd
Navigate to the Django directory by using the command cd django directory (cd stands for change directory), for example:
cd /xampp/htdocs/django/
To setup Python type
python setup.py install
Download and install mysqld module
http://www.codegood.com/archives/129
Restart Computer
Setup Your First Project
In the command prompt to create a new project type the following (obviously changing the location and name of the mytestprojectname):
django-admin.py startproject mytestprojectname
Start the Python Server
Navigate to the new project
cd mytestprojectname
Start the server
python manage.py runserver
Test it is up and running by going to http://localhost:8000 you should get a it worked webpage!
Further Reading
I highly recommend reading The Django Book (which is free online).
Recent Posts
- Diary of a Startup: I’ve Just Applied to Seedcamp
- Diary of a Startup: Create a startup for £14
- Sendmail on Ubuntu
- Adobe Air with Netbeans
- Best Firefox Plugins for SEO aka Addons
- Setup Ubuntu as a Web Server
- Changing Plesk Fast CGI to Apache PHP with ZF
- How to Access PUT data in Zend Framework
- 30 minutes until 30!
- Google Analytics Benchmarking Newsletter July 2011
My External Links
Twitter Updates
- Just signed up to http://t.co/tfBBKAAS use my referral code to get 10% off. 41pqp3q1 (http://t.co/TJUdYIv8) 1 day ago
- Anyone using http://t.co/gvbvZgN5 and want to tweet me your Referral Code? 1 day ago
- RT @TheAdventurists: #IceRun team Ice Ice Maybe drive into a ditch on Russian TV: http://t.co/0E2AWsGg #FB 5 days ago
- 10 Things Bosses Never Tell Employees -- But Maybe Should http://t.co/v4JNYpEg 5 days ago
- RT @guardian on the return of Myspace: http://t.co/84KLw8xn 1 week ago
- My First Ice Hockey Match In The Cheap Seats http://t.co/fMMH7Oan 1 week ago
- I'm at Wetherspoons http://t.co/ko7GIh75 1 week ago
- I'm at The Lansdowne (123 London Rd, Leicester) http://t.co/ieW5KFVk 1 week ago
- I'm at Barceloneta http://t.co/ByUieJvb 1 week ago
- 57% of my followers are from #UK,17% from #USA & 18% from #Leeds. http://t.co/TZmZfcgq. What's your #TweepsMap? 1 week ago




