Skip to content

Installation

Maksudur Rahman Maateen edited this page Jan 24, 2016 · 4 revisions

#Installing and running

NOTE: Py-URL-Shortener has been tested in Ubuntu 14.04 LTS with Python 3.4 and MariaDB 10.1.

Requires Python 3.0+.

IMPORTANT: Use pip install -r requirements.txt to install dependencies, some packages are setted to specific versions.

On Ubuntu Terminal:

==Without a virtual environment==

sudo apt-get install python3 python3-pip
wget https://github.com/ugcoder/Py-URL-Shortener/archive/v1.0.zip
unzip v1.0.zip
cd Py-URL-Shortener-1.0
pip3 install -r requirements.txt

==With a virtual environment==

pip3 install virtualenv
virtualenv Py-URL-Shortener
cd Py-URL-Shortener
source bin/activate
wget https://github.com/ugcoder/Py-URL-Shortener/archive/v1.0.zip
unzip v1.0.zip
cd Py-URL-Shortener-1.0
pip install -r requirements.txt

Okay! We have set up almost everything. Now we need MySQL/MariaDB as database system. As I prefer MariaDB, I am showing how to install it's latest version

On Ubuntu Terminal:

sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo add-apt-repository -y deb [arch=amd64,i386] http://mirror.jmu.edu/pub/mariadb/repo/10.1/ubuntu  codename main
sudo apt-get install -y mariadb-server
sudo mysql_secure_installation

Note: On the 2nd command, codename = precise, trusty, vivid, wily, xenial. Use what you suit best. On last command, just use 'y' when you will be asked something and use a strong password when you will be asked for a root password.

Okay, installation is now completed. Just go to Configuration page to configure Py-URL-Shortener.

####Disclaimer: Py-URL-Shortener can be run on any OS where Python3 can run. Just do what to do.

Troubleshooting: If you have any problem installing Py-URL-Shortener on debian/ubuntu systems, please open an issue.