Warning: phpinfo(): It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /var/www/vhosts/domain.com/httpdocs/phpinfo.php on line 4

nano /var/www/vhosts/system/domain.com/etc/php.ini

Add the following if it does not exist

date.timezone = America/Denver

Sender Policy Framework (SPF) is a method of fighting spam. As more time passes, this protocol will be used as one of the standard methods of fighting spam on the Internet. An SPF record is a TXT record that is part of a domain’s DNS zone file. The TXT record specifies a list of authorized host names/IP addresses that mail can originate from for a given domain name. Once this entry is placed within the DNS zone, no further configuration is necessary to take advantage of servers that incorporate SPF checking into their anti-spam systems. This SPF record is added the same way as a regular A, MX, or CNAME record.


v=spf1 mx a ip4:192.55.182.34 ~all

* Make sure the IP above has an A record set in the DNS zone

Default:


"v=spf1 a mx ~all"
“v=spf1 a mx ip4:IP.ADD.RE.SS include:mail.domain.com ~all”

Example:


domain.com. IN TXT “v=spf1 a mx ip4:IP.ADD.RE.SS include:spf.messaging.microsoft.com include:mail.domain2.com ~all”

Description:

When should I use one?

An SPF record is generally used when your company is trying to avoid people using your domain for SPAM. The thing you need to know when working with SurveyGizmo is making sure that if you do have an SPF record, that we are whitelisted in it. Whitelisting us will allow you to use your domain as the FROM field when using the SurveyGizmo application to send out email campaigns or send email actions.

What should I avoid?

If you don’t have an SPF record already in place, then we don’t recommend setting one up mid-campaign. Adding one will most likely not increase your deliverability in any way.

If you already have an SPF record, or are setting one up for other purposes, you’ll want to make sure you don’t set it to only allow SurveyGizmo. If you do, then you won’t be able to send out emails from any other servers.

If I have an SPF record, and need to whitelist SurveyGizmo, what should I use?

If you already have an SPF record set up on the domain you want to send emails from, then we recommend adding the following IP addresses to your SPF.


ipv4:74.63.000.0/24

This will include our servers in your preferred server list. You can also use “include:sgizmo.com”, however, the IP addresses above are more practical. If you were to use “include:sgizmo.com” it would include all of our SPF records, which is excessive as we have internal SurveyGizmo IP addresses that the application doesn’t use.

How to make one

http://www.microsoft.com/mscorp/safety/content/technologies/senderid/wizard/

SPF – v=spf1 +a +mx +ip4:67.228.44.45 ?all

You can find more about SPF records here:

http://www.openspf.org/
http://en.wikipedia.org/wiki/Sender_Policy_FrameworkHome
Server Status

and you can generate an SPF record here:

http://www.microsoft.com/mscorp/safety/content/technologies/senderid/wizard/

Keep it mind that http is a stateless protocol. Each line can represent one client opening multiple sockets to grab different files (css, images, etc) that will hang out for awhile in a timewait state.

To display only active Internet connections to the server at port 80 and sort the results, allow to recognize many connections coming from one IP

# netstat -an | grep :80 | sort

To display the list of the all IP addresses involved instead of just count.

# netstat -n -p | grep SYN_REC | sort -u

Slow Server

# netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n 

# netstat -nat | grep :80 | grep ESTAB | wc -l

# netstat -nat | grep :80 | gawk '{ print $5; }' | gawk -F: '{ print $1 }' | sort | uniq -c | sort -n

# netstat -an|grep ":80"|awk '/tcp/ {print $6}'|sort -nr| uniq -c | sort -n

# netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1

For Java?

# netstat -nat | grep :1935 | gawk '{ print $5; }' | gawk -F: '{ print $1 }' | sort | uniq -c | sort -n

Need to optimize?

http://httpd.apache.org/docs/2.2/misc/perf-tuning.html
http://blog.monitis.com/2011/07/05/25-apache-performance-tuning-tips/
http://stackoverflow.com/questions/8902103/is-there-an-apache-tuner-script-like-mysqltuner-pl

1. Configure: error: Please reinstall the BZip2 distribution
# yum install bzip2-devel
2. Configure: error: DBA: Could not find necessary header file(s).
# yum install gdbm-devel
# yum install db4-devel
3. Configure: error: libjpeg.(a|so) not found.
# yum install libjpeg-devel
4. Configure: error: libpng.(a|so) not found.
# yum install libpng-devel
5. Configure: error: freetype.h not found.
# yum install freetype-devel
6. configure: error: Please reinstall the libcurl distribution
# yum install curl
# yum install curl-devel
7. Configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
# yum install libxslt-devel >>>> fixed
8. xml2-config not found. Please check your libxml2 installation.
# yum install libxml2-devel
9. Kalau error Perl-URI
#wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/perl-URI-1.35-3.noarch.rpm
#rpm -i perl-URI-1.35-3.noarch.rpm
10. Configure: error: utf8_mime2text() has new signature
#yum install libc-client-devel
11. Configure: error: libXpm.(a|so) not found.
# yum install gd-devel
atau
#up2date -i gd-devel
12. configure: error: Cannot find OpenSSL’s
# yum install openssl-deve
13. Checking for PCRE headers location… configure: error: Could not find pcre.h in /usr
# yum install pcre-devel
14. Configure: error: Unable to locate gmp.h
# yum install gmp-devel
15. configure: error: Cannot find pspell
# yum install aspell-devel
16. The ‘links’ package is required for this functionality.
# yum search links
# yum install elinks
17. Error : [warn] module php5_module is already loaded, skipping
# edit httpd.conf terus Uncomment : #LoadModule php5_module modules/libphp5.so
18. Configure: error: Did not find pcre-config script at /usr/local
# yum -y install pcre-devel
19. warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID e8562897
# rpm -import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
ERROR: cannot restore segment prot after reloc: Permission denied
Solution:
chcon -t texrel_shlib_t /etc/httpd/modules/libphp5.so
20. Configure: error: mcrypt.h not found. Please reinstall libmcrypt

Source: http://kb.odin.com/en/118378

php version – php-5.4.31

CentOS 6.5
Plesk Panel 12.0
Current php version 5.3

1. SSH to your Plesk server (or Apache Service Node for Parallels Plesk Automation) as root, download the PHP source, unpack it, and configure it:

# cd /usr/local/src
# mkdir php540
# cd php540
# wget http://www.php.net/get/php-5.4.31.tar.gz/from/at2.php.net/mirror
# tar xzvf php-5.4.0.tar.gz
# cd php-5.4.0
# ./configure '--with-libdir=lib64' '--cache-file=../config.cache' '--prefix=/usr/local/php540-cgi' '--with-config-file-path=/usr/local/php540-cgi/etc' '--disable-debug' '--with-pic' '--disable-rpath' '--enable-fastcgi' '--with-bz2' '--with-curl' '--with-freetype-dir=/usr/local/php540-cgi' '--with-png-dir=/usr/local/php540-cgi' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr/local/php540-cgi' '--with-openssl' '--with-pspell' '--with-pcre-regex' '--with-zlib' '--enable-exif' '--enable-ftp' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-wddx' '--with-kerberos' '--with-unixODBC=/usr' '--enable-shmop' '--enable-calendar' '--without-sqlite3' '--with-libxml-dir=/usr/local/php540-cgi' '--enable-pcntl' '--with-imap' '--with-imap-ssl' '--enable-mbstring' '--enable-mbregex' '--with-gd' '--enable-bcmath' '--with-xmlrpc' '--with-ldap' '--with-ldap-sasl' '--with-mysql=/usr' '--with-mysqli' '--with-snmp' '--enable-soap' '--with-xsl' '--enable-xmlreader' '--enable-xmlwriter' '--enable-pdo' '--with-pdo-mysql' '--with-pdo-pgsql' '--with-pear=/usr/local/php540-cgi/pear' '--with-mcrypt' '--enable-intl' '--without-pdo-sqlite' '--with-config-file-scan-dir=/usr/local/php540-cgi/php.d'

Note: You MUST USE THE PREFIX SWITCH in order for your new PHP to be installed inside a single directory. As you can see, the prefix here is /usr/local/php540-cgi/

Note: Above are the sample command line arguments you may encounter with errors regarding the absence of a package (e.g. mysql-devel). The default arguments are described in the documentation

Choosing a prefix is very important because it prevents your new PHP installation from interfering with the other PHP installations available on the server.

Compile and install PHP:

# make
# make install

Set up php.ini:

# cp php.ini-development /usr/local/php540-cgi/php.ini

You can edit the php.ini file to set PHP options. If you prefer having php.ini in another location, run the configure utility with the option –with-config-file-path=/some/path in step #1.

Register the new PHP version:

In Parallels Plesk Panel

    /usr/local/psa/bin/php_handler --add -displayname  -path  -phpini  -type  -id 

where

-displayname is the PHP version name that will be shown in the Plesk UI. We recommend you include the version number in the displayname. For example, you could name the version “5.3.3-custom”.

-path is the location of the PHP CGI binary file. You can find this in the output of the command make install in the line Installing PHP CGI binary. For example, if you see the line Installing PHP CGI binary: /usr/local/bin/, the location you need to specify is /usr/local/bin/php-cgi. Learn more at the Official PHP web Site.

-phpini is the location of the php.ini file, for example, /some/path/php.ini .

-type is the type of the PHP handler associated with this version. Learn more about PHP handlers in the section: PHP Handlers.

Important: You can set either the CGI or FastCGI PHP handler. mod_php is not supported.
-id (optional) is the identifier you will use when referring to this PHP version (for example, when adjusting or removing it).

Compile errors.

Error:

#error: xml2-config not found. Please check your libxml2 installation

Solution:

# yum install libxml2-devel

Error:

#configure: error: Cannot find OpenSSL's 

Solution:

# yum install openssl-devel

Error:

# configure: error: Please reinstall the BZip2 distribution

Solution:

# yum install bzip2-devel

Error:

# configure: error: jpeglib.h not found.

Solution:

# yum install libjpeg-devel

Error:

# configure: error: png.h not found.

Solution:

# yum install libpng-devel

Error:

# Configure: error: freetype.h not found.

Solution:

# yum install freetype-devel

Error:

# Configure: error: Unable to locate gmp.h

Solution:

# yum install gmp-devel

Error:

# configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.

Solution:

# yum install libc-client-devel 

Error: Multilib version problems found. This often means that the root
cause is something else and multilib version checking is just
pointing out that there is a problem. Eg.:

1. You have an upgrade for libc-client which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of libc-client of the
different architecture. If you exclude the bad architecture
yum will tell you what the root cause is (which package
requires what). You can try redoing the upgrade with
–exclude libc-client.otherarch … this should give you an error
message showing the root cause of the problem.

2. You have multiple architectures of libc-client installed, but
yum can only see an upgrade for one of those arcitectures.
If you don’t want/need both architectures anymore then you
can remove the one with the missing update and everything
will work.

3. You have duplicate versions of libc-client installed already.
You can use “yum check” to get yum show these errors.

…you can also use –setopt=protected_multilib=false to remove
this checking, however this is almost never the correct thing to
do as something else is very likely to go wrong (often causing
much more problems).

Protected multilib versions: libc-client-2007e-11.el6.i686 != libc-client-2007e-11.el6.art.x86_64
You could try using –skip-broken to work around the problem
You could try running: rpm -Va –nofiles –nodigest

I searched and the fix was to enable the atomic repo that was installed but disabled.

nano /etc/yum.repos.d/atomic
enabled = 1
# configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works.
# yum install libicu-devel
# configure: error: mcrypt.h not found. Please reinstall libmcrypt.
# yum install libmcrypt libmcrypt-devel

Then I got another:

Error: Package: libmcrypt-devel-2.5.7-5.el6.art.x86_64 (atomic)
Requires: libmcrypt = 2.5.7-5.el6.art
Installed: libmcrypt-2.5.8-9.el6.x86_64 (@epel)
libmcrypt = 2.5.8-9.el6
Available: libmcrypt-2.5.7-5.el6.art.x86_64 (atomic)
libmcrypt = 2.5.7-5.el6.art
You could try using –skip-broken to work around the problem
You could try running: rpm -Va –nofiles –nodigest

I disabled atomic repo and then got:

Error: Package: libmcrypt-devel-2.5.7-1.2.el6.rf.x86_64 (rpmforge)
Requires: libmcrypt = 2.5.7-1.2.el6.rf
Installed: libmcrypt-2.5.8-9.el6.x86_64 (@epel)
libmcrypt = 2.5.8-9.el6
Available: libmcrypt-2.5.7-1.2.el6.rf.x86_64 (rpmforge)
libmcrypt = 2.5.7-1.2.el6.rf
You could try using –skip-broken to work around the problem
You could try running: rpm -Va –nofiles –nodigest

I disabled rpmforge repo enabled the epel repo.

# configure: error: Cannot find MySQL header files under /usr.
# yum install mysql-devel
# configure: error: ODBC header file '/usr/include/sqlext.h' not found!
# yum install unixODBC-devel
# configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path
# yum install postgresql-devel
# configure: error: Cannot find pspell
#yum install aspell-devel
# configure: error: Could not find net-snmp-config binary. Please check your net-snmp installation.
# yum install net-snmp-devel
# error: xslt-config not found
# yum install libxslt-devel

PHP error for fastcgi

Thank you for using PHP.

config.status: creating php5.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating sapi/cgi/php-cgi.1
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: executing default commands
configure: WARNING: unrecognized options: --enable-fastcgi

From – http://php.net/manual/en/configure.about.php

-enable-fastcgi
If this is enabled, the CGI module will be built with support for FastCGI also. Available since PHP 4.3.0
As of PHP 5.3.0 this argument no longer exists and is enabled by –enable-cgi instead.

So, I changed the option:

# --enable-fastcgi

to

# --enable-cgi

New configure string:

 ./configure '--with-libdir=lib64' '--cache-file=../config.cache' '--prefix=/usr/local/php540-cgi' '--with-config-file-path=/usr/local/php540-cgi/etc' '--disable-debug' '--with-pic' '--disable-rpath' '--enable-cgi' '--with-bz2' '--with-curl' '--with-freetype-dir=/usr/local/php540-cgi' '--with-png-dir=/usr/local/php540-cgi' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr/local/php540-cgi' '--with-openssl' '--with-pspell' '--with-pcre-regex' '--with-zlib' '--enable-exif' '--enable-ftp' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-wddx' '--with-kerberos' '--with-unixODBC=/usr' '--enable-shmop' '--enable-calendar' '--without-sqlite3' '--with-libxml-dir=/usr/local/php540-cgi' '--enable-pcntl' '--with-imap' '--with-imap-ssl' '--enable-mbstring' '--enable-mbregex' '--with-gd' '--enable-bcmath' '--with-xmlrpc' '--with-ldap' '--with-ldap-sasl' '--with-mysql=/usr' '--with-mysqli' '--with-snmp' '--enable-soap' '--with-xsl' '--enable-xmlreader' '--enable-xmlwriter' '--enable-pdo' '--with-pdo-mysql' '--with-pdo-pgsql' '--with-pear=/usr/local/php540-cgi/pear' '--with-mcrypt' '--enable-intl' '--without-pdo-sqlite' '--with-config-file-scan-dir=/usr/local/php540-cgi/php.d'

And, no errors

License:                                                           |
| This software is subject to the PHP License, available in this     |
| distribution in the file LICENSE.  By continuing this installation |
| process, you are bound by the terms of this license agreement.     |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point.                            |
+--------------------------------------------------------------------+

Thank you for using PHP.

Error with "make"
# make
/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

You need to install the Tools needed for development using the GNU Libtool Dynamic Module Loader

yum install libtool-ltdl-devel

Then ran –

# make clean

# make

Generating phar.php
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
invertedregexiterator.inc
clicommand.inc
directorytreeiterator.inc
directorygraphiterator.inc
pharcommand.inc
phar.inc

Build complete.
Don't forget to run 'make test'.

# make test

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #43073 (TrueType bounding box is wrong for angle<>0) freetype < 2.4.10 [ext/gd/tests/bug43073.phpt]
gmp_gcdext() basic tests [ext/gmp/tests/022.phpt]
Bug #64124 IPv6 malformed [ext/snmp/tests/bug64124.phpt]
Bug #64159: Truncated snmpget [ext/snmp/tests/bug64159.phpt]
IPv6 support [ext/snmp/tests/ipv6.phpt]
OO API: getErrno & getError methods [ext/snmp/tests/snmp-object-errno-errstr.phpt]
OO API [ext/snmp/tests/snmp-object.phpt]
Function snmp2_get [ext/snmp/tests/snmp2_get.phpt]
Function snmp2_getnext [ext/snmp/tests/snmp2_getnext.phpt]
Function snmp2_real_walk [ext/snmp/tests/snmp2_real_walk.phpt]
Function snmp2_set (without MIBs loading) [ext/snmp/tests/snmp2_set-nomib.phpt]
Function snmp2_set [ext/snmp/tests/snmp2_set.phpt]
Function snmp2_walk [ext/snmp/tests/snmp2_walk.phpt]
SNMPv3 Support (errors) [ext/snmp/tests/snmp3-error.phpt]
SNMPv3 Support [ext/snmp/tests/snmp3.phpt]
Function snmp_getvalue [ext/snmp/tests/snmp_getvalue.phpt]
Function snmpget [ext/snmp/tests/snmpget.phpt]
Function snmpgetnext [ext/snmp/tests/snmpgetnext.phpt]
Function snmprealwalk [ext/snmp/tests/snmprealwalk.phpt]
Function snmpset (without MIBs loading) [ext/snmp/tests/snmpset-nomib.phpt]
Function snmpset [ext/snmp/tests/snmpset.phpt]
Function snmpwalk [ext/snmp/tests/snmpwalk.phpt]
Bug #32001 (xml_parse*() goes into infinite loop when autodetection in effect), using UTF-* [ext/xml/tests/bug32001.phpt]
=====================================================================

=====================================================================
WARNED TEST SUMMARY
---------------------------------------------------------------------
zend multibyte (2) [ext/mbstring/tests/zend_multibyte-02.phpt] (warn: XFAIL section but test passes)
zend multibyte (6) [ext/mbstring/tests/zend_multibyte-06.phpt] (warn: XFAIL section but test passes)
=====================================================================

You may have found a problem in PHP.
This report can be automatically sent to the PHP QA team at
http://qa.php.net/reports and http://news.php.net/php.qa.reports
This gives us a better understanding of PHP's behavior.
If you don't want to send the report immediately you can choose
option "s" to save it.  You can then email it to qa-reports@lists.php.net later.
Do you want to send this report now? [Yns]:

# make install

[root@austin php-5.4.31]# make install
Installing PHP CLI binary:        /usr/local/php540-cgi/bin/
Installing PHP CLI man page:      /usr/local/php540-cgi/php/man/man1/
Installing PHP CGI binary:        /usr/local/php540-cgi/bin/
Installing PHP CGI man page:      /usr/local/php540-cgi/php/man/man1/
Installing build environment:     /usr/local/php540-cgi/lib/php/build/
Installing header files:          /usr/local/php540-cgi/include/php/
Installing helper programs:       /usr/local/php540-cgi/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php540-cgi/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/php540-cgi/pear/
[PEAR] Archive_Tar    - installed: 1.3.11
[PEAR] Console_Getopt - installed: 1.3.1
[PEAR] Structures_Graph- installed: 1.0.4
[PEAR] XML_Util       - installed: 1.2.3
[PEAR] PEAR           - installed: 1.9.5
Wrote PEAR system config file at: /usr/local/php540-cgi/etc/pear.conf
You may want to add: /usr/local/php540-cgi/pear to your php.ini include_path
/usr/local/src/php540/php-5.4.31/build/shtool install -c ext/phar/phar.phar /usr/local/php540-cgi/bin
ln -s -f /usr/local/php540-cgi/bin/phar.phar /usr/local/php540-cgi/bin/phar
Installing PDO headers:          /usr/local/php540-cgi/include/php/ext/pdo/

# cp php.ini-development /usr/local/php540-cgi/etc/php.ini
# /usr/local/psa/bin/php_handler --add -displayname 5.4.31-custom -path /usr/local/php540-cgi/bin/ -phpini /usr/local/php540-cgi/etc/php.ini -type fastcgi -id php-5.4.31
ini -type fastcgi -id php-5.4.31
[2014-08-15 21:38:16] ERR [util_exec] proc_close() failed
Unable to register the PHP handler: can not get version from /usr/local/php540-cgi/bin/

Changed the path to – /usr/local/php540-cgi/bin/php-cgi

/usr/local/psa/bin/php_handler --add -displayname 5.4.31-custom -path /usr/local/php540-cgi/bin/php-cgi -phpini /usr/local/php540-cgi/etc/php.ini -type fastcgi -id 5.4.31-custom
The new PHP handler with the id "5.4.31-custom" was successfully registered.

The – login to plesk and thenew php is regsitered and can be selected.

new-php-plesk

There is also a great article for Plesk and the REMI Repo install. http://kb.sp.parallels.com/en/115833

 

Let’s say that you need to delete a plesk domain with email and recreate it.

1. Recording the email addresses and passwords (over ssh you can use the command /usr/local/psa/admin/bin/mail_auth_view to show addresses and passwords)

2. Making a copy or renaming of the folder /var/qmail/mailnames/domain.com to something like /var/qmail/mailnames/domain.com.BAK

3. Deletion of the Alias and addresses

4. Creating domain.com as a domain in plesk

5. Manually recreating the email addresses for domain.com under the Mail tab for the domain in plesk.

6. Moving the /var/qmail/mailnames/domain.com.BAK directory back to its original location or rename back to /var/qmail/mailnames/domain.com

7. Ensure that the owner and group of the directory is popuser:popuser by running the command (chown -R popuser:popuser /var/qmail/mailnames/domain.com)

8. Run the plesk tool to rebuild the mail handlers. (/usr/local/psa/admin/sbin/mchk –with-spam)

ssh to the server

# cd /etc/sysconfig/network-scripts
# ls -l | grep ifcfg-eth
-rw-r--r-- 1 root root   119 Jan 11 19:16 ifcfg-eth0
-rw-r--r-- 1 root root   119 Jan  3 08:45 ifcfg-eth0.bak
-rw-r--r-- 1 root root   119 Feb 24 04:34 ifcfg-eth1
-rw-r--r-- 1 root root   128 Jan 19 18:20 ifcfg-eth1.bak

If the main adapter is called “eth0” you have to call the next (virtual) adapter in a sequential order like so:

ifcfg-eth0 (primary adapter, physical)
ifcfg-eth0:1 (first virtual adapter to the physical primary adapter)
ifcfg-eth0:2 (second virtual adapter to the physical primary adapter)

Copy our primary adapter configuration file and name it to be the first virtual adapter:


# cp ifcfg-eth0 ifcfg-eth0:1
# ls -l | grep ifcfg-eth
-rw-r--r-- 1 root root   119 Jan 11 19:16 ifcfg-eth0
-rw-r--r-- 1 root root   119 Feb 24 08:53 ifcfg-eth0:1
-rw-r--r-- 1 root root   119 Jan  3 08:45 ifcfg-eth0.bak
-rw-r--r-- 1 root root   119 Feb 24 04:34 ifcfg-eth1
-rw-r--r-- 1 root root   128 Jan 19 18:20 ifcfg-eth1.bak

Configure this virtual adapter to be a static IP, no hardware address (MAC), configure netmask and of course rename the device.


# vim ifcfg-eth0:1
DEVICE=eth0:1
BOOTPROTO=static
ONBOOT=yes
IPADDR=10.1.1.2
NETMASK=255.255.255.0

There is no need to specify a MAC address – it is a virtual adapter and there is also no need to specify a default gateway as it is already routed through the primary adapter. Basically there are only four things that you will need to change:

File name for the adapter itself
DEVICE= (should correspond with the file name)
IPADDR=
NETMASK=

Restart the networking service:


# service network restart

That’s it; lets check ifconfig to make sure the virtual adapter is there and working:


# ifconfig eth0:1
eth0:1    Link encap:Ethernet  HWaddr 08:00:27:ED:05:B7
inet addr:10.1.1.2  Bcast:10.1.1.255  Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1


# ping 10.1.1.2
PING 10.1.1.2 (10.1.1.2) 56(84) bytes of data.
64 bytes from 10.1.1.2: icmp_seq=1 ttl=64 time=0.073 ms
64 bytes from 10.1.1.2: icmp_seq=2 ttl=64 time=0.042 ms
64 bytes from 10.1.1.2: icmp_seq=3 ttl=64 time=0.029 ms
64 bytes from 10.1.1.2: icmp_seq=4 ttl=64 time=0.029 ms
--- 10.1.1.2 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2999ms
rtt min/avg/max/mdev = 0.029/0.043/0.073/0.018 ms

http://httpd.apache.org/docs/2.2/programs/ab.html

http://www.cyberciti.biz/tips/howto-performance-benchmarks-a-web-server.html


ab -c 50 -n 10000 URL_TO_THE_SITE

-n 10000: ab will send 1000 number of requests to server 202.54.200.1 in order to perform for the benchmarking session
-c 50 : 50 is concurrency number i.e. ab will send 50 number of multiple requests to perform at a time to server 202.54.200.1

Login to Linux/bsd desktop computer and type following command:


$ ab -n 1000 -c 5 http://202.54.200.1/snkpage.html

Where,

-n 1000: ab will send 1000 number of requests to server 202.54.200.1 in order to perform for the benchmarking session
-c 5 : 5 is concurrency number i.e. ab will send 5 number of multiple requests to perform at a time to server 202.54.200.1
For example if you want to send 10 request, type following command:

Passive Mode

To enable FTP Passive Mode on Plesk systems, you will need to first edit the proftpd.conf file in /etc/

nano /etc/proftpd.conf

Then find the following lines

# delay on login off (are included on newest Plesk) 
IdentLookups off
UseReverseDNS off

Under the lines above, add the following and save the file.

# Custom directives
PassivePorts 60000 65000

Now restart xinetd

service xinetd restart

Once xinetd is restarted, you need to add the port range to the Plesk Firewall. Modules > Firewall > Edit Firewall Configuration > Add Custom Rule
Select Incoming, Allow, then add the port range 60000-65000, TCP and OK.

WHM/ cPanel

nano /etc/pure-ftp.conf

PassivePortRange 60000 65000

service pure-ftp restart

Now, log into WHM and edit the firewall:

ConfigServer Security & Firewall > Firewall Configuration. Add port range 60000:65000 to the TCP_IN rules and save!

Update: Configuring the Passive FTP Mode on a Microsoft Azure Instance
See this article: https://docs.plesk.com/en-US/onyx/deployment-guide/plesk-installation-and-upgrade-on-public-cloud-services/installing-plesk-on-microsoft-azure/configuring-the-passive-ftp-mode-on-a-microsoft-azure-instance.79079/

You need to configure following files for IPv6 configuration:

— /etc/sysconfig/network : Turn on networking in this file.
— /etc/sysconfig/network-scripts/ifcfg-eth0 : Set default IPv6 router IP and server IP address in this file.

Open /etc/sysconfig/network file:

[root@austin log]# nano /etc/sysconfig/network

Add to the following line:


NETWORKING_IPV6=yes

Open /etc/sysconfig/network-scripts/ifcfg-eth0 (1st network config file)


[root@austin log]# nano /etc/sysconfig/network-scripts/ifcfg-eth0

# =============================================================
# Network Interface Script generated by BareMetal
# =============================================================
DEVICE=eth0
BOOTPROTO=STATIC
ONBOOT=yes
IPADDR=216.55.162.31
NETMASK=255.255.255.0
HWADDR=6C:62:6D:47:A4:C3
IPV6INIT=yes
IPV6ADDR=3607:f0d0:1102:0011:0000:0001:0000:0002
IPV6_DEFAULTGW=5607:f0d0:1002:0011:0000:0000:0000:0002

Save and close the file. Restart networking:


[root@austin log]# service network restart

Verify your configuration by pinging ipv6 enabled site such as ipv6.google.com:



[root@austin log]# ping6 ipv6.google.com

[/bash]