dimanche 19 mars 2017
[Wine-Staging 2.3]Daz Studios 4.9.0.166 and PostgreSQL CMS on Linux
Par david techer, dimanche 19 mars 2017 à 19:18 :: Linux
Daz Studio and PostgreSQL CMS
Daz Studio 4.9 uses PostgreSQL CMS (a module) to store data. It is a database (backend database). Due to admin privileges being too high with wine, we can NOT install and star the PostgreSQL database provided with. We need less privileges.
HOWEVER even if Wine is not able to install the PostgreSQL database -- as a simple workaround -- we can install a PostgreSQL database natively on Linux . Let's first check which PostgreSQL version is used by Daz Studio
PostgreSQL version used by Daz Studio
We have- For the version
david@amdgaming:/opt/Builds/wine/data/Daz_Studio/drive_c/Program Files/DAZ 3D$ wine "${WINEPREFIX}/drive_c/Program Files/DAZ 3D/PostgreSQL CMS"/bin/psql.exe --version psql (PostgreSQL) 9.3.4
- For the options
david@amdgaming:/opt/Builds/wine/data/Daz_Studio/drive_c/Program Files/DAZ 3D$ wine"${WINEPREFIX}/drive_c/Program Files/DAZ 3D/PostgreSQL CMS"/bin/pg_config --configure --enable-thread-safety --enable-integer-datetimes --enable-nls --with-ldap --with-ossp-uuid --with-libxml --with-libxslt --with-tcl --with-perl --with-python
Daz Studio used PostgreSQL 9.3.4.
Build PostgreSQL 9.3.4 from sources
Let's build PostgreSQL 9.3.4 from sourcesNotice: I took decision to not install PostgreSQL by my packages software (apt-get
) because PostgreSQL version can be too old or too recent
sudo su wget "https://ftp.postgresql.org/pub/source/v9.3.4/postgresql-9.3.4.tar.bz2" tar xvjf postgresql-9.3.4.tar.bz2 apt-get install libossp-uuid-dev libperl-dev libpython-dev cd postgresql-9.3.4 ./configure --prefix=/opt/PostgreSQL/9.3.4 --enable-thread-safety --enable-integer-datetimes --enable-nls --with-ldap --with-ossp-uuid --with-libxml --with-libxslt --with-perl --with-python make -j4 make install cd contrib/ make -j4 make install
Configure the PostgreSQL cluster
- Log out and get back to your current Linux user
- Update your environment variables PATH and LD_LIBRARY_PATH to include paths to its bin and lib folder.
export PATH=/opt/PostgreSQL/9.3.4/bin/:$PATH export LD_LIBRARY_PATH=/opt/PostgreSQL/9.3.4/lib/:$LD_LIBRARY_PATH
- Then initialize the PostgreSQL cluster
initdb -A trust /home/david/daz_studio_cms
- Here is the content of my PostgreSQL configuration file
/home/david/daz_studio_cms/postgresql.conf
without commentsdavid@amdgaming:~$ grep -E '^[a-z]' /home/david/daz_studio_cms/postgresql.conf|sed -e "s:\#.*::g" max_connections = 100 shared_buffers = 512MB temp_buffers = 30MB log_destination = 'stderr' logging_collector = on log_directory = 'pg_log' log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' log_connections = on log_line_prefix = '%t [%a] [database=%d user=%u host=%h pid=%p]\n' log_timezone = 'Europe/Paris' stats_temp_directory = 'pg_stat_tmp' datestyle = 'iso, dmy' timezone = 'Europe/Paris' lc_messages = 'fr_FR.UTF-8' lc_monetary = 'fr_FR.UTF-8' lc_numeric = 'fr_FR.UTF-8' lc_time = 'fr_FR.UTF-8' default_text_search_config = 'pg_catalog.french'
- Start the PostgreSQL server
/home/david/daz_studio_cms
-
Create a temporary file with the following content
david@amdgaming:~$ cat zozo.sql CREATE ROLE dzcms LOGIN SUPERUSER INHERIT CREATEDB CREATEROLE REPLICATION; CREATE DATABASE "Content" WITH OWNER = dzcms ENCODING = 'UTF8' TABLESPACE = pg_default CONNECTION LIMIT = -1; \c Content CREATE EXTENSION citext SCHEMA public VERSION "1.0"; ALTER ROLE dzcms SET search_path = dzcontent, public;
- Apply it. Using psql its output should be similar to below output
david@amdgaming:~$ psql postgres -e -f zozo.sql CREATE ROLE dzcms LOGIN SUPERUSER INHERIT CREATEDB CREATEROLE REPLICATION; CREATE ROLE CREATE DATABASE "Content" WITH OWNER = dzcms ENCODING = 'UTF8' TABLESPACE = pg_default CONNECTION LIMIT = -1; CREATE DATABASE Vous êtes maintenant connecté à  la base de données « Content » en tant qu'utilisateur « david ». CREATE EXTENSION citext SCHEMA public VERSION "1.0"; CREATE EXTENSION ALTER ROLE dzcms SET search_path = dzcontent, public; ALTER ROLE
PostgreSQL CMS - Installation
- While PostgreSQL CMS is still being downloaded from the main manager (see below image)
Daz Studio has just written a file =
PostgreSQL CMS is stillbeing downloaded${WINEPREFIX}/drive_c/users/${YOUR_USER}/Application\ Data/DAZ\ 3D/cms/cmscfg.json
- Replace its content by this one
{ "Port" : 5432, "ConnectionURI" : "postgresql://dzcms@localhost:5432/Content" }