Support

Forums

Contact Me

Posts Tagged 'unix'

Unix

Unix (officially trademarked as UNIX, sometimes also written as Unix) is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, Michael Lesk and Joe Ossanna. [http://en.wikipedia.org/wiki/Unix]

Ubuntu 12.04 update nginx to the latest version

Official version of nginx for Ubuntu Precise is 1.1.19 but the latest available stable version is 1.2.2 (Changes), In this post I will present you how to update to the latest available version.

vi /etc/apt/sources.list

and add depending on your Ubuntu version either

For Ubuntu 10.04 Lucid:

deb http://nginx.org/packages/ubuntu/ lucid nginx
deb-src http://nginx.org/packages/ubuntu/ lucid nginx

For Ubuntu 12.04 Precise:

deb http://nginx.org/packages/ubuntu/ precise nginx
deb-src http://nginx.org/packages/ubuntu/ precise nginx

Now you can run

apt-get update

When using the public nginx repository for Ubuntu, you’ll get this error

W: GPG error: http://nginx.org lucid Release: The following signatures 
couldn't be verified because the public key is not available: NO_PUBKEY ABF5BD827BD9BF62

First of all this is only warning and you can ignore it, if you know what are you doing and in case you prefer to add public key, used for signing packages and repository, just run:

gpg -a --export 7BD9BF62 |  sudo apt-key add -

or

wget http://nginx.org/packages/keys/nginx_signing.key
cat nginx_signing.key | sudo apt-key add -

apt-get update should now run fine, however after running an

apt-get install nginx

you may still get this kind of error:

dpkg: error processing /var/cache/apt/archives/nginx_1.2.2-1~precise_amd64.deb (--unpack):
 trying to overwrite '/etc/logrotate.d/nginx', which is also in package nginx-common 1.1.19-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/nginx_1.2.2-1~precise_amd64.deb

just remove nginx-common and retry

apt-get remove nginx-common 

More at http://wiki.nginx.org/Install

The Alternative PHP Cache install

The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. It was conceived of to provide a free, open, and robust framework for caching and optimizing PHP intermediate code. from http://nl2.php.net/apc

Links:

Read more: The Alternative PHP Cache install

Some useful Unix/Linux Bash alias

tatice-linux-tux-10409

Some useful Bash Linux alias taken from my user profile. If you have a long command that you type frequently consider putting it in as an alias.

In computing, alias is a command in various command line interpreters (shells) such as Unix shells, 4DOS/4NT and Windows PowerShell, which enables a replacement of a word with another string. It is mainly used for abbreviating a system command, or for adding default arguments to a regularly used command. [WikiPedia]

Read more: Some useful Unix/Linux Bash alias

Useful Unix/Linux bash functions

tatice-linux-tux-10409

For day to day hacker, they may be more elegant ways to do it (PERL, AWK), but they have work well for me.

  • Upper case file name or variable,
  • Search and replace in all files content recursively,
  • Renaming all files recursively,
  • Renaming all directory recursively,
  • Copying a set of files from one directory to the other and preserving hierarchy.
Articles tagged

Read more: Useful Unix/Linux bash functions

Donations

Thank You for supporting my work