notes, references

August 25, 2008

Linux hardware info

Filed under: Linux, ubuntu — karthik @ 2:20 pm
$sudo biosdecode
$sudo dmidecode
$sudo dmesg
$sudo cat /proc/cpuinfo
$sudo cat /proc/meminfo

Get Information About Your BIOS / Server Hardware From a Shell Without Opening Chassis ( BIOS Decoder )

July 17, 2008

uuidgen – to generate UUIDs

Filed under: Mac OS X, tools, utils, api, etc, ubuntu — Tags: — karthik @ 10:53 pm

on Mac OS X and linux, to generate UUID/GUID/CLSID use

$uuidgen

Windows/VC++ used to have a guidgen it probably still exists

April 3, 2008

VMWare Server on Ubuntu 7.0

Filed under: ubuntu, VMWare — karthik @ 6:32 pm

 VMWare server does not list ubuntu 7.0 as supported but I tried it and so far so good.

VMWare Server installation

  1. followed basic installations
  2. installed build-essential just in case since the install specified that it required gcc, etc
  3. installation went thru fine

VM management interface installation

  1. as per installation requires libdb; found in some forum and installed libdb3
    1. sudo apt-get install libdb3
  2. vmmui config.pl complained about httpd.vmware failing
  3. did a search and found in ubuntu forums (6.10) about using bash instead of sh and this worked
    1. rm -f /bin/sh; ln /bin/bash /bin/sh
  4. after fixing the shell it worked

AFter fixing the shell ran vmware-config.pl just in case since I was not sure what worked and not, after this tried /etc/init.d/http.vmware, worked fine.

Using VMWare server

  1. stupid me couldnt figure out how to start the console took some time for me to find out from the doc that  I have to run “$vmware &” to start the console.
  2. when this was done it poped-up a nice window to choose the host
  3. localhost brought up the page where there are options to create etc

(next is to try using it)

March 30, 2008

ubuntu install dev tools

Filed under: ubuntu — karthik @ 10:26 pm

to install basic tools like gcc, make etc, install build-essential

$sudo apt-get install build-essential

php, mysql, Joomla

Filed under: Apache, MySQL, PHP, ubuntu — Tags: , , , — karthik @ 5:20 pm

I was trying to install Joomla and the pre-requisites specified mod_mysql. I have installed the mysql component for php before but the mistake I did now was searching for mod_mysql all over to see how to enable it, all I had to do is just install mysql for php using any installation instruction out there on the web.

on ubuntu just used
$sudo apt-get install  php5-mysql

January 23, 2008

Apache with HTTPs on Ubuntu

Filed under: Apache, https, Linux, ssl, ubuntu — Tags: , , , , — karthik @ 11:03 pm

Apache with HTTPs

Basic idea
(https://help.ubuntu.com/community/forum/server/apache2/SSL)

  1. setup ssl ceritifcates
    1. you can use apache_ssl_certificate (some newer version of ubuntu are missing this, see below)
    2. $sudo apache2-ssl-certificate -days 365
  2. enable mod_ssl
    1. $sudo a2enmod
  3. Listen to port 443
    1. add ‘Listen 443′ to ports.conf (without the quotes)
  4. setup a apache site under sites-available
    1. make a copy the sites-available/default to sites-available/ssl
    2. modify available-sites/default
      1. NameVirtualHost *:80
      2. <virtualhost *:80>
    3. modify available-sites/ssl
      1. NameVirtualHost *:443
      2. <virtualhost *:443>
      3. SSLEngine On
      4. SLCertificateFile /etc/apache2/ssl/apache.pem
  5. enable the ssl site
    1. sudo a2ensite ssl
  6. setup rewrite rules for any of the pages that you want to be accessed always by ssl; include these rules in default site
    1. for example if you want your bugzilla page to go to https
    2. RewriteEngine on
    3. RewriteCond %{SERVER_PORT} ^80$
      RewriteRule ^/bugzilla(.*)$ https://%{SERVER_NAME}/bugzilla$1 [L,R]

Instructions

apache2-ssl-certifcate not found

  • the apache2-ssl-certificate and other reqd files are not found in Fiesty and some other distributions
  • the bug that discusses this is here https://bugs.launchpad.net/debian/+source/apache2/+bug/77675
  • they discuss what can be done and one of them suggests using steps given in mod ssl docs directly; the link for mod-ssl docs is below

Links from which info was compiled

  • https://help.ubuntu.com/community/forum/server/apache2/SSL
  • http://ubuntuforums.org/archive/index.php/t-4466.html
    • discusses apache and apache2; you can find apache2 if you scroll down
  • http://www.linode.com/wiki/index.php/Apache2_SSL_in_Ubuntu#Apache2_SSL
  • http://www.modssl.org/docs/2.8/ssl_faq.html#ToC28
    • mod ssl docs -lots of information; was mentioned in a ubuntu bug-report
  • http://httpd.apache.org/docs/2.0/ssl/ssl_howto.html

October 30, 2007

SugarCRM, Modules, curl, php ubuntu

Filed under: PHP, SugarCRM, ubuntu — karthik @ 6:50 am

When trying to use the Module Loader in SugarCRM there was this warning displayed
Please ensure that you have curl enabled.

I have SugarCRM on Ubuntu, there are different curl packages found one related to php: php5-curl

Installing this ($sudo apt-get install php5-curl) fixed this warning and gave access to the module loader.

July 12, 2007

apache modules enable, disable, list

Filed under: Apache, ubuntu — Tags: , — karthik @ 5:36 pm

i think this works on debian based systems

enable/disable modules
$a2enmod
$a2dismod

list modules
$apache2 -l (show compiled in modules)
$apache2 -t -D DUMP_MODULES (show all loaded modules)

http://www.debuntu.org/2006/06/15/66-how-to-enable-apache-modules-under-debian-based-system

June 11, 2007

development packages on ubuntu server

Filed under: ubuntu — karthik @ 7:42 pm

installing development packages on ubuntu server

$sudo apt-get install build-essential

(http://ubuntuforums.org/showthread.php?t=297)

May 23, 2007

unix – find files

Filed under: Linux, ubuntu, unix — karthik @ 5:47 pm
(most of the unix shell script have been taken from refs on the web andthe oreilly book unix-power-tools)
  1. Finding files that contains a particular word or string:
    1. $find . -name '*.css' -type f -print | xargs fgrep 'myParagraphStyle' /dev/null
    2. /dev/null – adding this makes grep print the match even if it just matches one file
    3. xargs – splits long set of arguments into chunks; this will prevent the command line exceeding any limits the command might have
    4. fgrep is same as ‘grep -F‘; this makes grep treat the search pattern as fixed strings separated by new lines any of which is to be matched
  2. Using what you find with exec
    1. $find . -name '*.css' -exec echo {} \;
    2. When not using xargs, -exec can be used to get find to execute a command on what it finds; the output of find can be given to another find command
    3. {} is a special argument that contains the name of the file – found by the find command
    4. Semicolon is used to indicate to find the end of the command that find has to execute; the semi-colon must be escaped either \; or ';' so all execs end with a semi-colon
    5. Example copying files
      $find /data/bkups/
      -name 'svn_2007-06-01.[0-9][0-9]'
      -exec sudo cp {}
      /media/bkupserver/svnbkups/svn_2007-06-01/ \;
  3. [placeholder]
Older Posts »

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.