Tuesday, February 27, 2018

Document Server and ownCloud Docker installation

Requirements

Installation

  1. Get the latest version of this repository running the command:
git clone --recursive https://github.com/ONLYOFFICE/docker-onlyoffice-owncloud
cd docker-onlyoffice-owncloud
git submodule update --remote
  1. Edit the docker-compose.yml file (if you want to connect Document Server to Nextcloud), opening it and altering the image: owncloud:fpm line:
image: nextcloud:fpm
This step is optional and, if you want to use Document Server with ownCloud, you do not need to change anything.
  1. Run Docker Compose:
sudo docker-compose up -d
Please note: you might need to wait a couple of minutes when all the containers are up and running after the above command.
  1. Now launch the browser and enter the webserver address. The ownCloud/Nextcloud wizard webpage will be opened. Enter all the necessary data to complete the wizard.
  2. Go to the project folder and run the set_configuration.sh script:
sudo bash set_configuration.sh
Now you can enter ownCloud/Nextcloud and create a new document. It will be opened in ONLYOFFICE Document Server.

Tuesday, February 13, 2018

Remove Old Kernels via DPKG


If your /boot partition has already full while doing an upgrade or package install, and apt (the script above uses apt) can’t remove packages due to broken dependency, here you can manually find out the old kernel packages and remove them via DPKG:
1. Run command to check out current kernel and DON’T REMOVE it:
uname -r
2. List all kernels excluding the current booted:
dpkg -l | tail -n +6 | grep -E 'linux-image-[0-9]+' | grep -Fv $(uname -r)
Example output:
rc  linux-image-4.4.0-15-generic               4.4.0-15.31                                         amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-18-generic               4.4.0-18.34                                         amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.6.0-040600rc3-generic        4.6.0-040600rc3.201604120934                        amd64        Linux kernel image for version 4.6.0 on 64 bit x86 SMP
There will be three status in the listed kernel images:
  • rc: means it has already been removed.
  • ii: means installed, eligible for removal.
  • iU: DON’T REMOVE. It means not installed, but queued for install in apt.
3. Lsit all kernels that can deleted
dpkg -l linux-image-\* | grep ^ii
4. Remove old kernel images in status ii, it’s “linux-image-4.4.0-18-generic” in the example above:
sudo dpkg --purge linux-image-4.4.0-18-generic
If the command fails, remove the dependency packages that the output tells you via sudo dpkg --purge PACKAGE.
And also try to remove the respective header and common header packages (Don’t worry if the command fails):
sudo dpkg --purge linux-image-4.4.0-18-header linux-image-4.4.0-18
5. Finally you may fix the apt broken dependency via command:
sudo apt -f install

Wednesday, August 23, 2017

How to fix DRBD recovery from split brain

Step 1: Start drbd manually on both nodes
Step 2: Define one node as secondary and discard data on this
drbdadm secondary all
drbdadm disconnect all
drbdadm -- --discard-my-data connect all
Step 3: Define anoher node as primary and connect
drbdadm primary all
drbdadm disconnect all
drbdadm connect all