Category : Linux

LXD Setup

#apt-get install lxd root@madmax:~# lxd init error: You have existing containers or images. lxd init requires an empty LXD. Listing containers #lxc list root@madmax:~# lxc list +———-+———+———————-+——+————+———–+ | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | +———-+———+———————-+——+————+———–+ | c1-u1604 | RUNNING | 10.200.105.36 (eth0) | | PERSISTENT | 0 | +———-+———+———————-+——+————+———–+

Read More →

PHP 5.6 on Ubuntu 16.04 LTS

As from Ubuntu 16.04 the default PHP version is 7. Should you want to install the PHP5 packages, you need to add a repository. Lets add two repositories, one for Apache2 and PHP5 #add-apt-repository ppa:ondrej/apache2 #add-apt-repository ppa:ondrej/php After adding the repositories, update APT:- #apt-get update Once the update is done, you are ready to install

Read More →

LCX/LXD Cheatsheet – Snapshots

Container Information / List Snapshots for a Container #lxd info CONTAINER-NAME –verbose Create Snapshots #lxc snapshot CONTAINER-NAME #lxc snapshot CONTAINER-NAME Restore Container from Snapshot #lxc restore CONTAINER-NAME/CONTAINER-NAME Rename / Move a Snapshot lxc move CONTAINER-NAME/SNAPSHOT-NAME CONTAINER-NAME/NEW-SNAPSHOT-NAME Create a Container from a Snapshot lxc copy CONTAINER-NAME/SNAPSHOT-NAME NEW-CONTAINER-NAME Delete a Snapshot lxc delete CONTAINER-NAME/SNAPSHOT-NAME Cloning lxc copy

Read More →

Escaping a password using mysqldump console

If your password has any of the following characters You must do this if the password has any of the following characters: * ? [ < > & ; ! | $ ( ) You need to escape the password using single quotes (‘), i.e. mysql -u root -p’PASSWORD’