How do I install LMDB as backend in openLDAP? - centos7

I have installed CentOS in the virtualbox. Now I want to install LDAP with LMDB as backend. When I've installed openLDAP, there was already a "olcDatabase={2}hdb.ldif" file. Now I want to know how to change the database from HDB to LMDB.

Related

How to install dlib in django azure web app service

I want to publish a django web app in azure that uses dlib and opencv for processing images
When trying to deploy the app through local code, it fails with dlib unable to install due to cmake not found. I tried using windows machine also but received same error.
CMake must be installed to build the following extensions: dlib
How do I install dlib in an azure webapp?
For Windows environment, you can directly install dlib for Python from a packaged wheel file.
You can download it from https://pypi.org/simple/dlib/ and then install it via command pip install dlib-<version>-win_amd64.whl, as the figure below.
Please refer to the blog How to install the Dlib library for Python 3 on Windows or the PyPI webpage of dlib package to know more details.
Hope it helps.

How can i use the upgraded version of Sqlite3 for my Django project?

I am trying to create a django application on a server running on Centos 7. When i tried to migrate the application, i got the error:"SQLite 3.8.3 or later required (found 3.7.17)."
Thereafter I installed the latest-version of Sqlite3. When i run sqlite3 --version, it showns 3.28.0 which is the latest version.
Howevere, when I tried my migrate the project I got the same error i.e "SQLite 3.8.3 or later required (found 3.7.17)." Can someone please suggest how to ensure that python/django is configured with the latest version of sqlite3 rather than the older one which came along with the OS?
Unfortunately CentOS only has v3.7.17 in their repos.
So you need to install v3.8.3 or the latest from source.
To do that, you can install from source (I'm not sure how to use the precompile binaries)
Download the source code from sqlite downloads
cd /opt
wget https://www.sqlite.org/2019/sqlite-autoconf-3280000.tar.gz
tar -xzf sqlite-autoconf-3280000.tar.gz
cd sqlite-autoconf-3280000
./configure
make
sudo make install

Cascade dependencies when add python packages to my app libraries

I'm trying to add python packages to my Choregraphe app because some packages that are installed by default with python 2.7 aren't in python embedded in Choregraphe.
I want to add urllib3 and certifi to my app to be able to sen HTTPS requests and verify SSL certificates.
So I added a lib folder to my app with the necessary packages, it works fine for urllib3 but to verify SSL certificates I got a cascade of dependencies so I don't manage to do what I want.
Does anyone know if there is a way to access manually the default python version accessible by my Robot so that I can send my request with these packages ?
Thanks in advance !
If you're running this on a Pepper with NAOqi 2.5, pip is installed on the robot; though you'll need to upgrade it:
pip install --user --upgrade pip
and then you can run
/home/nao/.local/bin/pip install --user urllib3 certifi
Then you don't need to package those files in your choregraphe package.
It won't work on the virtual robot (but then you can just add the real path of those libraries to sys.path), and it means you'll have to do this procedure yourself if you want to install your app on a new robot, which can be a hassle.

Best environment to install centos 7 on laptop to use system as web server

I want to install centos 7 on laptop to use system as a web server.
I'll use this server for hosting a django project, so I need to install python and django after centos installation manually.

python fabric: prevent already installed packages from being installed again

So writing a fabfile function, I attempt to automate the setup of a particular mac os x machine like this.
from fabric.api import local, env, sudo, require
def mac_port_setup():
PACKAGES = ['vim +python27', 'htop']
for item in PACKAGES:
local('sudo port -v install {0}'.format(item))
The PACKAGES list can actually be a huge list and I want to avoid installing a package if the package is already installed. What are the possible ways to go about preventing an already installed package from being re-installed in my fabric automation?
Pretty sure running the install again won't do anything on already installed packages. If you want to check first port has the installed command to list what's been installed.