Php5 en mod (php7-also)

After installing php modules, some are not enabled by default upon installation.

One of those modules is php5-imap and php5-mcrypt is another one.

You have to enable them with php5enmod command.

php5enmod works just like the way a2enmod works for Apache.


 

… php5dismod, just like a2dismod works.

 

  • enabled php modules with…

 

 

php -m” list,

Php Opcache (Php performance Increase – Cache Optimization)

A few words about the OPcache.

OpCode Cache“. “APC” is one of them. “Zend OPcache” is another one; and this Zend OPcache (or OPcache for short) is built into php 5.5, not APC.

The workaround is to disable the OPcache, which is enabled by default. It is a setting in php.ini file.

The question has been raised if disabling the OPcache before installation and enabling it right after would be good enough. While I don’t have a solid answer for that, it should be good enough to keep it disabled during installation and upgrades. I permanately turned it off on my test site.

 

if we can disable the OPcache per site basis. Like disabling it for a DomainCluster  sites and enabling it for others.

Yes,  can do that.

  • Developer can disable OPcache per site basis
  • Developer cannot enable it whenever Developers want it;
  • It should be enabled by default.
  • If developer has disabled it through php.ini file, then you need to revert it back.

Placing below line in your “settings.php” file will disable it.

 

 apache config should

has“AllowOverride All” in order to make the .htaccess method work; which is also a requirement for installing & running other properties.

ispconfig3 ports

How to: Mount a SFTP Folder (SSH + FTP) on Ubuntu Linux using SSHFS & Fuse

Purpose: to mount a remote directory on my local Ubuntu Linux Desktop system using SFTP (which is SSH in an FTP-like fashion).

The goal is to easily gain access to a remote system’s files through another folder on my desktop. Debina/Ubuntu allows you to easily mount SSH folders via the GUI, however, these mounts won’t show up in the terminal (and in some programs).

sshfs to accomplish this.

 Ubuntu’s SSHFS documentation here.

Sshfs and mount

 

  1. add your username to the fuse group.
    1. On Ubuntu, you would open a terminal window and perform the following:

 

  • SFTP server. I created a folder on my desktop called sftp.
  • Once the folder has been created, simply run sshfs using the appropriate login information (host username and IP), the host and local directories, and the SFTP connection is mounted on a folder on my desktop.

Ref: creating a bash alias

 

possible errors and workarounds

 

Create a bash alias to save time and typing


  •  

unmount

Hard drive speed test using Linux command line and hdparm

Note that all tests should be run multiple times and average time should be calculated to get more accurate result.

Bypassing hard drive’s buffer cache memory thus reading directly from the disk.

Read data from the second half of the disk that is if the hard drive size is 100GB.

To obtain cached reads run the following command:

Tcpdump Best Practices

List of interfaces on which tcpdump can listen:


Listen on interface eth0:

Listen on any available interface :

Be verbose while capturing packets:

More verbose while capturing packets:

Very verbose while capturing packets:

Verbose and print the data of each packet in both hex and ASCII, excluding the link level header:

Verbose and print the data of each packet in both hex and ASCII, also including the link level header:

Less verbose (than the default) while capturing packets:

Limit the capture to 100 packets:

Record the packet capture to a file called capture.cap:

Record the packet capture to a file called capture.cap but display on-screen how many packets have been captured in real-time:

Display the packets of a file called capture.cap:

Display the packets using maximum detail of a file called capture.cap:

Display IP addresses and port numbers instead of domain and service names when capturing packets

Capture any packets where the destination host is 192.168.5.1. Display IP addresses and port numbers:

Capture any packets where the source host is 192.168.5.1. Display IP addresses and port numbers:

Capture any packets where the source or destination host is 192.168.5.1. Display IP addresses and port numbers:

Capture any packets where the destination network is 192.168.5.0/24. Display IP addresses and port numbers:

Capture any packets where the source network is 192.168.1.0/24. Display IP addresses and port numbers:

Capture any packets where the source or destination network is 192.168.5.0/24. Display IP addresses and port numbers:

Capture any packets where the destination port is 23. Display IP addresses and port numbers:

Capture any packets where the destination port is is between 1 and 1023 inclusive. Display IP addresses and port numbers:

Capture only TCP packets where the destination port is is between 1 and 1023 inclusive. Display IP addresses and port numbers:

Capture only UDP packets where the destination port is is between 1 and 1023 inclusive. Display IP addresses and port numbers:

Capture any packets with destination IP 192.168.1.1 and destination port 23. Display IP addresses and port numbers:

Capture any packets with destination IP 192.168.5.1 and destination port 80 or 443. Display IP addresses and port numbers:

Capture any ICMP packets:

Capture any ARP packets:

Capture either ICMP or ARP packets:

Capture any packets that are broadcast or multicast:

Capture 500 bytes of data for each packet rather than the default of 68 bytes:

Capture all bytes of data within the packet: