Tags » Ubuntu/Linux

Linux: Using curl

curl -u johndoe:passwo0t https://myapp.com

Using Base64 Authentication Header
curl -X GET https://myapp.com \
-H "Authorization: Basic xxxxxxxxxxxxxxxxxxxx=="
..
Ubuntu/linux

Linux: Basic usage of rsync, scp, tar

Copy from local file to remote server using rsync

$ rsync -av -P myapp.tar.gz martian@202.x.x.x:~  #Assuming this server was set to DISALLOW PASSWORD Login
$ rsync -r -v --progress -e ssh user@remote-system:/address/to/remote/file /home/user/
... 29 more words
Ubuntu/linux

How to check the running ports or services

How to list running services

$ netstat -an|grep LISTEN
tcp   0   0 0.0.0.0:993      0.0.0.0:*     LISTEN
tcp   0   0 0.0.0.0:995      0.0.0.0:*     LISTEN
tcp   0   0 127.0.0.1:3306   0.0.0.0:*     LISTEN
tcp   0   0 0.0.0.0:110      0.0.0.0:*     LISTEN
tcp   0   0 0.0.0.0:143      0.0.0.0:*     LISTEN
tcp   0   0 0.0.0.0:2000     0.0.0.0:*     LISTEN
tcp   0   0 0.0.0.0:80       0.0.0.0:*     LISTEN
tcp   0   0 0.0.0.0:25       0.0.0.0:*     LISTEN
tcp   0   0 0.0.0.0:443      0.0.0.0:*     LISTEN
… 117 more words
Ubuntu/linux

How to install Redis on Centos 6

1) Install
// — Compiling —
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz
$ tar xzvf redis-2.8.3.tar.gz
$ cd redis-2.8.3
$ make
$ make install

2) Config
$ sudo nano /etc/sysctl.conf… 75 more words

Ubuntu/linux

Git: Permission denied (publickey)

If you encountered an error in Git that says “Permission denied (publickey)…” then you need to generate your SSH keys and add it to your Github account( 347 more words

Setup virtual host on Ubuntu Linux

Create Virtual Host Files
By default, Apache comes with a default virtual host file called 000-default.conf. We will copy the 000-default.conf file contents to our new virtual host files. 140 more words

Rails: An error occurred while installing rmagick in Ubuntu

Below is a sample build error in installing rmagick:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
    /home/artheman/.rbenv/versions/2.2.2/bin/ruby -r ./siteconf20150725-19726-fcbri2.rb extconf.rb
checking for gcc... yes
checking for Magick-config... 27 more words