Hosting Partner

 


Get Paint.NET!
Blog

Most Read

Latest News

Blog

Broken OS template cache

I got a task to upgrade container with Fedora core 7 to Fedora Core 8. From available information such operation can be run as

 

vzpkg upgrade VE_ID

So I without any thoughts back up container and run upgrade. But upgrade finished with error about vzquota. after googling all what I found, was information that I should recreate cache. This operation was finished with errors too.

 

So my workaround is:

 

1. backup container

2. download OS  template from http://www.parallels.com/products/virtuozzo/templates/catalog/

3. install downloaded OS template with force option

 

vzpkg install template OS_TPL –force

 

4. recreate OS cache

 

vzpkg create cache OS_TPL

vzpkg update cache OS_TPL’

 

5. have fun with OS and container upgrade :)

 

css and Html layout generator

I often use my brain for generating web site layout. But some times I’m out of ideas, so I need nice & easy tool for generating layouts. Per my investigating somewhere in the web I found 960 grid system. This tool allows you to create div based layout, so you can easily build your web  site.

Using this tool I found a couple of things which I don’t like but at least it saves my time :)

 

PuTTY Connection Manager

Looking for a tabbed version of famous PuTTY?

PuTTY Connection Manager is a free PuTTY Client Add-on for Windows platforms which goal is to provide a solution for managing multiple PuTTY instances. This is one of the most important missing feature of PuTTY (referring to this and this user complaint)...

http://puttycm.free.fr/cms/

 

Postfix spam control

Postfix 2.x

Open /etc/postfix/main.cf and place the following lines in it (replacing the respective settings if they exist):

vi /etc/postfix/main.cf

[...]
smtpd_helo_required = yes
disable_vrfy_command = yes
strict_rfc821_envelopes = yes
invalid_hostname_reject_code = 554
multi_recipient_bounce_reject_code = 554
non_fqdn_reject_code = 554
relay_domains_reject_code = 554
unknown_address_reject_code = 554
unknown_client_reject_code = 554
unknown_hostname_reject_code = 554
unknown_local_recipient_reject_code = 554
unknown_relay_recipient_reject_code = 554
unknown_sender_reject_code = 554
unknown_virtual_alias_reject_code = 554
unknown_virtual_mailbox_reject_code = 554
unverified_recipient_reject_code = 554
unverified_sender_reject_code = 554

smtpd_recipient_restrictions =
reject_invalid_hostname,
reject_unknown_recipient_domain,
reject_unauth_pipelining,
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination,
reject_rbl_client multi.uribl.com,
reject_rbl_client dsn.rfc-ignorant.org,
reject_rbl_client dul.dnsbl.sorbs.net,
reject_rbl_client list.dsbl.org,
reject_rbl_client sbl-xbl.spamhaus.org,
reject_rbl_client bl.spamcop.net,
reject_rbl_client dnsbl.sorbs.net,
reject_rbl_client cbl.abuseat.org,
reject_rbl_client ix.dnsbl.manitu.net,
reject_rbl_client combined.rbl.msrbl.net,
reject_rbl_client rabl.nuclearelephant.com,
permit
[...]



Restart Postfix afterwards:



/etc/init.d/postfix restart

 

Search Engine Optimization Toolkit

The IIS Search Engine Optimization (SEO) Toolkit helps Web developers, hosting providers, and Web server administrators to improve their Web site’s relevance in search results by recommending how to make the site content more search engine-friendly. The IIS SEO Toolkit includes the Site Analysis module, the Robots Exclusion module, and the Sitemaps and Site Indexes module, which let you perform detailed analysis and offer recommendations and editing tools for managing your Robots and Sitemaps files.
Improve the volume and quality of traffic to your Web site from search engines

The Site Analysis module allows users to analyze local and external Web sites with the purpose of optimizing the site's content, structure, and URLs for search engine crawlers. In addition, the Site Analysis module can be used to discover common problems in the site content that negatively affects the site visitor experience. The Site Analysis tool includes a large set of pre-built reports to analyze the sites compliance with SEO recommendations and to discover problems on the site, such as broken links, duplicate resources, or performance issues. The Site Analysis module also supports building custom queries against the data gathered during crawling.
Control how search engines access and display Web content

The Robots Exclusion module enables Web site owners to manage the robots.txt file from within the IIS Manager interface. This file is used to control the indexing of specified URLs, by disallowing search engine crawlers from accessing them. Users have the choice to view their sites using a physical or a logical hierarchal view; and from within that view, they can choose to disallow specific files or folders of the Web application. In addition, users can manually enter a path or modify a selected path, including wildcards. By using a graphical interface, users benefit from having a clear understanding of what sections of the Web site are disallowed and from avoiding any typing mistakes.
Inform search engines about locations that are available for indexing

The Sitemaps and Site Indexes module enables Web site owners to manage the sitemap files and sitemap indexes on the site, application, and folder level to help keep search engines up to date. The Sitemaps and Site Indexes module allows the most important URLs to be listed and ranked in the sitemap.xml file. In addition, the Sitemaps and Site Indexes module helps to ensure the Sitemap.xml file does not contain any broken links.
Site Analysis Features

* Fully featured crawler engine
o Configurable number of concurrent requests to allow users to crawl their Web site without incurring additional processing. This can be configured from 1 to 16 concurrent requests.
o Support for Robots.txt, allowing you to customize the locations where the crawler should analyze and which locations should be ignored.
o Support for Sitemap files allowing you to specify additional locations to be analyzed.
o Support for overriding ‘noindex’ and ‘nofollow’ metatags to allow you to analyze pages to help improve customer experience even when search engines will not process them.
o Configurable limits for analysis, maximum number of URLs to download, and maximum number of kilobytes to download per URL.
o Configurable options for including content from only your directories or the entire site and sub domains.
* View detailed summary of Web site analysis results through a rich dashboard
* Feature rich Query Builder interface that allows you to build custom reports
* Quick access to common tasks
* Display of detailed information for each URL
* View detailed route analysis showing unique routes to better understand the way search engines reach your content

Robots Exclusion Features

* Display of robots content in a friendly user interface
* Support for filtering, grouping, and sorting
* Ability to add ‘disallow’ and ‘allow’ paths using a logical view of your Web site from the result of site analysis processing
* Ability to add sitemap locations

Sitemap and Sitemap Index Features

* Display of sitemaps and sitemap index files in a simple user interface
* Support for grouping and sorting
* Ability to add/edit/remove sitemap and sitemap index files
* Ability to add new URL’s to sitemap and sitemap index files using a physical or logical view of your Web site
* Ability to register a sitemap or sitemap index into the robots exclusion file
http://www.iis.net/expand/SEOToolkit
 

Online Radio as 1,2,3…..

Захотілось мені створити своє радіо так щоб зміг наприклад на роботі увімкнути собі радейко і послухати музику яка є у мене дома на компі. Після довгого гугління я знайшов іформацію що це можна зробити за допомогою SHOUTcast. Отже зараз буде невеличкий мануал як створити собі своє власне онлайн радіо.

Отже створювати радіо ми будемо з допомогою SHOUTcast і Debian 5.x… У моєму випадку це була чиста інсталяція ОС

1. Інсталюємо Debian без Х зі стандартним набором програм, настроюємо ssh. І ломимось на нього з якоїсь нормальної ОС з Х (вінда чи лінух все рівно)
2. Дописуємо наступні рядки у /etc/apt/source.list
deb
http://ftp.de.debian.org/debian sid main non-free
## Christian Marillat's Mult-Media Repository for Unstabledeb
http://www.debian-multimedia.org sid main
## Christian Marillat's Mult-Media Repository for Unstable - Experimental Stagingdeb
http://www.debian-multimedia.org experimental main
apt-get --allow-unauthenticated  install debian-multimedia-keyring
apt-get update
apt-get upgrade

3. Інсталюємо потрібний софт:

apt-get install lame
wget
http://yp.shoutcast.com/downloads/sc1-9-8/sc_serv_1.9.8_Linux.tar.gz SHOUTcast DNAS
wget
http://yp.shoutcast.com/downloads/sc_trans_posix_040.tgz SHOUTcast Radio DSP for Unix/Linux/MAC OSX
4. Настроюємо SHOUTcast DNAS

tar xzvf sc_serv_1.9.8_Linux.tar.gz 
ls -al 
mkdir sc 
mv ./sc_serv ./sc 
mv ./sc_serv.conf ./sc 
mv ./README.TXT ./sc
В цьому файлі дописуємо конфіг сервера  vi ./sc/sc_serv.conf
Я змінив наступні параметри:

MaxUser=10 було 32
Password=********* потрібно настроїти без нього радіо працювати не буде
SrcIP=127.0.0.1 потрібно поставити цей праметер щоб ніхто не пробував броудкаститись через вас

5. Настроювання SHOUTcast Radio DSP

у моєму випадку музичні файли знаходяться на фізичній машині на якій крутиться віндовс, а радіо настроєне на віртуалці тому прийшлось настроїти автомонтування віндової шари, як це робиться можна прочитати тут: http://www.debian-administration.org/articles/165
mv ./sc_trans_posix_040.tgz ./sct
cd ./sct/
tar xzvf sc_trans_posix_040.tgz
готуємо плейліст у мене це получилось наступним чином:

find /mnt/win/muz/Rock/ -type f -name *.mp3 >> rock.txt
редагуємо конфіг файл SHOUTcast Radio DSP

sc_trans.conf
PlaylistFile=/root/rock.txt
ServerIP=127.0.0.1 # саме так повинно виглядати це поле так само як у sc_serv.conf
Password=******** такий самий як у sc_serv.conf
Називаємо своє радіо:
StreamTitle=Rock
StreamURL=http:/
Genre=Rock
Виставляємо бітрейт
Bitrate=128000
SampleRate=44100
Channels=2
Quality=6

Далі я підготував файл для того щоб запускати радіо з однієї консолі

 cat sstart
#!/bin/sh
/root/sc/sc_serv /root/sc/sc_serv.conf  | /root/sct/sc_trans_040/sc_trans_linux /root/sct/sc_trans_040/sc_trans.conf

Тепер до станції можна доступитись з броузера: http://your_ip:8000

FIN

 

Как выяснить маску подсети исходя из CIDR ?

Как выяснить маску подсети исходя из CIDR ?

В кач-ве примера будем использовать IP-адрес 213.45.64.123 с CIDR /27:

Необходимо взять кол-во бит из CIDR (в бинарном виде), разбить на 4-ре октета и перевести в десятичные.

1. запишем первые 27 бит как 1-цу, а остальные 5-ть (т.к. их всего 32 бита) как 0-ль

11111111111111111111111111100000

2. Разделим на 4-ре октета

11111111.11111111.11111111.11100000

3. Переведем в десятичную систему

255.255.255.224

Вот и все. Получили что /27 равен маске 255.255.255.224

Так же полезно просто помнить что:
сети класса A - это CIDR /8
сети класса B - это CIDR /16
сети класса С - это CIDR /24


Как по CIDR определить адрес сети, широковещательный адрес (broadcast), число хостов в сети ?

В кач-ве примера будем использовать тот же IP-адрес 213.45.64.123 с CIDR /27:

1. 32-27=5 бит

2. 2-ка в пятой степени = 32, а значит получается что рабочих IP-адресов в этой сети 30-ть (т.к. 1-ый адрес это адрес сети, а последний это broadcast)

3. Смотрим последний октет IP-адреса (213.45.64.123), в 123-х целых 32-ек укладывается 3 раза, а значит адрес сети 213.45.64.96 - это 32 умножить на 3 (32х3=96)

4. Широковещательным адресом (broadcast) будет 213.45.64.127 - это 32 умножить на 4 и отнять 1 (32х4-1=127)


Как по хосту и маске подсети определить адрес сети, широковещательный адрес (broadcast), число хостов в сети ?

В кач-ве примера будем использовать IP-адрес 192.168.32.48 с маской подсети 255.255.255.192:

1. 256-192=64, где 192 это последний октет из маски (255.255.255.192), а 64 это общее кол-во хостов в сети,
т.к. 1-ый адрес это адрес сети, а последний это broadcast получаем 62 рабочих хоста в сети.

2. Смотрим последний октет IP-адреса (192.168.32.48), в 48 целых 64-рок укладывается ноль получаем адрес сети 192.168.32.0 (0x64=0)

3. Широковещательным адресом (broadcast) будет 192.168.32.63 (64x1-1=63)
http://subnets.ru/wrapper.php?p=35#que2
 
More Articles...
Acceptance Mark