Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

How to Download JDK in CentOS / RHEL and Auto Accept License Agreement

Recently as I was about to update a JDK on my Linux box (CentOS), the command wget couldn't get thru, it's receiving a 302 error. Browsing Oracle's download site, it has now a radio-button to accept / decline the License Agreement.

Here's a workaround to bypass that. Issue the following command (make sure you replace the correct version of the JDK you're downloading).


 wget --no-cookies --header "Cookie: gpw_e24=http%3A#2F#2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/7u5-b05/jdk-7u5-linux-x64.tar.gz"

Don't Judge Linux by its Cover

During my college years in the 90s, we were taught all about DOS (Disk Operating System). Typing commands from the console is fun, and I even love doing batch programming, but then Windows came and it appealed to many, because of its intuitive user interface. No doubt, Windows dominated the personal computers, and most of my programming careers were centered on Windows OS.

Recently Linux is fast becoming one of the well known OS, though it appealed mostly to techno savy users because it has no intuitive interface pleasing to the general public. It's just like DOS where you have to type every command at the console. It didn't caught much of the common users attention until a friendly GUI or Windows like interface have proliferated like Ubuntu, and CentOS to name a few.

Reverse Proxy Using Nginx to Serve Static Files Faster

Reverse Proxy
A proxy in common usage, is a stand-in for a web-browser. When a web browser requests access to a web resource, the web resource needs some idea of where it should send the answer. In reverse, the proxy stands-in for the web server. In such a case, the true location of the web server (whose content is being served) is hidden, from the standpoint of the client making the request.

The common solutions found on web is to point all traffic to NGINX and route traffic to APACHE if it's not static files, but with our case, we don't want to change the current configuration of existing APACHE installation and settings as much as possible. The safe technique will be used to serve static contents like images from another server using a much lighter web server application name NGINX. The rest of the page would remain served via APACHE.

I've done this prototype in 64 Bit Red Hat Linux, some command may vary in other Linux distro.

How to upgrade/install flash player for firefox in Linux (CentOS)

In CentOS Linux, if you're browsing a site and firefox requires you to upgrade the flash player, here's a general procedure how it's done.

  1. Click the download or flash player button to redirect you to adobe's flash player download page.
  2. Download the corresponding version, e.g 32 bit or 64 bit (usually saved by default on /tmp folder.
  3. Close firefox for now.
  4. From a console, go to the directory where you downloaded the flash player, named libflashplayer.so (/tmp in this sample).
  5. From /tmp folder type cp libflashplayer.so /home/jun/.mozilla/plugins (where jun is your linux username)
  6. Open firefox and your flash player should be working ok by now.