Category: Code or Hosting

  • Emailing output comand line

    I recently had to prove the update status of apache as part of a PCI scan, and the best method for obtaining the output, was to email it to myself, like so rpm -q –changelog httpd | mail -s “Subject” user@example.com This makes it much easier to review and handle large outputs without having to…

  • Dealing with rogue spam scripts in perl running in system memory.

    I have a few tools I use to deal with the scripts, first I want to see if there are any perl scripts running: ps aux | grep .pl | grep -v grep Then I can kill them: kill `ps aux | grep .pl | grep -v grep | awk ‘{print $2}’` Sometimes with the…

  • How to Install and Configure cPanel

    ::Installation:: 1 Run the following command to check if Apache, PHP, MySQL, Bind or Cyrus are pre-installed by the OS: rpm -qa | egrep ‘(http)|(php)|(cyrus)|(mysql)|(bind-utils)’ 2 If any are installed they can cause issues with installing cPanel, although I have seen cPanel attempt to import settings. I would rather remove them: yum remove http* yum…

  • Upgrading VMWare tools on RHEL and CENTOS VM’s

    vmware-tools-upgrader -p “–default” Or, for VM’s running cPanel (keep in mind you need to mount the installer first, choose the interactive installer option): cd /mnt mkdir cdrom mount /dev/cdrom ./cdrom ls cdrom cp cdrom/VMwareTools*.tar.gz / umount cdrom rmdir cdrom cd / tar -xvzf VMwareTools*.tar.gz cd vmware-tools-distrib/ $(which perl) vmware-install.pl Once you get through the install:…

  • Tracing Emails and You!

    -Email headers: In an e-mail, the text (body) is preceded by header lines indicating sender, recipient, subject, sending time stamp, receiving time stamps of all intermediate and the final mail transfer agents, and much more. (See RFC 5322 for details.) Email headers are the life blood when tracking an email. You cannot locate the sender…

  • Non Standard Email Headers Key

    Non Standard Headers Key: Header Name System that added it X-pstn* Postini X-SmarterMail* SmarterMail X-NAS* Norton Anti-Spam X-MSMail* Microsoft Outlook X-Barracuda* Barracuda Filtering Server X-TM-AS* ScanMail™ Suite for Microsoft™ Exchange X-AOL* America On Line (AOL) X-Antivirus* Avast! X-MD* MDaemon® Email Server X-AntiAbuse* Exim and sometimes PHP mail scripts X-YMail* Yahoo Mail x-job* ExactTarget Email Marketing…

  • WordPress URL change directly in MySQL

    If you need to change the URL for a WordPress blog, and only have access via MySQL, you can use the following command, once you have selected the database.  Keep in mind I am assuming the wp_ table prefix. UPDATE wp_options SET option_value=’http://www.example.com/’ WHERE option_name=’siteurl’ or option_name=’home’;  

  • Plesk Default credentials

    Because I always forget, the user is ‘admin’ sans quotes and the password is ‘setup’ sans quotes.  And I change them immediately.

  • Microsoft DNS Server, MMC could not create the snap-in

    I had to upgrade adminpak.msi and could then move forward,  Installers found here: 32 bit: http://www.microsoft.com/downloads/details.aspx?FamilyId=86B71A4F-4122-44AF-BE79-3F101E533D95&displaylang=en 64 bit: http://www.microsoft.com/downloads/details.aspx?FamilyId=514BD06E-F3BC-4054-8429-C49F51E2190B&displaylang=en

  • sudo: must be setuid root

    to fix: when logged in as root, run this: chmod 4111 $(which sudo)