12/02/2009

command line pass generator

#tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 10 | sed 1q

11/20/2009

msi Diagnostic logging

Windows Installer supports detailed logging as a powerful diagnostic tool. Logging can be enabled in the following ways:

* Command-line: If installing an MSI package from the command-line, the /L switch can be used to enable logging. For example, the following command installs Package.msi and outputs verbose logging to c:\Package.log:

msiexec /i Package.msi /l*v c:\Package.log

* Windows Registry: The following registry value can be used in Windows Server 2003, Vista, and XP to enable verbose logging:

Key: HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer
Value Name: Logging
Type: REG_SZ
Data: voicewarmupx

* Local Policy The following local policy must be changed in Windows Server 2008. The above registry key is no longer used:

Start > Run and type mmc to open a blank management console.
File > Add/Remove Snap-In...
Local Computer Policy, Add, OK, OK
Expand Administrative Templates > Windows Components > Windows Installer
Select "Logging" choose the "Enabled" option box and type "voicewarmupx" without quotes

The resulting log is named MSI#####.log (where "#####" is a unique random identifier) and is placed in the user's Temp directory (the 'temp' directory location is per-user, and is pointed to by the environment variable %temp%).

* Group Policy: The following Group Policy setting can be used to manage logging on multiple systems:

Computer Configuration -> Administrative Templates -> Windows Components -> Windows Installer -> Logging.

* Windows Installer API: If installing an MSI package programmatically, the MsiEnableLog function call can be used to create a log file and set the logging level for the life of the calling process.

* MsiLogging property: Windows Installer 4.0 introduces the MsiLogging property, which can be set to a list of flags indicating what information to log. The flags are similar to the flags that can be added to the /L switch to msiexec.exe or to the Logging policy setting. If MsiLogging is used, the MsiLogFileLocation property will be set to the location of the log file.

Although verbose logs are very useful for diagnosing Windows Installer problems, they can be very long and difficult to read without practice. A quick way to find the location of a problem in the log is to open it in a text editor (such as Notepad) and search for the phrase "Return Value 3". This entry commonly appears in logs close to the point where a critical error has occurred. The Windows Installer SDK provides a tool called WiLogUtl, which parses and annotates Windows Installer log files.

To output debug information in the log file, pass "x" on the command line or add it to the Logging registry value. For example, the following command installs Package.msi and outputs debug, verbose logging to c:\Package.log:

msiexec /i Package.msi /l*vx c:\Package.log

11/19/2009

How to Change User Password at Command Prompt

How to Change User Password at Command Prompt

How to use the net user command to change the user password at a Windows command prompt. Only administrators can change domain passwords at the Windows command prompt. To change a user's password at the command prompt, log on as an administrator and type: "net user * /domain" (without the quotation marks)

When you are prompted to type a password for the user, type the new password, not the existing password. After you type the new password, the system prompts you to retype the password to confirm. The password is now changed.

Alternatively, you can type the following command: net user . When you do so, the password changes without prompting you again. This command also enables you to change passwords in a batch file.

Non-administrators receive a "System error 5 has occurred. Access is denied" error message when they attempt to change the password.

Container is already locked

Sometime when automated OR Manual Virtuozzo backup process gets stuck OR sometime a VPS stuck while starting up OR stopping during this stage its impossible to make any changes on that VPS. You can stop the VPS or kill the process which is running. Making any updates or trying to restart the VPS shows message “Container CTID is already locked”.

Solution:

In case of Linux this error can be fixed by deleting the lock file located at /vz/lock/CTID.lck but in Windows there is no such file.

Following are the steps to unlock the locked Container

1) vzctl stop CTID –-skiplock (try this command twice till it doesn’t show that the container is not running)
This command might throw some ERROR but no need to worry.

2) vzctl start CTID –-skiplock
This Command will throw an error if the VPS is stuck while starting or stopping.

3) After the both the above command the status of the VPS will be locked, so you will have to allow sometime to unlock the stuck processes.

4) If the above command doesn’t start the VPS, stop the VPS using –skiplock option again and kill “vzlpl” process from the Task Manager. After that you will able to start the VPS normally.

5) and restart VZAgent service

net stop vzaop

net start vzaop

http://eitwebguru.com/fix-container-is-already-locked/


11/04/2009

Install Plesk Billing standalone on win2008

There are steps that allow to install Plesk Billing standalone on win2008 server with installed on it Plesk 9.X.X

1.Create site via Plesk admin interface
Home>Domains ->Create domain ->
with enabled PHP support ->Version 5.x ->run as CGI Application
with enabled "Use dedicated pool" option
the rest parameters for own consideration
2.Make sure that is installed Zend or Ioncube support
check
C:\Program Files\Parallels\Plesk\Additional\PleskPHP5\php.ini file
for zend_extension_ts
for example I have installed Ioncube dll to C:\Program Files\Parallels\Plesk\Additional\PleskPHP5\ext\ so in php.ini should be at the beginning
zend_extension_ts= "C:\Program Files\Parallels\Plesk\Additional\PleskPHP5\ext\ioncube_loader_win_5.2.dll"
3.Download PleskBilling installation archive http://www.parallels.com/download/plesk/billing/
and extract Plesk Billing to home folder of created site
how example
C:\inetpub\vhosts\pppbs.com\httpdocs
4.Login to Plesk admin CP interface,
Go to Home>Database Servers> Local MySQL server ->WebAdmin
create for pleskbilling mysql user and database via phpmyadmin (with privileges according to installation guide http://download.ppb.parallels.com/6.0/doc/parallels-plesk-billing-6.0-for-windows-installation-guide/index.htm)
5.Start installation of Plesk Billing by usinghttp://download.ppb.parallels.com/6.0/doc/parallels-plesk-billing-6.0-for-windows-installation-guide/index.htm
Latest step - creating of database , so it can fail due to timeout reason, for this please increase values of
default_socket_timeout and mysql.connect_timeout in C:\Program Files\Parallels\Plesk\Additional\PleskPHP5\php.ini
After installation Plesk Billing database can have 214 tables with ~4,601 records.

Anonymous account name you may find in properties of PleskBilling site ->Feature View-> Authentication->Anonymous authentication ->Edit , via IIS Managenment, if will be problems with NTFS permissions this account you may add to the TEMP directory with modify permissions

10/29/2009

How to enable SSHd on LinkSys wrt54gl

LinkSys wrt54gl Router provides few ways how to setup and administrate it.

- web interface (http://your-router-ip)

- telnet (Run > CMD > telnet your-route-ip > root > root_pass)

- ssh (by default this feature is disabled)

So to enable this feature download DD-WRT firmware be sure that you download Standard Generic firmware.

After that install it (from web interface Administration > Firmware Upgrade)

!!!!NOTE Please make back up of your curent configuration and backup of you previous firmware!!!!!

After successful installation go to Services > services and enable SSHd

Now you will be able to connect to router via ssh

10/26/2009

Removing stored passwords in Windows XP

The Problem

Users have stored user ID and password information on their computer. When visiting a site, the stored IDs and passwords grant access without the user having to reenter information.

The Solution

1.      Click Start and select Run.

2.      Type in rundll32.exe keymgr.dll, KRShowKeyMgr and click OK.

3.      The Stored User Names And Passwords Window will appear.

4.      You can remove an entry by selecting it from the list and clicking Remove.

5.      Click Close.

10/25/2009

How To - Reset administrator username and password in SmarterMail

How To - Reset administrator username and password in SmarterMail

Applies to: SmarterMail (all versions)

To reset the primary administrator login and password in SmarterMail, follow the instructions below:

1. Stop the SmarterMail Service
2. Open Windows Explorer (My Computer)
3. Go to C:\Program Files\SmarterTools\SmarterMail (or wherever you installed SmarterMail)
4. Open the Service subdirectory
5. Make a backup copy of the file MailConfig.xml
6. Right-click on MailConfig.xml and choose Open With -> Notepad
7. Find the section that looks like this:
** System Admin ***************************
** To reset admin password, delete these items **
** and then restart the SmarterMail Service. **
*****************************************
< sysadminusername> ... < / sysadminusername>
< sysadminpassword> ... < / sysadminpassword>
*****************************************
8. Delete those lines and save the file
9. Start the SmarterMail Service

You should now be able to log in to SmarterMail by using the following:

Email: admin
Password: admin

10/12/2009

Changing MySQL Root Password

Changing MySQL Root Password


1. Login as root to the box with the MySQL server.
2. Stop MySQL server.
3. Open the mysql server startup script. This is the file you have just executed to stop MySQL server.
4. Find the line that contains the mysqld_safe command and add --skip-grant-tables as its parameter.
5. Start MySQL server.
6. Login as the mysql user and connect to the mysql user/permission database and run the update queries:
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newrootpassword') WHERE User='root';
mysql> FLUSH PRIVILEGES;
replacing newrootpassword with the new root password to the box with the MySQL server.
7. Exit mysql database by typing \q.
8. Exit mysql user console by typing exit
9. Stop MySQL server.
10. Open the mysql server startup script and remove the --skip-grant-tables parameter you added above.
11. Start MySQL server.
12. Open the file ~mysql/.my.cnf and update the password in the corresponding line.

10/09/2009

Helm 4.0.x upgrade to 4.1.x

there is some additional information to this topic: http://forums.webhostautomation.com/showthread.php?p=182350#post182350

Upgrade Instructions
4.0.x to 4.1.1 Upgrade

  1. The upgrade to Parallels Helm 4.1.1 requires a valid license with Upgrade Protection, or, in terms of Parallels licensing, a license that provides Software Update Service (SUS) which entitles you to version upgrade licenses throughout the life of your SUS. Read more about SUS: http://www.parallels.com/en/support/sus.
    You can validate your license by going to the Parallels Helm member area: http://www.webhostautomation.com/members.
    If you have a license without SUS, go to http://www.parallels.com/store/support/helm/ and reinstate your license. Otherwise, you will not be able to upgrade to Parallels Helm 4.1.1
  2. Download the Parallels Helm 4.0 to 4.1.1 Upgrade Tool from the following location: http://helm.download.webhostautomati...pgradeTool.exe.
  3. Run the tool and follow its instructions.

=========

First of all make sure that you have .net framework sp2 installed (for all versions) and your Helm is running. If no http://kb.parallels.com/en/5996 you should patch your helm, and re run helm upgrade

Second you should have ready to upgrade licenses for all your servers (SUS)

If you are ready you can run upgrade tool. Usually upgrade procedure takes about 30-40 mins.

NOTE!!! UPGRADE FROM HELM 3.0 TO HELM 4.0 IS ALMOST IMPOSSIBLE, IF YOU WANT TO SAVE YOUR TIME AND MONEY DO NOT PERFORM UPGRADE.

9/12/2009

mod_dphpbb3_last_topics php warnings

 

Today after installing such pretty tool as  mod_dphpbb3_last_topics I received a ton of such errors

Warning: cannot yet handle MBCS in html_entity_decode()! in helper.php in line 130

After googling I found this article. I tried to replace:

$title = html_entity_decode($title, ENT_QUOTES, 'UTF-8'); with $title = utf8_decode($title);

but it brakes UA/RUS lang. After brainstorm I made following changes in code:

Was:

$title = html_entity_decode($title, ENT_QUOTES, 'UTF-8');

Become:

$title = html_entity_decode($title);

9/03/2009

pf changes

List:       openbsd-misc
Subject: pf changes
From: Henning Brauer
Date: 2009-09-01 15:12:37
Message-ID: 20090901151237.GA11326 () nudo ! bsws ! de

[Download message RAW]


I have just committed a monster pf diff that is basically a rewrite of
the entire NAT part.

seperate rules for nat, rdr etc are gone.

nat and rdr become actions on regular rules.

simple rulesets are converted like this:

nat on $ext_if to ($ext_if)
becomes
match out on $ext-if nat-to ($ext_if)

more complex rulesets require some thought. since the weird
difference in matching order is gone (nat/rdr were first match) you
might have to reverse things and use your brains :)

the new NAT code is very very very flexible. every matching "match"
rule changes the adress on the fly (not really, but that is what it
looks like for subsequent rules), and you can nat or rdr multiple times.
for pass rules, only the last matching one matters.

so given
match out on $ext_if nat-to 1.2.3.4
match out on $ext_if to 1.2.3.4 nat-to 5.6.7.8
both rules will match and 5.6.7.8 will be the new src address.
however, with
pass out on $ext_if nat-to 1.2.3.4
pass out on $ext_if nat-to 5.6.7.8
ONLY the second one matters for NAT. same semantic that match rules
have for a lot of other stuff (altq, rtable, log, scrub).

the core logic, that relies on the big state table rewrite ryan and I
(with help from otehr developers of course) did last year, allows for
nat and rdr in any direction, but for now we prevent that in pfctl and
force nat outbound and rdr inbound, there are nontrivial implications
for the routing afterwards - if you rdr outbound, the packet will go
out on the interface it was seen on, even if the route for the address
rdr'd to actually points to a different interface. with NAT there are
similiar implications for the return traffic. since they are useful
nontheless I tend to remove the check in pfctl and document the
implications, but one thing after each other.

the diff is over 3000 lines, and makes pf about 800 lines smaller
than it was before. more cleanup is possible on top of this, but as
said before, one step at a time.

to add another data point how important hackathons are... this was
almost entirely written at c2k9 in edmonton and "finished" (minus a
few bugs fixed later) the week thereafter on bob's couch. while the
diff was almost entirely written by me, getting this actually into the
tree was a concerted effort by many developers. claudio adjusted ftp-proxy,
sthen ported that adjustment over to tftp-proxy, reyk adjusted relayd.
many people were testing a lot, I'm sure I forget a few, but at least
krw, sthen, claudio, reyk, dhill and dlg (who was insane enough to
throw this on production firewalls with significant importance) helped
a lot. igor did most of the manpage work. theo helped getting it in, a
lot. thanks guys.

and now it is your time. test this as much as you can, to avoid
surprises in 4.7, and bugs showing up after release... we really want
to find them beforehands, right?

henning

--
Henning Brauer, hb@bsws.de, henning@openbsd.org
BS Web Services, http://bsws.de
Full-Service ISP - Secure Hosting, Mail and DNS Services
Dedicated Servers, Rootservers, Application Hosting - Hamburg & Amsterdam

http://marc.info/?l=openbsd-misc&m=125181847818600&w=2

8/24/2009

Add favicon to joomla 1.5 site

 

  1. login into admin section
  2. go to template management
  3. upload favicon into  image folder of your site
  4. edit HTML of your tamplate
  5. add following code:

<link rel="shortcut icon" href="images/favicon.ico" />

6. refresh your browser.

Have fun :)

8/20/2009

Встановлення Xen на Debian Etch 4.0

Основна стаття http://mediakey.dk/~cc/installing-xen-on-debian-etch-40/
Переклад Михайло "veselujm" Веселовський

Протягом довгого часу я випробуав багато технологій віртуалізації: Xen, VMWare, і Xen LogoMicrosoft VM. Я з впевненістю можу сказати що всі вони придатні для використання, але VMWare і Microsoft’s VM є більш вялими ніж Xen. Цих вихідних я розгорнув свій перший сервер на базі Debian Etch 4.0 і Xen. І все запрацювало з "коробки"

Тут я опишу кроки які я зробив щоб поставити Xen на Debian Etch:

sudo apt-get install xen-linux-system-2.6.18-4-xen-686 libc6-xen bridge-utils


Грузимось в нове ядро з встановленим Xen

sudo reboot


Потім настроюємо настройки мережі в
/etc/xen/xend-config.sxp. Вмикаємо network bridge:

(network-script network-bridge)


Встановлюю
xen-tools:

apt-get install xen-tools


Xen tools це пакет який включає в себе різноманітні утиліти для Xen, утиліта для створення віртуальних машин тощо.

Редагуємо настройки ядра і initrd в /etc/xen-tools/xen-tools.conf, так щоб вони були подібними до ваших системних.

Взнаємо як ядро і initrd називаються у вашій системі:

ls /boot/vmlinuz*
/boot/vmlinuz-2.6.18-4-686 /boot/vmlinuz-2.6.18-4-xen-686

і

ls /boot/initrd*
/boot/initrd.img-2.6.18-4-686 /boot/initrd.img-2.6.18-4-686.bak /boot/initrd.img-2.6.18-4-xen-686


Змінюємо рядки:


#
# Default kernel and ramdisk to use for the virtual servers
#
kernel = /boot/vmlinuz-2.6.18-4-xen-686
initrd = /boot/initrd.img-2.6.18-4-xen-686


В наступному кроці змінюємо наступні рядки в xen-tools.conf


dir = /home/xen
debootstrap = 1
size = 4Gb # Розмір диску
memory = 128Mb # Память
swap = 128Mb # Своп
fs = ext3 # використовувати файлову систему EXT3 для створення дисків
dist = etch # Стандартиний дистрибутив для встановлення
image = sparse # Визначаємо тип диску повний чи частинами

Створюємо домівки для наших віртуальних машин:

mkdir /home/xen
mkdir /home/xen/domains


Тепер ми готові до створення віртуальної машини

xen-create-image -hostname=mailserver -ip=10.0.0.21 -netmask=255.255.255.0 -gateway=10.0.0.1 -passwd


Після чого новостворену віртуалку можна запустити:

xm create mailserver.cfg


У випадку появи наступної помилки:

Error: Device 0 (vif) could not be connected. Backend device not found.


Потрібно перевірити чи ви увімкнена підтримка
network bridge, “(network-script network-bridge)”, в /etc/xen/xend-config.sxp після додавання потрібно пергрузити демон xen /etc/init.d/xend restart. Здопомогою команд “xm list” чи “xentop” можна подивитись яка віртуалка зараз крутиться:
debian5:# sudo xm list
Name ID Mem(MiB) VCPUs State Time(s)
Domain-0 0 874 1 r----- 657.9
mailserver 3 128 1 -b---- 8.0


Базуючись на моєму досвіді використання і впровадження технолоїй віртуалізації , а думаю що Xen це саме те для впровадження Linux і Linux-based технологій і це показує що вони готові до використання вже тепер. Технології віртуалізації вже тепер готові до впровадження в великих компаніях і дата центрах, і вони допомагають спростити настроювання, впровадження і встановлення працівникам, І я думаю що найближчі роки технології віртуалізації будуть грати важливу роль на серверному ринку.

7/17/2009

6/30/2009

VirtualBox 3.0 released

Changelog

VirtualBox 3.0.0 (released 2009-06-30)

This version is a major update. The following major new features were added:

  • Guest SMP with up to 32 virtual CPUs (VT-x and AMD-V only; see chapter 3.7.2.2 of the user manual)
  • Windows guests: ability to use Direct3D 8/9 applications / games (experimental; see chapter 4.8 of the user manual)
  • Support for OpenGL 2.0 for Windows, Linux and Solaris guests

In addition, the following items were fixed and/or added:

  • Solaris hosts: allow suspend/resume on the host when a VM is running (bug #3826)
  • Solaris hosts: loosen the restriction for contiguous physical memory under certain conditions
  • Mac OS X hosts: fixed guest PAE
  • Linux hosts: kernel module compile fixes for 2.6.31 (bug Fixed in SVN (closed)">#4264)
  • VMM: fixed occasional guru meditation when loading a saved state (VT-x only)
  • VMM: eliminated IO-APIC overhead with 32 bits guests (VT-x only, some Intel CPUs don’t support this feature (most do); bug #638)
  • VMM: fixed 64 bits CentOS guest hangs during early boot (AMD-V only; bug fixed in SVN (closed)">#3927)
  • VMM: performance improvements for certain PAE guests (e.g. Linux 2.6.29+ kernels)
  • VMM: some Windows guests detected a completely wrong CPU frequency (bug fixed in SVN (closed)">#2227)
  • VMM: fixed hanging and unkillable VM processes (bug fixed in ... (closed)">#4040)
  • VMM: fixed random infrequent guest crashes due to XMM state corruption (Win64 hosts only)
  • VMM: performance improvements for network I/O (VT-x/AMD-V only)
  • GUI: added mini toolbar for fullscreen and seamless mode (Thanks to Huihong Luo)
  • GUI: redesigned settings dialogs
  • GUI: allow to create/remove more than one host-only network adapters (non Windows hosts)
  • GUI: display estimated time for long running operations (e.g. OVF import/export)
  • GUI: fixed rare hangs when open the OVF import/export wizards (bug #4157)
  • 3D support: fixed VM crashes for client applications using incorrect OpenGL states
  • 3D support: fixed memory corruption when querying for supported texture compression formats
  • 3D support: fixed incorrect rendering of glDrawRangeElements
  • 3D support: fixed memory leak when using VBOs
  • 3D support: fixed glew library detection
  • 3D support: fixed random textures corruption
  • VRDP: support Windows 7 RDP client
  • Networking: fixed another problem with TX checksum offloading with Linux kernels up to version 2.6.18
  • NAT: fixed “open ports on virtual router 10.0.2.2 - 513, 514” (forum)
  • NAT: allow to configure socket and internal parameters
  • NAT: allow to bind sockets to specific interface
  • PXE boot: significant performance increase (VT-x/AMD-V only)
  • VHD: properly write empty sectors when cloning of VHD images (bug fixed in svn (closed)">#4080)
  • VHD: fixed crash when discarding snapshots of a VHD image
  • VHD: fixed access beyond the block bitmap which could lead to arbitrary crashes
  • VBoxManage: fixed incorrect partition table processing when creating VMDK files giving raw partition access (bug fixed in svn (closed)">#3510)
  • VBoxManage: support cloning to existing image file
  • OVF: several OVF 1.0 compatibility fixes
  • OVF: fixed exporting of disk images when multiple virtual machines are exported at once
  • Virtual mouse device: eliminated micro-movements of the virtual mouse which were confusing some applications (bug fixed in SVN (closed)">#3782)
  • Shared Folders: sometimes a file was created using the wrong permissions (2.2.0 regression; bug ... (closed)">#3785)
  • Shared Folders: allow to change file attributes from Linux guests and use the correct file mode when creating files
  • Shared Folders: some content was incorrectly written under certain conditions (bug #1187)
  • Shared Folders: fixed incorrect file timestamps, when using Windows guest on a Linux host (bug #3404)
  • X11 clipboard: fix duplicate end of lines (bug fixed in SVN (closed)">#4270)
  • X11 guests: a number of shared clipboard fixes
  • Linux guests: Guest Additions support for SUSE Linux Enterprise Desktop 11
  • Linux guests: new daemon vboxadd-service to handle time synchronization and guest property lookup
  • Linux guests: implemented guest properties (OS info, logged in users, basic network information)
  • Windows host installer: VirtualBox Python API can now be installed automatically (requires Python and Win32 Extensions installed)
  • USB: Support for high-speed isochronous endpoints has been added. In addition, read-ahead buffering is performed for input endpoints (currently Linux hosts only). This should allow additional devices to work, notably webcams (bug #242).
  • USB: fixed error handling for some USB dongles
  • Web service: fixed inability to handle NULL pointers for object arguments, which are valid values for a lot of APIs, in both the raw and the object-oriented web service.
  • Web service: object-oriented bindings for JAX-WS did not exhibit interface inheritance correctly, fixed
  • Web service: added support for IDisplay and IGuest interfaces, which were previously unavailable
  • Registration dialog uses Sun Online accounts now
http://www.virtualbox.org/wiki/Downloads

6/22/2009

just to remember

mount -t ext3 /dev/hdc1 /shared

6/17/2009

about torrent

short howto about P2P(torrent in this case) for newbie

  1. first of all you need software for using *.torrents files, for example I use uTorrent it can be downloaded from http://www.utorrent.com/downloads/
  2. you need one small file called torrent. if you already have it you need only add it into your torrent client if none you can find something in such large torrent databases as mininova.org, thepiratebay.com, isohunt.com etc.

6/03/2009

How to fix: locate: can not open `/var/lib/mlocate/mlocate.db’: No such file or directory

[root@ ~]# locate statistics
locate: can not open `/var/lib/mlocate/mlocate.db': No such file or directory
[root@ ~]# updatedb
[root@ ~]# locate statistics

/sys/class/net/lo/statistics
/sys/class/net/lo/statistics/collisions

4/19/2009

Convert flac/ape to mp3 in Windows

 

How to convert flac/ape to mp3 in windows.

1. mp3 player without lossless-format support

2. flac/ape file with .cue file

a. download and install Medieval CUE Splitter, then run it and open .cue file, finally ‘cut’ source flac/ape file.

b. download foobar2000 with Lame support.

Convert flac files to mp3.

3/13/2009

Instaling self-signed SSL certificate into IIS

Today I added SSL certificate to my site http://veselovski.co.uk , now it can be reached by https://veselovski.co.uk

the main tutorail I’ve used was http://www.dylanbeattie.net/docs/openssl_iis_ssl_howto.html

2/17/2009

How to flush DNS cache in Linux / Windows / Mac

Flush dns to get a new name resolution. Also flush dns cache when you can’t access a newly registered domain name. You can simply flush your dns cache anytime to get new entry. So, Flush your dns cache now.

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

How to:

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/username/.wine" wine "C:\Program Files\QIP Infium\infium.exe"

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 Multimedia Transfer

і б) для тих хто юзає карти нокія  Nokia Map Loader for Mac

 

Дерзайте

1/02/2009

Convert ape to mp3 in linux (Fedora)

Виникла у мене проблема з тим щоб конвертнути ape в mp3 під лінухом, погугливши я знайшов наступну процедуру вирішення цієї проблеми.

використовувати ми будемо наступний скріпт:

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.html?id=193 for fedora 7


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