Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Aug 15, 2012

DNS in Ubuntu 12.04

http://www.stgraber.org/2012/02/24/dns-in-ubuntu-12-04/

Any change manually done to /etc/resolv.conf will be lost

Resolvconf has a /etc/resolvconf/resolv.conf.d/ directory that can contain “base”, “head”, “original” and “tail” files. All in resolv.conf format.
  • base: Used when no other data can be found 
  • head: Used for the header of resolv.conf, can be used to ensure a DNS server is always the first one in the list 
  • original: Just a backup of your resolv.conf at the time of resolvconf installation 
  • tail: Any entry in tail is appended at the end of the resulting resolv.conf. In some cases, upgrading from a previous Ubuntu release, will make tail a symlink to original (when we think you manually modified resolv.conf in the past) 
nm-tool” can be used to get information about your existing connections in Network Manager. It’s roughly the same data you’d get in the GUI “connection information”.

Alternatively, you can also read dnsmasq’s configuration from /run/nm-dns-dnsmasq.conf

sudo restart network-manager

Feb 3, 2012

PIL with JPEG, ZLIB, FREETYPE2, LITTLECMS support in virtualenv on Ubuntu 11.10

To enable JPEG and PNG support install:
sudo apt-get install libjpeg8 libjpeg8-dev
sudo apt-get install zlib1g-dev
sudo apt-get install libfreetype6 libfreetype6-dev
sudo apt-get install liblcms1 liblcms1-dev
On x64 system symlink libraries:
sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib/
sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/
sudo ln -s /usr/lib/x86_64-linux-gnu/liblcms.so /usr/lib
cd /usr/include
ln -s freetype2 freetype
And finally in your virtualenv:
pip install PIL
You should see somethings like this during installation:
    PIL 1.1.7 SETUP SUMMARY
    --------------------------------------------------------------------
    version       1.1.7
    platform      linux2 2.6.7 (r267:88850, Aug 11 2011, 12:18:09)
                  [GCC 4.6.1]
    --------------------------------------------------------------------
    *** TKINTER support not available
    --- JPEG support available
    --- ZLIB (PNG/ZIP) support available
    --- FREETYPE2 support available
    --- LITTLECMS support available
    --------------------------------------------------------------------

To check, for example jpeg support, execute:
python -vvv -c "import _imaging" 2>&1 | grep jpeg
Should output:
#   clear[2] jpeg_encoder
#   clear[2] jpeg_decoder
#   clear[2] jpeglib_version