2/17/2009
How to flush DNS cache in Linux / Windows / Mac
To flush DNS cache in Microsoft Windows (Win XP, Win ME, Win 2000):-
- Start -> Run -> type cmd
- in command prompt, type ipconfig /flushdns
- Done! You Window DNS cache has just been flush.
To flush the DNS cache in Linux, restart the nscd daemon:-
- To restart the nscd daemon, type /etc/rc.d/init.d/nscd restart in your terminal
- Once you run the command your linux DNS cache will flush.
To flush the DNS cache in Mac OS X Leopard:-
- type lookupd -flushcache in your terminal to flush the DNS resolver cache.
ex: bash-2.05a$ lookupd -flushcache
- Once you run the command your DNS cache (in Mac OS X) will flush.
To flush the DNS cache in Mac OS X:-
- type dscacheutil -flushcache in your terminal to flush the DNS resolver cache.
ex: bash-2.05a$ dscacheutil -flushcache
- Once you run the command your DNS cache (in Mac OS X Leopard) will flush.
2/05/2009
WINE & QIP infinum
install Wine (i.e. yum install wine)
download QIP infinum (www.qip.ru)
run with such params: LANG=uk_UA.KOI8-U env WINEPREFIX="/home/
by bshyshka@
1/19/2009
PDNS & named
I’ve met strange problem. We have primary DNS server as pdns and slave dns as named. In /var/named/named.zone slave zones are correctly included, but there are no zone files in /var/named
How I fixed the problem:
1. restart named
2. run hspc-dns-sync.pl –all at server side
Finnaly I received all zone files in /var/named
Slow Helm
Some times we have such problem like: “ohh God my f** Helm goes crazy, it takes 2-5 mins to load page, bull shit, bad product”
So first of all I wanna say - Helm is good product, and you should check your server because it is the main problem :).
Ok lets talk about reasons of the problem:
1. your IIS very loaded.
how to check: run task manager > processes sort by mem and check how much memory w2wp.exe use.
fix: try to restart IIS (run > cmd > iisreset) and try to load Helm CP. If at the begining Helm loads fast and then again become slow, so congratulation you found the reason
2. MSSQL server use more than 1.5 Gb of mem.
how to check: same as in 1.
fix: restart MSSQL server and then steps as in 1. but I want to say that this fix usually temporary because MSSQL begins to “eat” mem very soon :(
3. you have 1 Gb memory installed
how to check: if you have more than 50 web sites running at your server, so you should have at least 2 Gb of mem installed at your server.
fix: add memory
4. You have more than 1000 web sites.
how to check: if its your server then you know how many sites running at your server
fix: there is no fix( in windows
recommendation: install Linux with apache and migrate sites with “Me and my dog” to Linux
5. Virus
How to check: run from liveCD any antivirus
Fix: clean the viruses
1/11/2009
How to Move Your Joomla! Site to a New Server
Things happen. Plans change. Websites outgrow current servers and need new servers. Hosting companies provide poor service, prompting a web master to decide to change servers. Whatever the reason, you might need to move your Joomla! installation from one server to another.
If you've been running a website for a while, you have probably already accumulated quite a bit of content and several 3rd party components and/or modules, and you do not want to start fresh with a new Joomla! installation. This article explains what I did to move HowToJoomla from my test server (howtojoomla.corywebb.com) to the server that it is on now.
Why not use a fresh install?
In my case, I probably could have. I only had about 4 or 5 articles on the test site, and I am using relatively few 3rd party CMT's (JomComment, TagBot, and JoomlaXplorer). But, I decided it would be easier just to move the installation I had to the new server, so I did.
You will want to move your Joomla! installation rather than re-install if you fit one or all of the following parameters:
- Your site has accumulated a large amount of data in the database over time (sections, categories, content items, contacts, newsfeeds, etc.).
- Your site uses multiple 3rd-part extensions already configured and/or customized for your site.
- You just feel like trying it out to see if you can do it.
Step 1: Backup everything!
The first thing you want to do is backup all files within your Joomla! installation. Create a folder on your local system, and download all files to that folder using your ftp client application. I used FileZilla as my ftp client application to download all of my files to a folder on my desktop I named "howtojoomla".
Step 2: Export your database
Note: For this step, it really helps if you have phpMyAdmin installed on your server. Most hosting companies have phpMyAdmin already installed. If you are unsure, ask your hosting provider.
The second thing you need to do is export your Joomla! database. The best thing to do is to export it into an SQL file, which makes importing it easier in a later step. An SQL file will contain all of the necessary SQL commands for creating your database tables and filling them with your data. Be sure you export the entire database.
Step 3: Modify configuration.php
This step is very important. Go to the folder on your local system to which you downloaded all of your Joomla! files. In the first level folder, you will find the file named "configuration.php". Open this file with a text editor and make the necessary changes. At the very least, you will probably need to change the following parameters:
- $mosConfig_absolute_path: This is the absolute server path to your new Joomla! installation. It will probably look something like "/path/to/joomla/installation".
- $mosConfig_cachepath: This is the absolute server path to the cache for your Joomla! installation. It will probably look something like "/path/to/joomla/installation/cache".
- $mosConfig_live_site: This is your website's url. It will be something like "http://www.yoursite.com".
- $mosConfig_host: This is the location of the server that hosts your MySQL database. For most instances, this value will be "localhost". If you are unsure, ask your hosting provider.
- $mosConfig_db: This is the name of your MySQL database.
- $mosConfig_user: This is the database user name. Make sure this user has all privileges on your database.
- $mosConfig_password: This is the password for your MySQL database user.
Step 4: Upload all of your files to your new server
Using an ftp client application (like FileZilla), upload all of your files to the location on your new server where you want to install Joomla!.
Step 5: Import your database to your new MySQL server
Using phpMyAdmin (or console commands if you are an advanced database administrator) and the SQL file you generated in step 2, import your old database into your new database.
Step 6: Test your new installation
Your move should now be complete, but please don't take my word for it. Test your site to make sure that everything is in it's proper place and working the way you expect it to. For example, if you did not use relative url's for your links on your old site, they will not work properly on your new site.
If you are uneasy or uncomfortable with this process, I strongly recommend that you hire a professional to do this for you.
Update: Another Resource
I just came across a resource called JoomlaCloner which automates much of this process for you. It has a commercial license, so unfortunately it is not free. The base price is $49.95 for 1 year support and upgrades. I have never used it, so I cannot speak for whether or not it is a good component. I just wanted to make you aware of it.
http://www.howtojoomla.net/content/view/17/2/
UPD: Additional for Joomla 1.5
Edit configuration.php
You have to tell Joomla to use the new database data. Open the configuration.php file on the new server, and edit the following variables to fit the new database and FTP settings:
var $log_path = 'yourfullserverpath/logs';
var $tmp_path = 'yourfullserverpath/tmp';
var $live_site = 'http://www.mysite.com';
var $ftp_host = '127.0.0.1';
var $ftp_port = '21';
var $ftp_user = 'myftpuser';
var $ftp_pass = 'myftppassword';
var $ftp_root = 'myftprootfolder';
var $host = 'mymysqlhost';
var $user = 'mysqluser';
var $db = 'mysqldatabasename';
var $password = 'mysqlpassword';
1/04/2009
Windows Live Writer
сабж оновився до реліз кандидата
– перше враження – бета мала симпатичніший інтерфейс
Nokia and Mac OS X 10.5.x
Щасливим власникам Мас mini інколи хочеться підключити свій телефон нокія до цього маленького чуда
Для нормальної роботи вам юуде мотрібно
і б) для тих хто юзає карти нокія Nokia Map Loader for Mac
Дерзайте
1/02/2009
Convert ape to mp3 in linux (Fedora)
використовувати ми будемо наступний скріпт:
ape2mp3
#!/bin/bash
echo "Brian's Archive CUE/FLAC Splitter v0.1"
echo "No sanity checking in place. Be careful."
if [ $# != 2 ]
then
echo ""
echo "Usage:"
echo " $0 cue_file ape_flac_file"
echo ""
exit 1
fi
#Get the filenames
cuefile=$1
flacfile=$2
#Other variables
tracks=$(cueprint -d '%N' "$cuefile")
#Get the filenames into an array
count=1
while [ $count -le $tracks ]
do
tracknames[$count]=$(cueprint -n$count -t '%p-%T-%02n-%t' "$cuefile"|sed -e s@/@,@g)
count=`expr $count + 1`
done
#Load up the ID3 tag info into variables for later use
id3count=1
while [ $id3count -le $tracks ]
do
artist[$id3count]=$(cueprint -n$id3count -t '%p' "$cuefile")
album[$id3count]=$(cueprint -n$id3count -t '%T' "$cuefile")
tracknum[$id3count]=$(cueprint -n$id3count -t '%02n' "$cuefile")
title[$id3count]=$(cueprint -n$id3count -t '%t' "$cuefile")
echo "Artist: ${artist[$id3count]}"
echo "Album: ${album[$id3count]}"
echo "Track No: ${tracknum[$id3count]}"
echo "Song Title: ${title[$id3count]}"
id3count=$[$id3count + 1]
done
#Output general file information
cueprint -d '%P - %T\n' "$cuefile"
echo "Total number of tracks: " $tracks
#Split this bitch
cuebreakpoints "$cuefile" | shntool split -a '' -n '%02d' -o wav "$flacfile"
#Convert those waves into mp3s
convertcount=1
while [ $convertcount -le $tracks ]
do
wavenum=`printf "%02d" $convertcount`
lame --add-id3v2 --noreplaygain -b 320 --ta "${artist[$convertcount]}" --tl "${album[$convertcount]}" --tn "${tracknum[$convertcount]}" --tt "${title[$convertcount]}" "$wavenum.wav" "${tracknames[$convertcount]}.mp3"
rm "$wavenum.wav"
convertcount=$[$convertcount + 1]
done
використання # ape2mp3 album.cue album.ape
для коректної роботи нам будуть потрібні наступні пакети
1. mac - http://moonshine.freshrpms.net/rpm.h
2. LAME - yum install lame (in fedora)
3. shorten - # rpm -ivh shorten-3.6.0-1.2.i386.rpm
4. shntool - # rpm -ivh shntool-3.0.6-1.i386.rpm
5. cuetools - # rpm -ivh cuetools-1.3.1-2.i386.rpm
12/23/2008
NOD32 uTorrent and Outpost Firewall Pro 2009
I had problem with heavy loaded CPU when I opened more than 2 instance of uTorrent, my Outpost gone crazy.
Deep investigation showed that all TCP and UDP traffic were passed NOD32.
Problem was fixed after I set up NOD32 not to check traffic.
12/04/2008
Install and Enable SNMP Service in Windows XP, Vista and 2003
SNMP (Simple Network Management Protocol) is an internet protocol used in network management systems to monitor network-attached devices such as computers, servers, routers, switches, gateways, wireless access points, VoIP phones, and etc. for conditions that warrant administrative attention. SNMP provides management data in the form of variables on the managed systems, which describe the system configuration parameter or current status value. These variables can then be read and queried (or sometimes set or write) by managing applications. Windows system running XP, Vista or 2003 does not turn on SNMP service by default, thus users need to manually install and enable SNMP service.
Note that you must be logged on as an administrator or a member of the Administrators group in order to complete this procedure. If your computer is connected to a network, network policy settings may also prevent you from completing this procedure.
How to Install and Enable the SNMP Service
- In Windows XP and Windows 2003, click Start button, then go to Control Panel and run Add or Remove Programs applet. On Add or Remove Programs dialog, click Add/Remove Windows Components to open Windows Components wizard.
In Windows Vista, click Start button, then go to Control Panel. Click on Programs link and then click on Turn Windows features on or off. If you’re prompted with User Account Control dialog, click “Continue”.
- In Components of Windows XP and 2003, click on the Management and Monitoring Tools (make sure that you do not select or clear, tick or untick its check box to change the existing selection), and then click Details.
In Windows Features of Vista, locate SNMP feature.
- Select and tick the check box of Simple Network Management Protocol or SNMP feature.
- Click OK. Also click Next if you’re in Windows XP or 2003. SNMP service will be installed on the system. You may require to insert the Windows setup CD/DVD disc into optical drive.
- SNMP will start automatically after installation. But it’s recommended to verify the service status from Services in Control Panel, and if it’s stopped, you can start the SNMP service from there.
Two new services will be created:
- SNMP Service which is the main engine with agents that monitor the activity in the network devices and report the information to the monitoring console workstation.
- SNMP Trap Service which receives trap messages generated by local or remote SNMP agents and forwards the messages to SNMP management programs running on this computer.
Windows doesn’t assign any community string to the SNMP service by default, and also only allow access from localhost or local devices. Further configuration is needed to add in desired community string, which act as the password to grant reply to any SNMP request from remote system.
How to Configure SNMP Service (Add “public” community string)
- Click on Start button, then go to Control Panel.
- In Windows Vista, click on System and Maintenance link.
- Open Adminstrative Tools.
- Run Services applet.
- Locate and right click on SNMP Service, then select Properties.
- In SNMP Service Properties window, click on Traps tab.
- In the “Community name” text box, enter public or any other case-sensitive SNMP community name to which this computer will send trap messages.
- Click on Add to list button.
How to Configure Security for SNMP Service for a Community
- Continue from above steps, click on Security tab. If you already close SNMP Service Properties window, re-open it.
- Under “Accepted community names” section, click Add button.
- Select the appropriate permission level for the community string in the “Community Rights” drop down list to specify how the host processes SNMP requests from the selected community. Normally READ ONLY is recommended.
- In the “Community Name” box, type public or any case-sensitive community name that you want.
- Click on Add button.
- In order for the SNMP service to accept and receive SNMP request packets from any host on the network, including external remote host regardless of identity, click Accept SNMP packets from any host.
To limit the acceptance of SNMP packets, click Accept SNMP packets from these hosts, and then click Add, and then type the appropriate host name, IP or IPX address in the Host name, IP or IPX address box. You can restrict the access to local host or limited servers only by using this setting. Finish off by clicking Add button again.
- Click OK when done. Note that you may need to reboot for the settings to take effect.