Bandwidthd complete practical notes (Postgresql) _ 2
This series of articles is written by ex_net (Zhang jianbo and Liang Hui). Please indicate the source for reprinting.
Http://blog.csdn.net/zjianbo/article/details/16839455
Author: Zhang jianbo mailbox: 281451020@qq.com Phone: 13577062679 welcome to exchange calls!
Preface
If you have worked as a network administrator, you may feel this way. You may often hear complaints from colleagues and leaders, leading to slow network speeds! However, the organization is willing to invest in the purchase of traffic control and behavior management devices. After all, the number of traffic control and behavior management devices is more than 0.1 million. When I raise money, the leader will say, think of a solution ,,,,! Ah. Speechless!
The slow speed of the network is really a tangled solution. In the years of waiting in the school network center, I have gradually found some experience. Sort out and communicate with everyone. The previous article has briefly introduced how to install Bandwidthd in CentOS (see). After several days of practice, it is found that the effect is not good. The reason for the analysis is that when the vswitch mirror port sends traffic to Bandwidthd, only one side of the traffic is used, resulting in inaccurate data. Therefore, the last method was improved.
Use a combination of "bridge", "Bandwidthd", and "Postgresql. After 24 hours of experiments, the results were good.
1. system solution introduction
Note:
(1) servers with three NICs, for example, hp1_g6, which has four NICs.
(2) combine eth1 and eth2 into a "transparent bridge". In this way, even if the server breaks down, you can quickly fix the line, you do not need to modify the configurations of A vro or vswitch.
Ii. Brief description of server system installation steps
(1) install the Ubuntu 13 system (for which version you want to install, it depends on your server. After testing, hp1_g6 only needs to install Ubuntu13. Installing version 12.04 makes Raid troublesome, array recognition is not very good)
(2) install the bridge component after the system is installed.
Sudo apt-get install bridge-utils
(3) configure the bridge
Ifconfig em2 0.0.0.0
Ifconfig em3 0.0.0.0
Brctl addbr bg1
Brctl addif bg1 em2
Brctl addif bg1 em3
Ifconfig bg1 up
Bg1 is the name of the configured bridge.
(4) Test the bridge
Try connecting the server to the network to see if the Intranet can access the Internet normally. Theoretically, as long as the network card is not inserted incorrectly. 99.999999% is normal. After all, it is quite simple.
(5) install Postgresql, Apache, and Php
Apt-get install postgresql # install the database
Apt-get install apache2 # install apache
Apt-get install php5 # install php language support
Apt-get install php5-pgsql # support for php connection to postgresql database
Apt-get install php5-gd # supports php to read images from the database
If the database installation is unclear, refer:
(Configure PostgreSQL and phpPgAdmin in Ubuntu 12.04)
(6) install Bandwitdhd
Create a Bandwidthd database and an account first
Create user bandwidthdpgsql;
Alter user bandwidthdpgsql PASSWORD '123 ';
Create database bandwidthdpgsql;
Then install the Bandwidthd package.
Apt-get install bandwidthd-pgsql
For detailed Bandwidthd installation instructions, refer:
(Bandwidthd + Postgresql database configuration notes)
For more details, please continue to read the highlights on the next page:
PostgreSQL details: click here
PostgreSQL: click here
PostgreSQL cache details
Compiling PostgreSQL on Windows
Configuration and installation of LAPP (Linux + Apache + PostgreSQL + PHP) Environment in Ubuntu
Install and configure phppgAdmin on Ubuntu