Tag: debian

  • Install x11vnc on Ubuntu

    To install x11vnc on Debian/Ubuntu, run

    apt install -y x11vnc
    

    To start vnc server, run

    x11vnc -display :0
    

    By default, there will be no password. To set password, run

    x11vnc -storepasswd
    

    To start x11vnc server with password, run

    x11vnc -rfbauth ~/.vnc/passwd
    
  • Upgrade Debian 8 Jessie To Debian 9 Stretch

    Upgrade Debian 8 Jessie To Debian 9 Stretch

    debian linux

    Upgrading server on a remote location is not safe unless you have KVM access. I did many Debian 8 to Debian 9 upgrade on remote server with out probem. On one server, network card name chaned from eth0 to new enp4s0 format. I had to access the server using KVM and fix network configuration by editing /etc/network/interfaces

    First you need to upgrade all software on your server to latest Debian 8

    apt update && apt upgrade -y && apt dist-upgrade -y
    

    Now replace content of /etc/apt/sources.list file with following

    vi /etc/apt/sources.list
    

    Add

    deb http://cloudfront.debian.net/debian/ stretch main non-free contrib
    deb-src http://cloudfront.debian.net/debian/ stretch main non-free contrib
    
    deb http://security.debian.org/debian-security stretch/updates main contrib non-free
    deb-src http://security.debian.org/debian-security stretch/updates main contrib non-free
    

    Update the software again with

    apt update && apt upgrade -y && apt dist-upgrade -y
    

    It can take some time for the upgrade to finish. Once update complete, you can check with lsb_release -a command, you will see

    debian upgrade

    Remove unused packages with command

    apt autoremove -y
    

    At this stage, server stil use old debian 8 kernal.

    root@v2m2:~# uname -r
    3.16.0-6-amd64
    root@v2m2:~# 
    

    To boot to new Debian 9 kernal, reboot the server with

    reboot
    

    After reboot, you will see new kernal.

    Now Debian 10 is available. See How to upgrade Debian 9 to Debian 10

  • Install PHP 5.6 on Debian 9 Plesk Server

    Install PHP 5.6 on Debian 9 Plesk Server

    To install PHP 5.6 on Debian 9 Plesk Server, add sury.org repository

    apt install apt-transport-https lsb-release ca-certificates -y
    wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
    echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
    

    Install PHP 5.6 with apt

    apt-get update
    apt-get install php5.6 php5.6-fpm php5.6-cgi php5.6-mysql php5.6-xsl php5.6-xml php5.6-tidy php5.6-recode php5.6-mcrypt php5.6-mbstring php5.6-intl php5.6-gd php5.6-curl php5.6-json php5.6-imagick php5.6-bcmath php5.6-readline php5.6-sqlite3
    

    Optional: Enable PHP 5.6 as default CLI

    update-alternatives --config php
    

    This will show all available PHP version, select the default version for command line.

    Enable PHP 5.6 in Plesk

    plesk bin php_handler --add -displayname "5.6 by sury.org" -path /usr/bin/php-cgi5.6 -clipath /usr/bin/php5.6 -phpini /etc/php/5.6/cgi/etc/php.ini -type cgi -id "php56-cgi"
    plesk bin php_handler --add -displayname "5.6 by sury.org" -path /usr/bin/php-cgi5.6 -clipath /usr/bin/php5.6 -phpini /etc/php/5.6/cgi/etc/php.ini -type fastcgi -id "php56-fastcgi"
    plesk bin php_handler --add -displayname "5.6 by sury.org" -path /usr/sbin/php-fpm5.6 -clipath /usr/bin/php5.6 -phpini /etc/php/5.6/fpm/etc/php.ini -type fpm -service php5.6-fpm -poold /etc/php/5.6/fpm/pool.d -id "php56-fpm"
    
  • apt – Problem unlinking the file auxfiles

    When i get apt update on a Debian 9 server, i get following error

    # apt update
    Get:1 http://ftp.debian.org/debian stretch-updates InRelease [91.0 kB]
    Hit:2 http://security.debian.org stretch/updates InRelease                                                                          
    Hit:3 https://packages.sury.org/php stretch InRelease                              
    Ign:4 http://ftp.us.debian.org/debian stable InRelease                             
    Hit:5 http://ftp.us.debian.org/debian stable Release
    Fetched 91.0 kB in 0s (165 kB/s)
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    All packages are up to date.
    W: Problem unlinking the file auxfiles - Clean (21: Is a directory)
    # 
    

    The problem is fixed by deleting

    rm -rf /var/lib/apt/lists/