Eric @ EricBess WebHome

Wins do not arrogant, not to lose hungry, there is shock chest and face, such as mine Pinghu

Chinese (Simplified) flagItalian flagKorean flagPortuguese flagEnglish flagGerman flagFrench flagSpanish flagJapanese flagArabic flagRussian flagGreek flagDutch flagBulgarian flagCzech flagCroat flagDanish flagFinnish flagHindi flagPolish flagRumanian flagSwedish flagNorwegian flag
By N2H

Mod_rewrite using load balanced

APACHE mode_rewrite read the document, referred to rewrite some of the methods used to achieve load balance method, the record.

Load balanced

Description:

How to balance www.foo.com load to www[0-5].foo.com total of 6 server)?

:

There are many issues that may be the solution here, we discussed what is known as the "based on DNS (DNS-based)" program, and special use mod_rewrite program:

  1. DNS cycle (DNS Round-Robin)

    The easiest way is to use BIND for DNS characteristics of the cycle, as long as the practice set up www[0-9].foo.com the DNS of the A (address) records, such as:

      www0 IN A 1.2.3.1 
      www1 IN A 1.2.3.2 
      www2 IN A 1.2.3.3 
      www3 IN A 1.2.3.4 
      www4 IN A 1.2.3.5 
      www5 IN A 1.2.3.6 
    

    Then, add the following:

      www IN CNAME www0.foo.com. 
             IN CNAME www1.foo.com. 
             IN CNAME www2.foo.com. 
             IN CNAME www3.foo.com. 
             IN CNAME www4.foo.com. 
             IN CNAME www5.foo.com. 
             IN CNAME www6.foo.com. 
    

    Note that the above may seem wrong, but a matter of fact, it is BIND a desired characteristics, but also can be used. In any case, now www.foo.com resolution has BIND BIND can be given www0-www6 though each will be on the order of the minor replacement / cycle, the client's request can be distributed among the various servers. However, this is not a good load balancing because, DNS resolution information can be the name of the other network server buffer, and once www.foo.com for the resolution was wwwN.foo.com while its follow-up request will be sent to To www.foo.com But the end result is correct, because the request was indeed the total distributed to the various servers

Click to continue reading

July 5th, 2008 Posted by eric | System | no comments

Qmail Core System # For FreeBSD

1.DAEMONTOOLS

Install

cd / usr / ports / sysutils / daemontools
make clean & & make config
| | [X] MAN Install Gerrit Pape's manual pages | |
| | [X] SIGQ12 Add svc support for QUIT, USR1, and USR2 signals | |
| | [X] TESTS Run the test suite, fails on NFS-mounted workdir | |
make extract

mkdir / service
chmod 755 / service

echo 'svscan_enable = "YES"'>> / etc / rc.conf
echo 'svscan_servicedir = "/ service"'>> / etc / rc.conf

/ usr / local / etc / rc.d / svscan.sh start

Verify Daemontools Is Runing

sleep 5
ps ax | grep svscan

Add the "clear" service

cd / usr / local
mkdir clear
touch clear / down
cat> clear / run < #! / bin / sh
yes''| head -4000 | tr '\ n'
chmod + x clear / run
chmod aw clear / down
ln-s / usr / local / clear / service / clear

# When you want to clear the service errors, just run this:
svc-o / service / clear

Click to continue reading

June 4th, 2008 Posted by eric | Qmail / Postfix / Exchange | no comments

Re: Why is Microsoft to buy Yahoo Linux?

Re: Why is Microsoft to buy Yahoo Linux? http://blog.sina.com.cn/s/blog_4e85818901008g4k.html

linux is not opensource all the world, can not even be regarded as a good example. With it too, is difficult to control and too many commercial interests involved in hosting, I do not think it will become a rival of windows, windows at least more organized.
Freebsd preferred framework by the independent authority of the elites to maintain the core of development, in the open on the basis of their own, inclusive of the world. Due to the development of such a way so that freebsd stability and rich. In fact, "since ancient times to the" large-scale systems in this way are the mainstream of development. Do not agree with you, think about TCP / IP with the RFC.
If Bo from the main responsibility for the acquisition of the point of view of things, microsoft real game of the other party should be Freebsd, TCP / IP represented existed since ancient times and has been very successful model for the development of large-scale systems. That is, by an independent team of elite lay the foundation for material gain does not open and self-sacrifice and absorb all the fine elements of self-achievement. This is like microsoft such a business is unable to face the bane, but microsoft is bound to face one day, Bill.G will see.

April 8th, 2008 Posted by eric | Unix / BSD / Linux, the impression mind | no comments

My Freebsd Setting

Former chapter: FreeBSD standard setup and tuning [load]

0 sections: a minimum of installation work

sysinstall -> Configure -> Distributions -> man / / install the man I used to, there is no such thing, really painful
/ usr / libexec / locate.updatedb / / update the database LOCATE

Subsection 1: ssh configuration

ee / etc / rc.conf
/ / If there sshd_enable = "YES" then we have to open an ssh server, if not, please add.

ee / etc / ssh / sshd_config
/ / Find # PermitRootLogin no line, remove the # sign in front, then the back of no change yes, according to the ESC and then double-save from the carriage return. If you can use VI.

/ / Restart the SSH service
/ etc / rc.d / sshd restart

Subsection 2: System Update

/ / Cvsup installation procedure. cvsup from a remote server hosts the main cvs (1) distributed database and update the tree-source software package used to update the operating system and software.
setenv PACKAGEROOT "ftp://ftp.freebsdchina.org/"
setenv PACKAGESITE "ftp://ftp.freebsdchina.org/pub/FreeBSD/ports/i386/packages-7.0-release/Latest/" OR
/ / At / etc / profile, quickly set up the domestic packagesite
export PACKAGESITE = ftp://ftp.freebsdchina.org/pub/FreeBSD/ports/i386/packages-7.0-release/Latest/
export PACKAGEROOT = ftp://ftp.freebsdchina.org/

pkg_add-r cvsup-without-gui
rehash

/ / Now we can use the cvsup, first of all-source software package to update ports.
cp / usr / share / examples / cvsup / ports-supfile ~ root

Update servers:

ee ~ root / ports-supfile
/ / * default host = CHANGE_THIS.FreeBSD.org
/ / In order to more rapidly, generally choose from our relatively close to the server:
/ / * default host = cvsup.freebsdchina.org

Update PORTS LIST:

cvsup-g-L 2 ~ root / ports-supfile

Click to continue reading

March 23rd, 2008 Posted by eric | Unix / BSD / Linux | no comments

Wordpress database and that wpdb Class

To collate the following information network of non-original

The following are wp-2.0.5 version of the database structure of (ER diagram). Here only lists the primary key and foreign key. Diamond-shaped figure that 1: n relationship, as part of a white, black as part of the n.

wordpress-db-er-diagram.png

Wordpress A total of 10 tables, divided into four categories according to function.

  • user: user information, including wp_users table and wp_usermeta table.
  • post: The article reviews and information, including wp_posts, wp_postmeta, wp_comments, wp_post2cat, as well as five wp_categories table.
  • link: links, including wp_links table and wp_linkcategories table.
  • option: setting the overall situation, including wp_options table.

Table of naming is very interesting. Sum up the basic rules are as follows:

  • To preserve the basic properties of the object, named wp_objects, the use of the plural (for example, wp_posts, wp_comments);
  • Save the expansion of the object attributes, named wp_objectmeta, the use of the singular (for example, wp_postmeta, wp_usermeta);
  • Many-to-many relationship, named wp_a2b, which were b and a many-to-many relationship between the two ends of the object's name abbreviation (for example, wp_post2cat).
WPDB category

http://codex.wordpress.org.cn/Function_Reference/wpdb_Class

http://codex.wordpress.org/Function_Reference/wpdb_Class

Database description

http://codex.wordpress.org/Database_Description # Table_Overview

wp_categories: for the preservation of classified information related to the table. 5, including the field are:

  • cat_ID - each unique ID number classifications for a bigint (20) value, and with additional properties auto_increment.
  • cat_name - a classification name for a varchar (55) value.
  • category_nicename - the classification assigned to a user-friendly names to remember, that is, the so-called slug, this is a varchar (200) value.
  • category_description - a detailed description of the classification, longtext-value.
  • category_parent - the higher the classification categories, as a int (4) value, corresponding to the current table is the cat_ID, that is, wp_categories.cat_ID. No higher level classification, the value is 0.

Click to continue reading

March 12th, 2008 Posted by eric | Database, Wordpress Programming | no comments

FreeBSD 7.0 released today

FreeBSD 7.0-RELEASE officially released, which is 7-STABLE branch of the first official release, but also the first to the current plan rather than function as a priority odd version. This version of the main highlights include:

- SMP for the environment as well as many other database performance testing exposed the scalability issue has been a significant improvement. FreeBSD 7.0 with a number of cases, the general load performance than FreeBSD 6.X increased 350 percent, high-load conditions to improve performance up to 1500 percent. And so far the best performance of the Linux kernel (version 2.6.22 and 2.6.24), high-performance 15%. These performance improvements for the results from the analysis of system performance and improve the performance assessment of the use case for your specific work load may vary. Performance improvement is mainly derived from the following improvements:
* 1:1 threading model used by default libthr the thread library.
* The inter-process communication (IPC), and scheduler locking network improvements.
* 5.x and 6.x branch of the introduction of the SMP structure optimization.

A number of performance tests show that this version of FreeBSD for up to 8 CPU's case, its performance with the linear increase in the number of CPU. A lot of work to load in the multi-core systems showed remarkable performance.

Click to continue reading

February 28th, 2008 Posted by eric | Unix / BSD / Linux | no comments

2 3 4 5 6 » Page 1 of 6 1 2 3 4 5 6 »