You are trying to use the github OAuth authentication for having users login to your Grafana but there is an error that redirect_uri must match that is coming from Github.
Make sure that you add a line with the root_url in your /etc/grafana/grafana.ini file that has the same IP/domain name as your server, and restart the service.
root_url = http://xxxx.xxxx.xxxx.xxxx:3000
You would like to have a list of all the services (running and stopped) in a debian system.
You can run the following to see the list of services:
You have made some changes to the NGINX configuration and you would like to reload them without stopping and starting the server.
Use the following:
kill -HUP $(cat /var/run/nginx.pid)
You are trying to install/remove a package but you always get an error message about linux message as above:
Errors were encountered while processing:
Try the following:
rm -rf /var/lib/dpkg/info/linux-image-3.13.0-128-generic.*
apt-get purge linux-image-3.13.0-128-generic
You would like to know the codename (release) name of your Debian/Ubuntu system. Running cat /etc/issue will give you the release version but not the number.
Run the following command to get your release name:
When you are trying to install a package inside a debian Docker container you get the following error message:
FATAL -> Failed to fork.
This is an indication of ‘out of memory’ so add a swap partition if it does not exist, on the host with the following:
fallocate -l 4G /swapfile
chmod 600 /swapfile
echo "/swapfile swap swap sw 0 0" >> /etc/fstab
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:
As an addition to the excellent beta book ‘Deploying Rails’, as I had problems using the suggested lucid64 image, I’ve tried to install a debian lenny 32 image with rvm and Ruby 1.9.3.
The steps needed are listed below
- Download the lenny package:
localhost$ vagrant box add debian-lenny-32 https://s3-eu-west-1.amazonaws.com/glassesdirect-boxen/debian/debian_lenny_32.box
- Make a new directory for the virtual box:
localhost$ mkdir -p ~/deployingrails/lenny32
- change into created directory and create the Vagrant file:
localhost$ cd ~/deployingrails/lenny32
- change the Vagrant file to use the virtual box we have downloaded:
Vagrant::Config.run do |config|
config.vm.box = "lenny32"
- Start the VM:
localhost$ vagrant up
- If there is a warning about the Guest additions here install the latest guest additions by following the description here, but only use the update and upgrade steps as:
localhost$ vagrant ssh
vagrant$ sudo apt-get update
vagrant$ sudo apt-get upgrade
- After finishing the upgrade logout (exit) from the VM and issue the command to restart the VM:
localhost$ vagrant reload
- login to the VM again:
localhost$ vagrant ssh
Install curl to be able to download the installation script for:
vagrant$ sudo apt-get install curl
- Download and install rvm by using the script described here http://beginrescueend.com/rvm/install/ :
vagrant$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
- Add the loading of the RVM function into .bashrc, by running the following in the command prompt:
vagrant$ echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bashrc
- Reload the bashrc file:
vagrant$ source ~/.bashrc
- Make sure that the rvm is loaded as function:
vagrant$ type rvm | head -1
rvm is a function
- Run the rvm requirement to see the needed libraries and then run the suggested ones (except libreadline6 and libreadline6-dev that are not there in debian):
vagrant$ sudo apt-get install build-essential openssl curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison
- Install Ruby 1.9.3 :
vagrant$ rvm install ruby-1.9.3
- Use the ruby 1.9.3 as default:
vagrant$ rvm use 1.9.3 --default
- Finally create a new VM package to use in future:
localhost$ vagrant package --output lenny32-rvm-ruby193
And add it our box list:
localhost$ vagrant box add lenny32-rvm-ruby193 lenny32-rvm-ruby193
localhost$ vagrant box list
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