Below you will find pages that utilize the taxonomy term “Ubuntu”
Solving Python virtualenv “DistributionNotFound: distribute”
After upgrading my Ubuntu machine from 12.04 to 14.04 I had this error on virtualenv wrapper:
Monitoring Servers with Munin
This is a draft on configuring Munin to monitor services on a Linux machine, still dirty but published for my reference, if you have question let me know.
Protect your Server with Fail2Ban
Fail2ban is a program that scan your log files for any malicious behavior, and automatically block the offending IP.
Accelerating Postgres connections with PgBouncer
PgBouncer is a lightweight connection pooler for PostgreSQL, connection pooling makes Postgres connection much faster, which is important in Web applications.
Ubuntu new server checklist
These are the step I perform after installing new Ubuntu machine.
Backup Journey to rsnapshot
When I started producing backup worthy files (code, documents, projects, etc …), I realised the importance of backups after losing important files which happens to everybody. So I started my journey with backup solutions.
Backup generation 1: My first backup was simple directory copy operation, I copied my important directories to external floppy (then CD), and since it is manual operation I always forget about it and my backups was always old.
IPython Import Error
I tried to install IPython to play with it and learn more about scientific Python packages, but I faced an error on my first step:
Change Default Editor in Ubuntu
Just type:
sudo update-alternatives --config editor
Update Linux without a password
So you managed to login to your Ubuntu Linux machine with a password by using the magic of ssh keys, and you installed “apticron” to email you whenever their is a system update, you login to the system and issue the update command “sudo aptitude update” and “sudo” asks you about your password! not only it is annoying, it also can’t be automated, imaging you manage 10 servers and you have to type the password to update each machine! or you want to automate using some remote execution application like Fabric or Salt (I am Python fan, so I won’t mention Chef or Puppet here).
PostgreSQL: New Project Setup
For each new project that need PostgreSQL you should create its own user and its own DB, the following are the steps need for that.
Installation
$ sudo aptitude install postgresql
$ sudo aptitude install python-psycopg2 # For Django access
Require a Password
$ sudo vi /etc/postgresql/9.1/main/pg_hba.conf
:
#local all all peer
local all all md5
:
$ sudo service postgresql restart
Create Postgres User
$ sudo -u postgres createuser -P my_user
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n
Create DB
$ sudo -u postgres createdb my_db -O my_user
Test It
$ psql -U my_user my_db
After login you issue any SQL statement, you should also try the following commands:
PostgreSQL on Ubuntu from scratch
My notes on installing and configuring PostgreSQL on Ubuntu Linux.
PostgreSQL is used by many large web sites and services, including Skype, Reddit, Instagram, “.org” registerer, check longer list here Prominent Users
Best of all it isn’t owned by anyone, not Oracle nor anyone else!
Bash auto completion heaven
bash completion extends bash’s standard completion behavior to achieve complex command lines with just a few keystrokes. This project was conceived to produce programmable completion routines for the most common Linux/UNIX commands, reducing the amount of typing sysadmins and programmers need to do on a daily basis.
Just install:
sudo aptitude install bash-completion
Error when updating Ubuntu
Lately I migrated all of my server to Ubuntu server, what I really loved about it the easy of updating the system, all I need to is:
$ sudo aptitude update # to update packages meta data
$ sudo aptitude safe-upgrade # to perform the actual upgrade
But sometimes on of the package information meta data files get corrupted, and I will get this error:
$ sudo aptitude update
:
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used.GPG error: http://security.ubuntu.com hardy-security Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>
Wikipedia switch its infrastructure from RedHat to Ubuntu
It is a bit of old news but thought I would share in case you missed it.
Basically Wikipedia is switching 400 server from Redhat and Fedora mix to Ubuntu server.
Check the details in ComputerWorld article