How to edit hosts file on mac?

Run terminal and open file with nano;

sudo nano /private/etc/hosts

To edit the file, you’ll add your own lines like:

When you’re done making changes, press Control-X to exit the editor, and Y to save.

Finally you may need to flush your DNS cache:

dscacheutil -flushcache

install php5-mcrypt ubuntu 14.04 (php-fpm)

I’m going to assume you already have nginx and php-fpm installed and running.

  1. php5-mcrypt should be installed already (it comes bundled with php5-fpm). Just for safety,
    apt-get install php5-mcrypt
  2. Create symlink to mods-avaliable,
    ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available/mcrypt.ini
  3. Enable it.
    php5enmod mcrypt
  4. Restart php-fpm,
    service php5-fpm restart
  5. Restart nginx,
    service nginx restart


Continue reading install php5-mcrypt ubuntu 14.04 (php-fpm)