Andrew Fletcher 31 August 2022 1 minute read
At first, I attempted
echo 1 > /proc/sys/vm/drop_caches
Response
-bash: /proc/sys/vm/drop_caches: Permission denied
Adding sudo in front of the command was met with the same result. What about if I execute the shell as root
sudo sh -c 'echo 1 > /proc/sys/vm/drop_caches'
Success. Caches cleared.
Different types of clearing cache
Clear PageCache only
sudo sh -c 'echo 1 > /proc/sys/vm/drop_caches'
Clear dentries and inodes
sudo sh -c 'echo 2 > /proc/sys/vm/drop_caches'
Clear pagecache, dentries, and inodes
sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'
Related articles
Andrew Fletcher
•
23 Aug 2022
flask_debugtoolbar module doesn't exist
Error when running ckan.ini init
from flask_debugtoolbar import DebugToolbarExtension
ModuleNotFoundError: No module named 'flask_debugtoolbar'
Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
Then check your location is
cd...
Andrew Fletcher
•
19 Aug 2022
Ubuntu checking if pip is install and getting ImportError: cannot import name 'appdirs' from 'pip._vendor'
My goal was to install a requirements.txt file using pip. First, I wanted to cross-check if I had pip installed on Ubuntu. Easy to do by running a simple command:
pip -V
However, I was receiving the following response
Traceback (most recent call last):
File...
Andrew Fletcher
•
17 Aug 2022
How To Install Apache Solr 8.11 on Ubuntu
In this article I'll walk through the steps I went through to install Solr on Ubuntu.
Step 1: Java
Check if Java is installed on your server:
java -version
Not there - then Java is the first step for you to set up for Solr. JAVA SE 8 or Later is required to run...