Le blog de Jean David TECHER, un Réunionnais à Saint-Priest/Lyon

Aller au contenu | Aller au menu | Aller à la recherche


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 >

mercredi 25 octobre 2017

[Debian 9] File /etc/rc.local is missing? How to re-enable /etc/rc.local ?

Just refer to this link

dimanche 19 mars 2017

[Wine-Staging 2.3]Daz Studios 4.9.0.166 and PostgreSQL CMS on 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 sources

Notice: 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
Apply recommendations from http://amyaimei.deviantart.com/journal/Install-DAZ-Studio-4-9-0-63-32-bit-on-Linux-593421068
  • Here is the content of my PostgreSQL configuration file /home/david/daz_studio_cms/postgresql.conf without comments
    david@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)

    PostgreSQL CMS is stillbeing downloaded
    Daz Studio has just written a file = ${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"
    }
    
Then PostgreSQL CMS installation should be fine!

dimanche 12 mars 2017

Upgrade kernel 4.4: From 4.4.36 to 4.4.53

This ticket is just a reminder on how to upgrade my old kernel 4.4.36 to kernel 4.4.53 using incrementals patches. [more]
  • Go to the sources folder and clean up its content using make mrproper
    cd /opt/Sources/linux-4.4
    make mrproper
  • Create a temporary folder tmp_sources for all patches
    cd /opt/Sources/linux-4.4
    mkdir tmp_patches
    cd tmp_patches
  • Download patches
    for((inc=36;inc<=52;inc++));
    do 
    wget https://cdn.kernel.org/pub/linux/kernel/v4.x/incr/patch-4.4.${inc}-$(expr ${inc} + 1).xz -O - | xz -d > patch-4.4.${inc}-$(expr ${inc} + 1);
    done
  • Content of the current folder is
    /opt/Sources/linux-4.4/tmp_patch# ls
    patch-4.4.36-37  patch-4.4.38-39  patch-4.4.40-41  patch-4.4.42-43  patch-4.4.44-45  patch-4.4.46-47  patch-4.4.48-49  patch-4.4.50-51  patch-4.4.52-53
    patch-4.4.37-38  patch-4.4.39-40  patch-4.4.41-42  patch-4.4.43-44  patch-4.4.45-46  patch-4.4.47-48  patch-4.4.49-50  patch-4.4.51-52
    
  • Apply these patches
    cd ..
    for((inc=36;inc<=52;inc++));
    do 
    patch -p1 < tmp_patch/patch-4.4.${inc}-$(expr ${inc} + 1);
    done
Time to buidl the kernel
  • Configure the kernel
    make menuconfig
  • Build everything
    make -j4 bzImage modules
    Notice: If you have a DVD or a film to watch then enjoy it! Above commands should take a while to be executed.

    On my PC with CPU=i5-4430, it took 30 minutes.

  • Install
    make -j4 INSTALL_MOD_STRIP=1 modules_install
    make -j4 INSTALL_MOD_STRIP=1 install
    make -j4 INSTALL_MOD_STRIP=1 headers_install
    
    Notice: INSTALL_MOD_STRIP=1 is pretty useful. This flag helps to install binaries with a smaller size :)

samedi 19 septembre 2015

Acrobat Reader 11.0.08 on Linux- Wine-Staging 1.7.51

Here are my commands (*) to install Acrobat Reader on Linux

As prerequisites install the following dependancies below using winetricks
winetricks -q atmlib riched20 wsh57 mspatcha
To perform a silent installation just run
wine AdbeRdr11008_en_US.exe /sAll /sPB /rs
To launch the reader, just run
WINEPREFIX="/some/path" /path/to/bin/wine C:\\Program\ Files\\Adobe\\Reader\ 11.0\\Reader\\AcroRd32.exe 
IMPORTANT NOTICE: First time you launch the reader just choose option shown below. You should do this only once

(*) Those commands are based on commands provided in section comments at https://appdb.winehq.org/objectManager.php?sClass=version&iId=27093