ItecSoftware Logo

Run script on startup, shutdown or reboot on Ubuntu

startup script ubuntu

Isn’t there always a need to run some command or program at startup? It’s easy on Windows with it’s startup folder, but what about on a Linux server? What’s the proper method to run a script at startup on Ubuntu?

Linux has different run levels, each designating a different user group with certain permissions. Some are exclusive for system processes, while others are available to regular users and admins. The file containing startup commands and the one we look at in this example is update-rc.d.

Run script on startup on Ubuntu

You can use update-rc.d for start-only or stop-only scripts, following these steps:

Start ...

read more

Listed in Linux, Shell Scripting, Useful Stuff

Tags: runlevel, script, skeleton

Nginx and memcached module

nginx memcache

Memcache is traditionally used as a module inside server side scripts, such as PHP, ASP, ColdFusion and others. And it’s doing a terrific job, as long as it’s implemented correctly.

But if we look under the hood of the actual Memcache application, and I’m not talking about the PHP or ASP extension, but rather the executable that’s running as a daemon under Linux, it is a rather simple, database like application running in memory. Now there are two basic actions that need to be performed to use it, one is writing info into memcache, the other is reading it. In a ...

read more

Listed in Linux, MySQL, SEO, Shell Scripting, Useful Stuff, Web Development

Tags: apache, memcache, nginx, php

Exchange SSH keys and avoid logins and passwords

exchange ssh keys

If you’re working on remote systems, such as cloud instances or remote servers in a Linux environment, or as a system administrator or dba, changes are you’re often using ssh. Copying files between servers and workstations, creating database backups or using rsync to keep servers in sync are all tasks familiar to you.

I personally find it very annoying to always have to type in my login credentials. Not only is ...

read more

Listed in Linux, Shell Scripting

Tags: key, key exchange, login, pasword prompt, ssh

Shell Batch Script to Loop through Files

batch script to loop through files

Another quick example of a tool belonging in an administrators toolbox. In our multi server hosting environment, we’re often in need for an automated, administrative command line task, and here is one to write a batch script to loop through files in the current directory and perform some actions on them.

Really, nothing is much simpler than that once we know how to it, it’s just that most administrators or developers don’t ...

read more

Listed in Linux, Shell Scripting

Tags: bash, scripting, shell

MySQL Insert If Not Exists

mysql insert if not exists

INSERT IGNORE is the syntax for something equivalent for MySQL INSERT IF NOT EXISTS. There is really no direct command matching the SQL Server version as outlined in this articles title, at least not in the current release of MySql.

The statement INSERT IGNORE and to some extent REPLACE INTO, do essentially the same thing, inserting a record if that given record does not exists.

MySQL insert if not exists

Let’s consider the ...

read more

Listed in Linux, MySQL, Web Development

Tags: insert if not exists, lamp, MySQL, replace into

Create ISO from CD or DVD in ubuntu


Newer laptops and some PC’s are now shipping without CD drives these days. And operating systems are more capable of handling ISO images and mount them as drives, creating an easy way to mimic CD drives or isolated drives.

But how do we extract data from a CD and then create ISO from CD? An ISO image that can be mounted in Ubuntu or any other Linux distro? What about extracting ...

read more

Listed in Linux, Useful Stuff

Tags: cd, dvd, extract, iso, rip

Website Tuning – Speed up your web pages

website tuning

Ever wonder why some sites take forever to load while others appear in a snap? Let alone the associated user experience. It’s just more fun browsing a site that loads fast. And since Google now rates Adsense weight by load times, it makes more sense than ever to ensure that our pages load as fast as possible.

Especially with high performance websites, page load times are of highest concern. Not only ...

read more

Listed in Web Development

Tags: adsense, firebug, page load, site tuning, yslow

How to Improve Website Traffic

improve website traffic

There are several ways to generate and improve website traffic for your site. Some of them are rather simple and easy to do, others take a bit more effort and there are a few thing you really want to avoid.

But as a general rule of thumb, create content that you would like to ready and engage with yourself, and you’re far ahead. Then go thru the list of steps to ...

read more

Listed in SEO

Tags: google, keywords, search, SEO, traffic, web site

Useful tips about SEO for images

seo for images

Images are often ignored when it comes to SEO, despite the fact that every major search engine has it’s own search domain for images. Paying a little more attention to naming scheme and additional tags inside the image tag can make a big difference in SEO for images, and therefore search referred traffic.

Handling images when writing articles for your site should be as carefully considered as the content itself. After ...

read more

Listed in SEO

Tags: google, search, SEO, traffic

Sync Outlook with Google Calendar

sync outlook with google calendar

In corporate America, Microsoft Office is still embedded deeply and with it is Outlook as the primary communication tool. For many of us, this means to either use Outlook wherever we can, at work, home or mobile.  Or we can try to work around the boundaries of Outlook messaging, like sync Outlook with Google Calendar for example.

One of the major hurdles for people to move away from Windows is the ...

read more

Listed in Useful Stuff

Tags: evolution, exchange, firebird, outlook, sync