• Entries (RSS)
  • Comments (RSS)

To update or not to update?

Posted by | Posted in CentOS, Linux, Thoughts, Ubuntu | Posted on 09-01-2010

Tagged Under : , ,

All my technical life, I knew and followed this simple rule

New updates to any application or component are meant to improve and fix the bugs present in it. Downloading new updates ensures that you system is up-to-update, has fixes to all those bugs you have been getting annoyed with and more stable.

Unfortunately not every IT department thinks that, especially the one I am facing at work. According to them, the new updates should only be applied IF and only IF they offer some new functionality (duhh!). Hello! what happened to the bug-fixes that are promised with these updates?

Read the rest of this entry »

Installing / re-installing and Configuring phpMyAdmin on Ubuntu

Posted by | Posted in How to, Linux, OpenSource, PHP, Resources, Tips and Tricks, Tutorials, Ubuntu | Posted on 17-06-2009

Tagged Under : , , , , ,

phpMyAdmin is a very common and handy tool that most of the developers use. It is available on almost every server.

Installing phpMyAdmin on Ubuntu server is even easier, you just need to

sudo apt-get install phpmyadmin

but what if we accidently skip the configuration screen where phpmyadmin makes modifications to apache?

Dont worry just do the following

Edit Apache’s configuration file (assuming you are using apache2)

sudo nano /etc/apache2/apache2.conf
# better to use the following command instead of the one above
#gksudo gedit /etc/apache2/apache2.conf

Add the following line of code inside apache2.conf:

Include /etc/phpmyadmin/apache.conf

Now restart Apache:

sudo /etc/init.d/apache2 restart

Go to /phpmyadmin/ and login with your mysql username and password.

Installing MySQL 5.1 on Ubuntu

Posted by | Posted in How to, Linux, Tips and Tricks, Tutorials, Ubuntu | Posted on 01-05-2009

Tagged Under : , , , , , , ,

I wanted to use PARTITIONING introduced in MySQL 5.1 to handle some 2 Million records (and growing everyday) in a table. Ubuntu 8.10 does not have MySQL 5.1 available if you do apt-get the latest version available is 5.0

So this is what I did, its easy and this might help somebody.

nano /etc/apt/sources.list

I prefer nano editor but you can use any editor of your choice. Add these new lines at the end of the end of the file.

deb http://ppa.launchpad.net/monty/ubuntu gutsy main universe restricted multiverse
deb http://ppa.launchpad.net/smurf/ubuntu gutsy main universe restricted multiverse

(These packages were targeted for 7.10 so I will recommend using them and removing them from this list once you got the latest MySQL version)

Now run the following commands

apt-get update
apt-get upgrade

Note that you may need to do sudo prefix to these commands if you are using a non-root account. Now lets do the one last step, Installing MySQL 5.1

apt-get install mysql-server-5.1

Update: I have got another source to get even latest minor version of MySQL 5.1, just follow the above steps, then start over again and add following lines to “/etc/apt/sources.list” instead of the one above.

deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all

It worked for me on Ubuntu 8.10, im sure it will work for just any server version.

I am not a linux guru so if someone has a better option to upgrade to MySQL 5.1 or the latest version, please let me know.

Intall Apache, MySQL and PHP on Ubuntu – Part 2

Posted by | Posted in How to, Linux, PHP, Resources, Tips and Tricks, Tutorials, Ubuntu | Posted on 04-03-2009

Tagged Under : , , ,

Few weeks ago I wrote an article on how to setup Xampp package on Ubuntu. Today, I am revisiting this.

I came across a great article straight from the Ubuntu community, it is very simple, very strraight forward to setup Apache / MySQL and PHP on your Ubuntu box (server or desktop)

Read the article here.

Ubuntu: Setting default gateway / ip etc

Posted by | Posted in How to, Linux, Resources, Tips and Tricks, Tutorials, Ubuntu | Posted on 22-01-2009

Tagged Under : , , , , , , ,

If you want to specify a default gateway or ip address for your Ubuntu installation, try the following steps.

Open SSH and type this command

sudo nano /etc/network/interfaces

You can edit everything there as shown in the screenshot below (click to enlarge)

Ubuntu network interface

auto eth0
iface eth0 inet static
        address 192.168.1.231
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.77
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 192.168.1.253 192.168.1.226
        dns-search nextbridge.org

Using CPanel/WHM API to get detail list of all accounts

Posted by | Posted in How to, Linux, Resources, Tips and Tricks, Tutorials, Ubuntu | Posted on 15-01-2009

Tagged Under : , , , ,

Today I had this need to get a list of WHM Accounts using one of its APIs. I have never used it before but it was really simple to use. It returns an xml file that you can manipulate using your prefered language and store it in database for reporting etc.

Here is what you need to do, connect to your server using SSH and run the following command

wget http://your-server-ip:2086/xml-api/listaccts --http-user=myuser --http-password=mypass --output-document=listaccts.xml

Replace your-server-ip with your WHM’s ip and myuser/mypass with the actual WHM/CPanel password. The resultant xml file will be saved as “listaccts.xml” in the same directory as you ran the command in.

If you feel a bit insecure running these command over SSH then visit this page on your browser and save it as an xml file.

http://your-server-ip:2086/xml-api/listaccts

(again, substitute your-server-ip with the actual WHM ip address / FQDN)

Enjoy!

Intall Apache, MySQL and PHP on Ubuntu 8.10

Posted by | Posted in How to, Linux, OpenSource, Resources, Reviews, Tips and Tricks, Tutorials, Ubuntu | Posted on 09-01-2009

Tagged Under : , , , , , , , , , , , ,

WARNING: Please use this method to install Apache, PHP and MySQL because its more suitable for most of your needs and has options to auto-upgrade your installation. The following method is obsolete and not recommended.

After trying to install Apache, MySQL and PHP on Ubuntu 8.10 via several methods listed over the web. I opted for xampp package for linux.

It is as easy as ABC

Download the xampp linux package from their official website

wget http://nchc.dl.sourceforge.net/sourceforge/xampp/xampp-linux-1.7.tar.gz

(I have selected NCHC, Taiwan as the mirror to download this package, you may try another)

Extract the files

sudo tar xvfz xampp-linux-1.7.tar.gz -C /opt

Chmod the files to have nobody ownership

sudo chown -R nobody:root /opt/lampp/

Configure xampp security

sudo /opt/lampp/lampp security

Start xampp with this command

sudo /opt/lampp/lampp start

Stop xampp

sudo /opt/lampp/lampp stop

Restart xampp

sudo /opt/lampp/lampp restart

Login to ftp using the username nobody and the password that you have set up in the “xampp security”

To uninstall xampp

sudo rm -fr /opt/lampp

Enjoy!!

Download files from a http authenticated directory using wget

Posted by | Posted in How to, Linux, OpenSource, Resources, Thoughts, Tips and Tricks, Tutorials, Ubuntu | Posted on 08-01-2009

Tagged Under : , , , , ,

I wanted to download something off a sub-domain using wget that I have password protected using .htaccess
so the following command was NOT working

wget http://secure.asim.pk/myfiles.tar 

Luckily, we can pass two arguments to the same command and tell wget what the username and password is

wget http://secure.asim.pk/myfiles.tar --http-user=myuser --http-password=mypass 

Works Great!!

If you are using Ubuntu 8.10, have not enabled root user and trying to download to a directory that has “nobody” or “root” as owner then try pre-pending it with sudo

sudo wget http://secure.asim.pk/myfiles.tar --http-user=myuser --http-password=mypass 

How to Install Webmin in Ubuntu

Posted by | Posted in How to, Linux, OpenSource, Resources, Reviews, Tips and Tricks, Tutorials, Ubuntu | Posted on 08-01-2009

Tagged Under : , , , , , , , , ,

From the little help that I can get over the internet, I found out that you need to install the following packages to prepare the system for Webmin installation.

Run the following command over SSH or Ubuntu Desktop’s terminal window (Applications -> Accessories -> Terminal).

sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl 

(Learn how to configure SSH on Ubuntu 8.10 if you want to have a remote access to your Ubuntu box).

Download the latest version of Webmin by running the following command (visit webmin download section for newer versions)

wget http://ignum.dl.sourceforge.net/project/webadmin/webmin/1.500/webmin_1.500_all.deb 

Downloading Webmin
Downloading Webmin

After the package has been downloaded, run the following command to install it

sudo dpkg -i webmin_1.500_all.deb 

You should now be able to login to Webmin at the URL https://localhost:10000/ using root or any other user with sudo access.

Configuring SSH on Ubuntu 8.10

Posted by | Posted in How to, Linux, OpenSource, Resources, Tips and Tricks, Tutorials, Ubuntu | Posted on 08-01-2009

Tagged Under : , , , , ,

The first issue that I had after installing Ubuntu 8.10 was that I could not connect to SSH on it because SSH server is not installed on Ubuntu 8.10 and it never asked me if I wanted to make a selection of what software packages I need to have installed. I guess thats why they are making a less then 25 min install promise.

Here’s how you can enable / configure / install SSH on your Ubuntu 8.10
Open a terminal window by selecting the Applications menu and selecting Terminal from the Accessories menu. In the terminal window enter the following command and press enter to execute it

sudo apt-get install openssh-server

It will automatically download and install the SSH serve and configure it to run on port 22 (default port).

Ubuntu 8.10 SSH Access
Ubuntu 8.10 SSH Access

I will write another article to explain how you can change the port or enable / disable the SSH server.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes