Apr
24
2009
0

How to Change the root Password in MySQL and Backup with mysqldump

I’m not DBA, but most Linux system administrators need to at least know a little about SQL. Like adding users, making simple databases, changing passwords, backups, etc… This article describes backing up a database to a fresh machine. In my case I happen to be backing up my wordpress blog. However these steps can applied to Sugar CRM, Joomla, or any database driven site that uses MySQL. The following tutorial does not completely cover backing up a wordpress blog; it only covers the database portion.  Which applies to many LAMP projects.  Enjoy!

The Goals of this Post:

– to remind myself how to backup databases

LAB: Backup WordPress Blog Database to new machine

I’m changing the default password of nothing to the same password as my root user. Please note that mysql ‘root’ user is not the same as Linux system root. Also, they can be different passwords and probably should.

[root@mattcom1 ~]# mysqladmin -u root password mynewpassword
[root@mattcom1 ~]# mysql -u root -p
Enter password:
[root@mattcom1 ~]#

Create a blank database on the machine we will repopulating.

Welcome to the MySQL monitor. Commands end with ; or \g
Your MySQL connection id is 10
Server version: 5.0.77 Source distribution

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql> create database savelono;

Use mysqldump command to back up the database on the original server. The database can be named anything, I usually back up to savelono.com with a ‘DATE-NAME.sql’ convention.

[root@savelono ~]# mysqldump -u root savelono > savelono-04-24-09.sql

Now copy your sql database to the new server and import it.

[root@mattcom1 ~]# mysql -u root -p -D savelono < savelono-04-24-09.sql

That’s it!  Piece of cake.

Apr
22
2009
0

Asterisk: Creating an Extension to Logout Agents from CallerID

I told a customer for the company I for that I would figure out how to logout agents by CID(Caller ID). So I figured, why not kill two birds with one stone. Today we will create a single Queue, Agent, and dial plan to accomplish this goal. I’m using Asterisk 1.4, Fedora 10 and a Polycom IP SIP phone for my demonstration purposes.

When I started this project four hours ago, I thought I would google my way to another successful blog post(and happy customer), but no…  logging out agents in Asterisk is very unintuitive.  The agentcallbacklogin utility has the exact same prompts for logging in as out.  AgentCallbackLogin (when initiated, from the dial plan)  asks for three things, agent, agent password, and call back number.  To eliminate all these prompts I’m using the ‘$CallerID(num)’ variable to automatically answer the agent and call back number.  So the user 8888 dials ‘1000’ and and AgentCallbackLogin assumes he is AGENT/8888 with a password of ‘8888’.

from /etc/asterisk/extensions.conf

exten => 1000,1,AgentcallbackLogin(${CALLERID(num)}||${CALLERID(num)}@savelono-queue-out)
exten => 1000,n,hangup

(more…)

Apr
21
2009
0

Obama Administration Appoints Former RIAA(Recording Industry Association of America) lawyers to Justice Department

CNET has an interesting article on Obama picks for the Justice Department.  I like the president and I totally expected some greedy special interest goons to get in, but why on one of the few issues I care about?  The problems with Intellectual Property law in the United States are many.

Years ago I was part of a major class action law suit to get back money from the Recording Industry.  Remember BMG CD music clubs?  Buy 7 CD’s for a $1 a pice if you buy so many CD’s at full price?  Well they got sued for price fixing… and lost.  Even though CD’s are extraordinarily cheap to produce as compared to Vinyl and cassette tapes, the cost of an album has quadrupled in my life time. Does that seem odd?  400 percent inflation?  I guess the Federal Reserve is more out of control than I thought!














Below is a couple excerpts from a CNET.com article.

The April 2 letter, signed by groups including Public Knowledge, the American Library Association, and the Consumer Electronics Association, said that, “To date, several of (Obama’s) appointees to positions that oversee the formulation and implementation of IP policy have, immediately prior to their appointments, represented the concentrated copyright industries.”

from the letter,

“We ask you to consider that individuals who support overly broad IP protection might favor established distribution models at the expense of technological innovators, creative artists, writers, musicians, filmmakers, and an increasingly participatory public,” the letter said. “Overzealous expansion and enforcement of copyright, for example, can quash innovative information technologies, the development and marketing of new and useful devices, and the creation of new works, as well as prohibit the public from accessing and using its cultural heritage.”

For the complete article on CNET click here.

The strategy of Media producers is to lock in top talent, commercialize the crap out of it and control the means of distribution by deciding the type of media it will be available on.  Like having the final decision whether to release a movie on DVD or HD-DVD.  It might cost the same in either format, but these greedy bastards screw the entire market place by deciding what media type should cost more or less. Supply and Demand should dictate

The truth is that the RIAA(Recording Industry of Association of America) has attempted to crack down with limited legal success for years. Attacking middle class families with limited knowledge of how to properly monitor their teenagers Internet use.  These threats and lawsuits and turn their own customers against them.  The funny thing is that even though piracy rates continue to rise, so has the profits of the Music and Movie Industry.

Apr
17
2009
0

Microsoft Works Hard to Protect Monoply – at Googles expense


I was reading Slashdot today and came across this post about Microsoft Family Safety Filter.  I wasn’t to surprised to read by this article:

“I saw that part of the brand new Windows Live package is the Family Safety Filter, so I decided to give it a spin. Turned it on, set it to ‘basic filtering’ (their lowest level), and went to Google … oops, it blocks Google! So I logged into the settings and added Google as an exception. Google still wouldn’t come up. Just in case, I turned off the family filter: voila, Google. As we all know, ‘Don’t be evil’ is not part of Microsoft’s motto! Oh yeah — and with the filter on, Microsoft’s own search engine, live.com comes up.”

To read the entire article click here.

I’m not one to buy in to conspiracy theories, but then again when 89% of all desktop computers are running the same Operating System it takes many less people to make a mistake, or even conjure up a devious plot. Don’t get me wrong, Microsoft make some good products, like Viseo for instance. I also like share point a lot.

Still that doesn’t make up for the rampant security holes(most recently conficker.c), back channel patent trolling, product delays or the price of a copy of Vista. All of these reasons are caused(or at least impacted) by protecting the Windows Monopoly. Most monopolies wreck havoc on a free market place. Microsoft has been sued repeatedly since the mid 90’s by the U.S. Attorney General, state and foreign governments. The complaints are that Microsoft are usually the same. Price fixing(via market share), effort to push proprietary software and communication standards, and bundling additional software with Windows to kill off the third party ISV competition.

The truth is though, that Windows OS is not the ‘bread and butter’ of profits.  Office is.  Someday, long after Balmer is gone, some brave executive in Redmond will come to the conclusion that ‘open standards and customer choice’, is the best long term business model.  Someday Microsoft will give up it’s Windows monopoly because they realize that competition will drive them to innovate over litigate.  The hundreds of billions in anti-trust settlements could go back to share holders and consumers.  Since Microsoft makes the most money on it’s office suite anyway, they could still potentially grow there revenues while loosing Operating System market share.  Some day.

Apr
15
2009
0

Fedora 10 and TVtime make gaming on your PC easy and affordable!

For a while I’ve been using a WinTV cable tv tuner card made by hauppauge. These cards are the best way to add TV/(console gaming) on the cheap.  WinTV cards are well supported by all major Operating Systems.  As of this writing you can only get HD tv tuner cards in the United States now, but I have an older card.  So I can’t personally vouch for the High Definition card drivers in Linux.  I’m guessing by now every major distro supports it.

My advice is to get the HD card if you can.  X-Box and PS3 are designed for HD TV’s, but in my example I’m showing Mario Kart on the Nintendo Wii.

Linux Installation is easy.  First check to see if Linux can see the device.

[matt@mattcom1 Desktop]$ lspci -vvv
07:01.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
Subsystem: Hauppauge computer works Inc. WinTV Series
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 32 (4000ns min, 10000ns max)
Interrupt: pin A routed to IRQ 22
Region 0: Memory at d2001000 (32-bit, prefetchable) [size=4K]
Capabilities: <access denied>
Kernel driver in use: bttv
Kernel modules: bttv
07:01.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)
Subsystem: Hauppauge computer works Inc. WinTV Series
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 32 (1000ns min, 63750ns max)
Interrupt: pin A routed to IRQ 22
Region 0: Memory at d2000000 (32-bit, prefetchable) [size=4K]
Capabilities: <access denied>
Kernel driver in use: Bt87x
Kernel modules: snd-bt87x

You should see a video and audio capture device, for my model it is Brooktree.  Use the package manager of your Linux(in my case Fedora 10 and yum) to install TV Time.  Now hook up your Wii and start TVtime Television Viewer.  From Gnome Panel: Applications -> Sound & Video -> TVtime Television Viewer.  It’s that easy.  Enjoy.  For more information on TVtime television viewer click here.

Apr
08
2009
2

Install Queuemetrics Call Center software for Asterisk on Fedora 10


What makes Asterisk so great is the growing ecosystem of 3rd party software.  For call centers based on Asterisk PBX, the best on the market is Queuemetrics.  This solution allows for over 150 different statistics to be collected.  Here is just a few:

Number of calls
Total call length
Average call length
Average call waiting
Number of unanswered calls
Average time before disconnection
Area code
Number of calls
Total calling time
Average time per call (for taken calls)
Average wait per call
Average position at disconnection (for lost calls)
Number of available agents
Total agent time
Average agent time
Minimum/ maximum agent session duration
Agent availability

If by now you are not convinced take a look at the complete list; you can check out Loway’s site and Queuemetrics here.  I have personally helped setup several commercial call centers(while working for VoiceIP Solutions) with this software and I am impressed at the value and support for our customers purchase.  So today we are going to set up a basic Queuemetrics installation; we will not be covering the Asterisk portion.  Nothing fancy here, but I can get you started.

The goal of this post:

– install Queuemetrics

(more…)

Apr
02
2009
5

How to configure a Polycom SoundPoint IP phone for Asterisk on Fedora 10

In my opinion the best IP business phones on the market are made by Polycom. Anyone that knows anything about the VoIP Industry knows that!  High quality Polycom desk phones combined with Asterisk are a great combination of quality/price. So to that end we’re doing this lab.

Polycom employs several methods of provisioning the SIP phones.  For general configuration Sound Point IP have an excellent built web GUI,  but for multiple phones Polycom has an XML based system as well.  Every Sound Point IP can be provisioned based on MAC address.  Polycom’s provisioning method makes use of TFTP, FTP, or HTTP to deliver firmware updates and individual phone settings.

The goals of this post:

– Configure FTP server for Polycom firmware and configuration

– Configure Asterisk SIP extension

– deploy firmware and XML configuration files to Polycom SoundPoint IP 501 SIP phone

(more…)