CentOS as root “command not found”

If you SSH to CentOS as a regular user and then “su” to root, there are many commands that will tell you “command not found”
For example,
# chkconfig vsftpd on
bash: chkconfig: command not found

To resolve this, enter the root’s shell by entering
su –
Then those important commands no longer return “command not found”
Simple, no?

Posted in Uncategorized | Leave a comment

Install vsftpd in CentOS

To install vsftpd in CentOS using yum simply do as root:
yum install vsftpd

To set it to turn on after a reboot:
chkconfig vsftpd on

To set up vsftpd NAT’d behind a firewall use this option in vsftpd.conf: (replace ‘10.20.30.40’ with your actual public ip address)
pasv_address=10.20.30.40

To limit the ephemeral range, use these options in vsftpd.conf:
pasv_min_port=61335
pasv_max_port=65535

Posted in Uncategorized | Leave a comment

Second ip address on same interface CentOS 6.3

I tried to add a second LAN addresses in CentOS 6.3 on a brand new install and it’s not working. I installed a new copy of CentOS 5.7 and tried the same and it worked right away.

Reason: NetworkManager is interfering with the settings.

Add the following to your interface configuration file for both the eth0 and eth0:0 devices to disable NetworkManager for this NIC.

NM_CONTROLLED=no

Posted in Uncategorized | Leave a comment

Does netqmail-1.06 already include badmailfrom wildcard?

If you want to block all ‘.info’ domains on a server running netqmail-1.06

I can confirm the badmailfrom wildcard functionality is not included in netqmail-1.06

Use the badmailfrom-wildcard patch http://tomclegg.net/qmail-bmf-wildcard
even though it makes no mention of netqmail-1.06, it works.

Saved below for posterity;

If (like me) you’re getting lots of unreturnable spam from addresses like “opt-in@mtsopt21.email-info.net”, you want “.email-info.net” in controls/badmailfrom.

Without this patch, you would have to list “@mtsopt21.email-info.net”, “@mtsopt22.email-info.net”, etc. separately.

To install:

cd /src/qmail-1.03
wget http://www.omniweb.com/wordpress/wp-content/uploads/patch-qmail-badmailfrom-wildcard
patch < patch-qmail-badmailfrom-wildcard make qmail-smtpd install -m 755 qmail-smtpd /var/qmail/bin/qmail-smtpd To refuse mail from any sender which ends with ".example.com": echo ".example.com" >>/var/qmail/control/badmailfrom
You will still accept mail from foo@example.com unless you add “@example.com” as well:

echo “@example.com” >>/var/qmail/control/badmailfrom
The wildcard does not apply to the sender’s local part. “.spam@example.com” will not block mail from example-spam@example.com. It will only block “.spam@example.com” which is probably not what you want.

Posted in Uncategorized | Leave a comment

Drupal 6: Change number of “Recent Comments” in Sidebar

As per this post here https://drupal.org/node/15635#comment-3916370
Change the ’10’ to a ‘5’ or what have you, in the file /modules/blog/blog.module

Posted in Uncategorized | Leave a comment

Setting up TEMPer USB thermometer on CentOS

We recently ordered one of these TEMPer USB thermometers. Ours says it’s v1.4. There is a lot of different software and instructions floating around online for these TEMPer devices. Eventually one of the programs I downloaded (temper-1.0) reported that the thermometer shows up as: Found device: 0c45:7401
Searching on that brought me to the software I needed, thanks to this blog
I found the download link:
http://momtchil.momtchev.com/files/pcsensor-1.0.0-multi.tgz
This included the file 99-tempsensor.rules which has the correct designation for this device, ATTRS{idVendor}==”0c45″, ATTRS{idProduct}==”7401″

# download software:
wget http://momtchil.momtchev.com/files/pcsensor-1.0.0-multi.tgz
# unzip
tar -zxvf pcsensor-1.0.0-multi.tgz
cd pcsensor-1.0.0
# copy the rules file to the udev folder
cp 99-tempsensor.rules /etc/udev/rules.d/
# restart udev
/sbin/start_udev
# install source, first clean up earlier attempts
make clean
make
# now the program works
./pcsensor

here is the output: 2013/06/21 10:32:07 Temperature 72.39F 22.44C

Posted in Uncategorized | Leave a comment

installing DBD::mysql on Ubuntu

Trying to install DBD::mysql with CPAN on ubuntu and the install was failing.
Finally found the needed package:
sudo apt-get install libmysqlclient-dev

After that, DBD::mysql installs from CPAN

Posted in Uncategorized | Leave a comment

Corporate Colocation Reviews

Reviews of the Los Angeles datacenter Corporate Colocation. Here users may describe their experience with Corporate Colocation.

Posted in Uncategorized | 1 Comment

Fatal error: Class ‘Ingo_Basic_Blacklist’ not found

On the latest installation of horde webmail (5.1.0 beta3), I’m not able to edit my user preferences.

I found the solution here; find and edit the file: ingo/lib/Api.php,
replace line 56:
return array(
with:
global $registry;

$pushed = $registry->pushApp('ingo');

$links = array(

hmm it still does not seem to save the email preferences… tried a similar edit on the imp/Api.php but still not saving prefs… grrr

Posted in Uncategorized | Leave a comment

Updating horde

this is frustrating; maybe it doesn’t work on PHP 5.4 ?

downloading ssh2-0.12.tgz …
Starting to download ssh2-0.12.tgz (26,223 bytes)
………done: 26,223 bytes
ERROR: pecl.php.net/ssh2 not installed
[root@vraid3 src]# pecl install ssh2 channel://pecl.php.net/ssh2-0.12
Ignoring installed package pecl/ssh2
Ignoring installed package pecl/ssh2
Nothing to install

uninstalled everything, reinstalled everything, the only thing in the horde folder is the js folder. I still see this “ERROR: pecl.php.net/ssh2 not installed”. Going in circles now.

Update: Following the CentOS instructions for ssh2 here worked, with the added caveat that I had to copy the generated ssh2.so to my existing extensions folder. Then I was able to run the horde installation command successfully; pear install -a -B horde/horde-beta

CentOS 6.2 64bit Installation Steps:

1. download the libssh2 package from http://libssh2.org, command as following:
tar vxzf libssh2-1.4.2.tar.gz
cd libssh2-1.4.2
./configure
make
make install

2. download the php-ssh2 package from http://pecl.php.net/package/ssh2:

tar vxzf ssh2-0.11.3
cd ssh2-0.11.3
phpize
./configure –with-ssh2
make
make install

and the ssh2.so file will copy into /usr/lib64/php/modules
check it.

3. modify the php.ini

vi /etc/php.ini

add the “extension=ssh2.so” to the extension part of php.ini

Posted in Uncategorized | Leave a comment