Archive for March, 2016


Devtools2 for CentOS

   Posted by: admin    in Mẹo vặt của hiếu râu

source link

Posted on by Ed Braaten

I needed to compile some source that required a newer version of the GNU GCC compiler than the ancient 4.4.7 20120313 that comes with my fully-up-to-date CentOS 6.5 Linux system. Following the steps below, I was able to install and use devtools-2 which contains a fully functioning 4.8.2 20140120 version of the GNU GCC compiler environment.

  1. Go to the /etc/yum.repos.d/ directory on your system and download the devtools-2.repo file from

  2. cd /etc/yum.repos.d

  3. Install the gcc, binutils, fortran, and C++ packages with:

  4. yum install devtoolset-2-gcc
    yum install devtoolset-2-binutils
    yum install devtoolset-2-gcc-gfortran
    yum install devtoolset-2-gcc-c++

  5. Use the “scl” command to open a shell which is running in the devtools environment:

  6. scl enable devtoolset-2 bash

No mess, no fuss! The devtools-2 environment is fully self-contained and doesn’t impact your distro’s base compiler environment.

=========== UPDATE =============

# 1. Install a package with repository for your system:
# On CentOS, install package centos-release-scl available in CentOS repository:
$ sudo yum install centos-release-scl

# On RHEL, enable RHSCL repository for you system:
$ sudo yum-config-manager --enable rhel-server-rhscl-7-rpms

# 2. Install the collection:
$ sudo yum install devtoolset-6

# 3. Start using software collections:
$ scl enable devtoolset-6 bash

apache mod_qos

   Posted by: admin    in Mẹo vặt của hiếu râu

$ wget

cd tools

./configure make make install

(replace automake-1.14 with -1.11)

$ cd mod_qos-10.15/apache2/
$ apxs2 -i -c mod_qos.c

[root@us conf.d]# cat qos.conf

LoadModule qos_module modules/

# minimum request rate (bytes/sec at request reading):

QS_SrvRequestRate                                 120

# limits the connections for this virtual host:

QS_SrvMaxConn                                     100

# allows keep-alive support till the server reaches 600 connections:

QS_SrvMaxConnClose                                60

# allows max 50 connections from a single ip address:

QS_SrvMaxConnPerIP                                 25

# disables connection restrictions for certain clients:


#QS_SrvMaxConnExcludeIP                    192.168.10.

# allows not more than 20 events/penalty points per 10 minutes:

QS_ClientEventBlockCount                          20

# don’t allow a client to access /app/start.html more than

# 20 times within 10 minutes:

#SetEnvIf     Request_URI /app/start.html          QS_Block=1

# don’t allow more than 4 “403″ status code responses

# (forbidden) for a client within 10 minutes:

QS_SetEnvIfStatus        403                      QS_Block=5

QS_SetEnvIfStatus        301                      QS_Block=2

[root@us conf.d]#


linux performance monitor

   Posted by: admin    in Mẹo vặt của hiếu râu

#vmstat 2



#sar -r

#to be continued …