Using PHP 7.0 on Ubuntu 16.04 LTS Ubuntu 16.04 has switched to PHP 7.0 with a new infrastructure for PHP package. So, no, you can’t install php5 on Ubuntu 16.04, but you can install PHP 7.0 packages with: apt-get install libapache2-mod-php That will install a virtual package that depends on the latest PHP version and pull libapache2-mod-php7.0 as a dependency. If you are looking for extensions, always use a version-less variant as well (e.g. php-apcu instead of php7.0-apcu) as the PECL extensions are packaged without the version to allow smooth upgrades. Using PHP PPA to coinstall PHP 5.6 with PHP 7.0 There’s an option toRead More →

  If you use the default Photos App on Windows 10, you will see that the photo is not clear. When we use Windows 7, we have Windows Photo Viewer, it’s clearer, now we dont see it any more. Here is the trick to restore the Windows Photo Viewer app. Copy the following content  and save it as a file with .reg extension Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Classes\.jpg] @=”PhotoViewer.FileAssoc.Tiff” [HKEY_CURRENT_USER\Software\Classes\.jpeg] @=”PhotoViewer.FileAssoc.Tiff” [HKEY_CURRENT_USER\Software\Classes\.gif] @=”PhotoViewer.FileAssoc.Tiff” [HKEY_CURRENT_USER\Software\Classes\.png] @=”PhotoViewer.FileAssoc.Tiff” [HKEY_CURRENT_USER\Software\Classes\.bmp] @=”PhotoViewer.FileAssoc.Tiff” [HKEY_CURRENT_USER\Software\Classes\.tiff] @=”PhotoViewer.FileAssoc.Tiff” [HKEY_CURRENT_USER\Software\Classes\.ico] @=”PhotoViewer.FileAssoc.Tiff” Double click on the file you just save. Select Yes to import this content into your registry. Now, right click on any photoRead More →

Upgrade the version: sudo apt-add-repository ‘deb http://archive.ubuntu.com/ubuntu yakkety main universe multiverse’ sudo apt-get update sudo apt-get install openssh-server=1:7.3p1-1 or we can install from source: wget http://mirror.exonetric.net/pub/OpenBSD/OpenSSH/portable/openssh-7.2p2.tar.gz tar -zxvf openssh-7.2p2.tar.gz cd openssh-7.2p2 ./configure make sudo make install  Read More →

SQL Thread is not running When relay log is corrupted  , meaning the slave server is stopped unexpectedly How to fix: – run show slave , we’ll see the IO thread running but SQL thread is not working. – check Relay_Log_File name , for example , mysqld_3308-relay-bin.000044 then we know that 44 is corrupted, so we’ll increase it stop slave; change MASTER To Relay_Log_File=’mysqld_3308-relay-bin.000045′,Relay_Log_Pos=4; start slave; SQL IO is not runnning run show slave to check Master_Log_File  value , then increase it to 1 Check  : Master_Log_File mysql-bin.003591 stop slave; change MASTER To Master_Log_File=’mysql-bin.003592′,MASTER_LOG_POS=4; start slave;  Read More →

Dump multiple databases: mysqldump -u root -p –databases db1 db2 db3 >dump.sql Dump some selected tables: mysqldump -u mysqlusername -p databasename table1 table2 table3 > databasebackup.sql Dome all tables except some tables: mysqldump -u username -p database –ignore-table=database.table1 –ignore-table=database.table2 > database.sql  Read More →

1. Set all ssh account to use bash shell by default , /etc/passwd 2. Make sure that you have install exim or postfix or any other email tool to send mail 3. Edit /etc/bash.bashrc , and the below lines echo ‘Date:’ `date` $’\n’WhoAmI: `whoami` \ $’\n’Who: $’\n'”`who`” \ $’\n’Netstat: $’\n'”`netstat -nt | grep EST`” \ $’\n’Process: $’\n'”`ps -aux`” \ | mail -aFrom:[email protected] -s “Security Alert: SSH Access(`hostname -s`)” [email protected] This script will send the following info : Date , WhoAMI, who , netstat, processlist 4. Test (1) Copying the above code in your shell and run , make sure that you receive the email (2)Read More →

When you run apt-get install , you got some error this dpkg: dependency problems prevent configuration of linux-server: linux-server depends on linux-image-server (= 3.2.0.88.102); however: Version of linux-image-server on system is 3.2.0.113.129. linux-server depends on linux-headers-server (= 3.2.0.88.102); however: Version of linux-headers-server on system is 3.2.0.113.129. dpkg: error processing linux-server (–configure): Run the following command will fix the issue: apt-get remove linux-server apt-get install linux-serverRead More →