You have a remote server (Debian) running some Docker containers and you want to make sure that they all restart in the event of a kernel panick.
- Add an automatic restart after a kernel panick by running:
- Emulate a kernel panick by running the following (SysRq more info here :
echo c > /proc/sysrq-trigger
- Check that the containers have restarted again with docker ps (NOTE: the containers should have been enabled to autorestart)
You want to install some default locales in a Docker image, and the suggestion is to use locale-gen to do so, but it does not work as expected.
In order to be able to use the locale-gen and install the locales you need you will have to uncomment the ones needed from /etc/locale.gen first and then use the locale-gen. Example below:
## Set up locales
## Uncomment the ones we need as locale-gen does not work without that
RUN sed -i '/en_US.UTF-8/s/^#//' /etc/locale.gen
RUN sed -i '/de_DE.UTF-8/s/^#//' /etc/locale.gen
## Now install them and set the default one
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
When trying to connect with ssh to a linux (debian- ubuntu) server you get the following error:
bash: warning: setlocale: LC_ALL: cannot change locale (en_GB.UTF-8)
The reason is that the server is missing the en_US locale that your client is trying to use to connect to the server.
Login to the server and by using sudo (or su) run the following to install the missing en_US locale and make sure that you leave default to ‘None’ as described here:
You would like to (re)-install passenger after a system wide rvm installation, but you only have the mod_passenger.c file and not the .so after the gem installation.
Make sure that after using gem install passenger you also use the command to install the apache2 passenger module:
you should then be able to see the .so file and add it to your /etc/apache2/mods-available/passenger.load
You want to use the rmagick gem in your ruby on rails project, but you need to install the imagemagick first.
If Imagemagick is not already installed, use the following to install it:
$ sudo apt-get install imagemagick$ sudo apt get install libmagick-dev libmagickwand-dev
You should then be able to install and use the rmagick gem
You are trying to set up gitolite access through gitweb but the gitweb page, shows ‘no projects avaiable’ even though you have repositories available.
Try to follow the guide here.
Some of tthe most important steps for having the right access permissions are:
- Add the www-data user in the gitolite group by:
$ sudo usermod -a -G gitolite www-data
- Add the paths to the repositories and the projects list:
$ sudo vi /etc/gitweb.conf
- Change the permissions in the repositories:
$ sudo chmod g+r /var/lib/gitolite/projects.list
$ sudo chmod -R g+rx /var/lib/gitolite/repositories
- Change permissions in the /var/lib/gitolite/.gitolite.rc file to allow access to the repositories:
$REPO_UMASK = 0027;
- Finally change the git-daemon to run with the gitolite group permissions in the file /etc/sv/git-daemon/run:
exec chpst -ugitdaemon:gitolite