With the latest LTS release of Ubuntu many people, including myself, will take this time to do a fresh install of the OS on their development machines. Here are a few tips for getting up and running after your OS is installed. This guide will be for Python and Django development using Ubuntu 64-bit, alter the commands to work with your flavor of Ubuntu.
sudo apt-get install git-core
- Download the latest version of JDK from Oracle.
sudo tar xvzf ~/PATH/TO/DOWNLAD/xvzf jdk-8u5-linux-x64.tar.gz
sudo nano /etc/profile
- At the bottom of this file paste the following lines:
In the terminal type
java to make sure it is working.
If you want to use settings from your previous install of PyCharm click
File->Export Settings and back up this file to be used on your new installation.
- Download the latest version from PyCharm.
tar xvzf pycharm-professional-3.1.2.tar.gz
- If PyCharm asks if you want to use old settings say that you don’t right now, we will do this after it is installed.
- Follow PyCharm instructions to finish installation
- Now you can import the settings by clicking
File->Import Settings and locating the files.
sudo apt-get install python-pip
sudo pip install virtualenv
- Create your virtualenvs.
sudo apt-get install python-dev
sudo apt-get install mysql-server
sudo apt-get install libmysqlclient-dev
- In your related virtualenv run
pip install MySQL-python
- In your related virtualenv run
pip install Django
At this point you should be ready to install all of the other packages you need. If I’ve missed anything critical for getting an Ubuntu installation at least up to a working state let me know below in the comments.
GitHub is great for open source projects and if you haven’t been there to see what’s going on you’re missing out. They offer free git hosting for all of your open source projects. Their UI is great for tracking issues, commits, users, updates, and so much more. But let’s say you want to use all of that great UI on a project you don’t want open source. That’s when you’ll need to pay GitHub for a few private repositories. Or maybe you want to create an organization for you and your developers to create private projects and manage larger applications across many repositories. You’ll need to pay for that too. Below are the price lists for both personal repositories and for organizations.
Those prices can get pretty steep. Luckily for you there is an open source solution to GitHub called GitLab. It runs on Ruby and you can set it up all by yourself by following these GitLab Installation Instructions. That assumes you have a server ready to serve and work for you. If you don’t you can quickly set up a great Amazon EC2 instance and install GitLab in one click. There are a couple of caveats in getting things set up with the EC2. Once it is installed you’ll log in using the account firstname.lastname@example.org and the password is contained in your EC2 log. Once logged in change your password to something other than the auto created one. You’ll then need to make some changes to your config files. SSH into your EC2 instance and update the URL contained in
~/apps/gitlab/htdocs/config/gitlab.yml. Follow the instructions at the top of that file. Then you’ll need to set up your email service. To do that follow the instructions here and then restart the services as described at the bottom of that section. Now you’re all set! Placing this in a free Amazon instance will give you a server for a year for free and then after will only cost ~$15 per month. Much cheaper than GitHub and you have complete control to create groups, private repositories, even public repositories!
That’s all there is to it. I’ve started using it for my personal projects that I want a UI for issue tracking and other users to join me with and not make public. If you have any great advice for using GitLab feel free to share in the comments below.