Join our Discussion Boards - Here

Start Services Automatically on Centos Using the Command Line

Replace mysqld with the name of the service you want to stop.

service mysqld start service mysqld stop

If you want to start them automatically;

chkconfig [name] on chkconfig [name] off

For example;

chkconfig mysqld on chkconfig mysqld off

How do I find out if I am running 64bit or 32bit Centos?

Sometimes you can’t remember if you installed 64bit or 32bit centos, to find out which version you are using;

uname -a

And you will get a response like

[root@monitor zenoss]# uname -a xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx i686 i686 i386 GNU/Linux

How Do I Find Which Version of Centos I Am Running?

Sometimes you install a centos machines ages ago and can’t remember what you installed. If you want to find out which version it is, easy

tail /etc/redhat-release

This will return something like;

[root@]# tail /etc/redhat-release CentOS release 5.2 (Final)

Upgrade from zenoss 2.5.2 stack installer to zenoss 3.0 on Centos

Instructions from http://nchc.dl.sourceforge.net/project/zenoss/Documentation/zenoss-3.0.x-docs/zendocs-3.0.0/Zenoss_Core_Installation_04-072010-3.0-v01.pdf

Get the ZenPacks.zenoss.PreUpgrade30-1.0-py2.4.egg

wget http://downloads.sourceforge.net/project/zenoss/zenpacks-3.0%20%28Latest%20Stable%29/zenpacks-3.0.0/ZenPacks.zenoss.PreUpgrade30-1.0-py2.4.egg?use_mirror=nchc&ts=1279596576

Change the permissions

chown zenoss.zenoss ZenPacks.zenoss.PreUpgrade30-1.0-py2.4.egg chmod 777 ZenPacks.zenoss.PreUpgrade30-1.0-py2.4.egg Become the zenoss user

su zenoss

Run the install

zenpack –install ZenPacks.zenoss.PreUpgrade30-1.0-py2.4.egg

Restart zopectl

zopectl stop zopectl start

Start the zencatalog

zencatalog start

Check that is working.

tail -f $ZENHOME/log/zencatalog.log

You must wait for the catalog . . . → Read More: Upgrade from zenoss 2.5.2 stack installer to zenoss 3.0 on Centos

How To Install IonCube Loader on Centos

Go to http://www.ioncube.com/loaders.php

Download

wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz

tar xvfz ioncube_loaders_lin_x86.tar.gz

tar xvfz ioncube_loaders_lin_x86.tar.gz

cd ioncube

Copy loader-wizard.php to location you can access on a web browser.

I then get told that there is an updated script so I down load the latest and update it.

wget http://www.ioncube.com/loader-wizard/loader-wizard.tgz

tar xvfz loader-wizard.tgz

cp this file to a . . . → Read More: How To Install IonCube Loader on Centos

How To Turn Off Overwrite Request on when you copy in Centos

When copying a folder in centos, it interactively asks if you want to overwrite a file, the -f flag does not work.  Simple solution, use \cp.

How to Find Large Files using Linux Command Line

find / -type f -size +20000k -exec ls -lh {} \; | awk ‘{ print $9 “: ” $5 }’

or

find / -type f -size +20000k -exec ls -lh {} \; | awk ‘{ print $9 “: ” $5 }’ > filelist.txt

To put the results in a text file.

Found here, . . . → Read More: How to Find Large Files using Linux Command Line

Great Site For Scripting and Command Line

Twitter is a cool way to find great resources.  Shell fu is following me so I checked out their site, sounded good.  Great resource, lots of useful  and advanced shell scripts and command line tips.

Check it out at http://www.shell-fu.org/

Follow me on twitter at http://www.twitter.com/howtolinux

Follow shell-fu on twitter at http://twitter.com/shellfu