Category: Linux

  • Install ffmpeg from source on Ubuntu

    This tutorial is designed for a headless server, and does not install anything related to `X11`. These instructions assume that you have escalated to root (`sudo su`), and have been tested with Ubuntu 12.04, 12.10, & 13.04. =Initial Installation= # Remove old `ffmpeg`, `x264`, and `avconv` {{{ apt-get remove -y ffmpeg x264 libav-tools yasm &&…

  • Install scipy for python 2.7 in Ubuntu

    Surprisingly the `scipy` package was not as straightforward of an installation as most Python modules; this tutorial will walk you through that process. # The first step is to download `easy_install`, and the libraries required for `scipy` {{{ lang=bash sudo apt-get install python-setuptools liblapack-dev libblas-dev }}} # Use `easy_install` to install `scipy` and other required…

  • Add EPEL Repository to CentOS

    The [[http://fedoraproject.org/wiki/EPEL|EPEL]] repository contains quite a few useful packages for CentOS. Below are the steps to add this repository to your system: {{{ wget http://mirror.pnl.gov/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -i epel-release-6-8.noarch.rpm rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 }}}

  • Install/Configure PPTP Client (RHEL/CentOS/Ubuntu)

    Install PPTP Client Ubuntu/Debian {{{ sudo apt-get install pptp-linux }}} RHEL/CentOS/Fedora {{{ sudo yum install pptp }}} Modify chap-secrets `/etc/ppp/chap-secrets` and add the below line (replacing variables) {{{ $USERNAME PPTP $PASSWORD * }}} Create a config file named `vpn.domain.com` in the directory `/etc/ppp/peers`, and add (replacing variables) {{{ pty “pptp $VPN_SERVER –nolaunchpppd” name $USERNAME remotename…

  • Set up Subversion with SSH (svn+ssh)

    [[[TOC]]] =Setup SVN Server= Install Subversion Red Hat/CentOS/Fedora {{{ lang=bash sudo yum install subversion }}} Debian Based (Ubuntu) {{{ lang=bash sudo apt-get install subversion }}} Create a repository {{{ lang=bash sudo mkdir /data01/svn sudo mkdir /data01/svn/repos sudo svnadmin create /data01/svn/repos/new_repo }}} Create an SVN group (add whichever users you would like to it) {{{ lang=bash…

  • Enumerate Processes Programmatically In Linux

    Using `ps` is not necessarily the best way to enumerate running applications programmatically. This is because it will gather additional information that we do not actually need in most cases. The below examples illustrate how to enumerate running applications by reading the contents of `/proc`. **Python:** {{{ lang=python line=1 def get_procs(proc_name=None): ## Loop over /proc…

  • Start a script on boot – Ubuntu 12.04

    Use the below procedure to start a script on boot: {{{ lang=bash sudo mv /filename /etc/init.d/ sudo chmod +x /etc/init.d/filename sudo update-rc.d filename defaults }}}

  • Adding HTML Emails To Trac 1.0.1

    [[[TOC]]] ——- =Intro= Below is a patch to add HTML Emails to Trac and below that is a sample template to generate a nice looking email. The completed file can be located [[file:notification.zip|Here]] and should be placed in `trac/ticket/notification.py`. This patch has been tested with [[http://trac.edgewall.org/|Trac 1.0.1dev-r11400]]. Because we will be mucking with Trac’s source,…

  • Expanding A Linux Filesystem

    [[[TOC]]] ———- = Expand the Partition/Logical Volume = * **LVM (Ideal Method)** {{{ vgextend LogicalVolume /dev/sdd #< Add /dev/sdd to volume group lvextend -l +100%FREE /dev/VolumeGroup/LogicalVolume #< Fill free space }}} * **Partitions (Through parted)** ** Open parted {{{ parted /dev/sdd #< Sub /dev/sdd for your HDD location }}} ** Display in sectors {{{ unit…

  • Setup Trac w/ multiple projects, mod_wsgi, LDAP & MySQL – Ubuntu 12.10

    [[[TOC]]] —– = Installation = {{{ sudo apt-get install -y apache2 libapache2-mod-python python-setuptools python-genshi mysql-server python-mysqldb easy_install a2enmod #< Base Packages sudo apt-get install -y libapache2-mod-wsgi #< WSGI support sudo apt-get install -y subversion #< Subversion (not covering the config) sudo easy_install trac #< Trac }}} ------------ = Prep MySQL = * Log in {{{…