Category Archives: Implementing Technology

Cleaning My Mac

I am trying to replace my computing devices (an iMac, a couple of MacBook Pros and a couple of Wintel laptops). Since this is the first time I will be giving my Mac devices to someone else – I really want to know:

  1. How to properly backup copy profiles / data from the old machines to the new
  2. How to completely clean the old hardware of all personal stuff

I am sure there will be some learning in this process, so this is where I will be documenting all that I learn.

– manzoor

MySQL Replication

Setting MySQL Master

  1. Modify my.cnf (usually located in /etc/mysql/my.cnf)
    1. Update bind-address entry from 127.0.0.1 to the regular IP
      • bind-address = 127.0.0.1
      • bind-address = 123.234.12.13
    2. Set server-id to 1
    3. Uncomment the line with log_bin
    4. Designate the database to be replicated on to the slave server
      • binlog_do_db = db_to_replicate
    5. Save my.cnf and restart mysql
  2. Grant privileges to the slave (mysql command line)
    • GRANT REPLICATION SLAVE ON *.* to ‘slave_user’@’%’ IDENTIFIED BY ‘password’;
    • FLUSH PRIVILEGES;
  3. ss

Setting MySQL Slave

  1. Modify my.cnf
    1. Set server-id to 2
    2. relay-log = /var/log/mysql/mysql-relate-bin.log (need to be added manually)
    3. log_bin = /var/log/mysql/mysql-bin.log
    4. binlog_do_db = <newdatabase>
  2. Set pw

– manzoor

Related Reading

Learn to “Program”

We will use “python”, “ruby” and “swift” as our “programming languages” to “Learn to Program”. Before we begin we will need to check if we have “python” / “ruby” / “swift” already installed on our system. We can do this by typing:

python

or

ruby

If they are NOT, we will need to install. If they are, we will need / want to check the version of “python”.

Once the version is verified, you will want to write your very first python / ruby script. Keeping with tradition, the very first program should be”

  1. Hello World

– manzoor

Related Links:

Internal:

External:

Web Programming in Python Links

Build-a-App

  1. Primary Goal / Objective – “Learn to Program” in Python. The emphasis is on “Programming” / “Software Development” and not on “Python”.
  2. Supporting Goal / Objective – Build and Make Available (publicly) an Application Desktop and Mobile (preferably native for both iOS and Android). The purpose of the supporting goal is to

To Learn:

  1. Programming (starting with Python, but the objective is to learn “Programming” not to learn to “Program in Python” ONLY)
  2. Modern Application – Mobile is definitely one of the objective
  3. Publish an App (in the App Store and Marketplace)

– manzoor

  • Python
  • CoffeeScript
  • JavaScript
  • Ruby
  • Ruby on Rails
  • HTML5
  • Java

External Links

Update / Upgrade Ubuntu to the “Next Release Version”

I am now trying to apply the steps to see if I can upgrade from any version of Ubuntu to the next release version. So far I have been able to successfully update from:

  • v11.10
  • v12.04

A couple of times I’ve had to run “dpkg –configure -a” (still trying to figure out what caused that need), but it has worked for the most part so far. My last test / trial is updating from v12.10 to v13.04.

Below is the process (list of steps) I am following (which is what I originally found when I needed to update from v12.04 to v12.10).

=====v12.04 to v12.10=====

Basically followed the post at Unixmen to upgrade my Lenovo ThinkPad to update / upgrade from v12.04 (Precise) to v12.10 (Quantal).

  • sudo apt-get update && sudo apt-get upgrade
  • sudo apt-get install update-manager-core
  • sudo do-release-upgrade -d

I have read reviews that Quantal is “slower” than “Precise”, but I’m not really so much looking for performance issues as compatibility. My Production servers are still running v10.04 and I need to get them up graded to something more recent.

Am expecting to require a re-boot – we’ll see.

Time needed so far – about an hour.

– manzoor

Apache httpd 2.2.3 vs 2.2.14

[May 9th ’13]

I happen to be working on a project that happens to be migrating from Apache httpd v2.2.3 running on CentOS to Apache httpd v2.2.14 running on Ubuntu

So far, the following are differences I have seen / observed:

  • ServerTokens – OS – DOES NOT EXIST
  • ServerRoot – /etc/httpd – /etc/apache2
  • PidFile – run/httpd.pid – ${APACHE_PID_FILE}
  • Timeout – 120 – 300
  • KeepAlive – Off – On
  • MaxKeepAliveRequests – 100 -100
  • KeepAliveTimeout – 15 -15
  • Listen – 80 – DOES NOT EXIST
  • TypesConfig – /etc/mime.types – DOES NOT EXIST
  • ServerSignature – On – DOES NOT EXIST
  • ScriptAlias /cgi-bin/ “/var/www/cgi-bin/” – DOES NOT EXIST

IfModule – quite diff – need to read / investigate

But these are not really the issue I am having to resolve, my main issue is with FastCGI on the 2 env.

To add more spice to all the above, the app I am working with is written in Lua (which does not have a lot of google solutions out there).

– manzoor