Editing an Ikeepincloud directory on its dedicated server Linux

From EN Ikoula wiki
⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽


You want to mount a directory in your Ikeepincloud[1] space on your dedicated server[2] running GNU / Linux.

For this you can use sshfs, utility available on all major GNU / Linux distributions.

Server preparation

The preparation of the server[3] consists of the installation of the necessary and the generation of an SSH key which we will deposit on its Ikeepincloud[4] space.

Installation of SSHFS and its dependencies

  • Under debian and derivatives :
apt-get install sshfs
  • Under CentOS and derivatives (you will need access to the EPEL repositories) :
yum install fuse-sshfs

Creation of a local directory

We will create a directory on the Server[5] which will serve as a mount point (this operation requires super user rights):

mkdir /mnt/ikic

The directory of your IkeepinCloud space will be available there once all the operations have been carried out.

SSH key generation

You can refer to this article : Create SSH key Once the key has been generated on your Server you have to send it to your IkeepinCloud space this way :


Server Configuration

You can now mount a directory in your IkeepinCloud space directly on a mount point on your Server. We will test the assembly this way :

sshfs XXXXX@XXXXX.frYY.ikeepincloud.com:/répertoire_distant /répertoire_local

/ remote_directory: the folder of your IkeepinCloud space that you wish to make available on the Server.

/ local directory: the directory of your Server in which your file will be available once mounted.

XXXXX: represents your IkeepinCloud login.


YY: represents the part of the platform on which you are hosted.


* For any account created since 25/01/13, the URLs include the name of the platform on which you are hosted (see delivery email).

If all goes well you should have access to your IkeepinCloud directory on the local directory of your choice.


Installation at Server Startup

In order to make the automatic mounting of your folder on the Server and this at each restart you must modify your file 'fstab' .

nano /etc/fstab

In this file you will take care to add a line like this at the end:

XXXXX@XXXXX.frYY.ikeepincloud.com:/                     /mnt/ikic       fuse.sshfs      _netdev     0       0

Once saved using the key combination CTRL + X, validation request press O, you can then try with the following command to test:

mount -a

Check if everything is in order in the directory you have chosen if everything is correct.

'When using a recent operating system with systemd, it is possible to manage the assembly of your Ikeepincloud space via systemd entirely.'

To do this we will need to create two files:


The first file for editing automation:

nano /etc/systemd/system/mnt-ikic.automount

In this file we will set up the necessary for the automatic assembly:

[Unit]
Description=Automount ikic

[Automount]
Where=/mnt/ikic

[Install]
WantedBy=multi-user.target

The second file for the correct mounting of the remote volume:

nano /etc/systemd/system/mnt-ikic.mount :

In this second file we will place this:

[Unit]
Description=Mount file for /mnt/ikic sshfs mount
Requires=network-online.target
After=netctl@eth0.service

[Mount]
What=XXXXX@XXXXX.frYY.ikeepincloud.com:/
Where=/mnt/ikic
Type=fuse.sshfs
Options=_netdev

Following these additions we must reload the configuration of the systemd daemon:

systemctl daemon-reload

Then activate the automount service:

systemctl enable mnt-ikic.automount

Here at the next restart the remote directory will be automatically mounted.

catégorie:IkeepInCloud Catégorie:Serveur dédié Catégorie:Linux


You are not allowed to post comments.