Monday, December 16, 2024

Using Unifi WiFiman Desktop with Fedora Linux

Ubiquiti does not provide a WiFiMan Desktop installation method for RPM based distributions, such as Fedora Linux.

Since this is the case I've hacked together a makeshift process, using files generated by running the Ubiquity Debian WiFiman package through the pkg2appimage program. A simple script then is used to place the files in an appropriate location.  Nothing fancy, but it appears to work.

Hopefully, this will suffice until Ubiquiti decides to provide either an RPM, Flakpak or AppImage.

Here is how to install:

  1. Download the tarball: wifiman-desktop.tar.gz
  2. Extract the tarball into your home directory: tar -xvf wifiman-desktop.tar.gz
  3. Make your current directory wifiman-desktop: cd wifiman-desktop
  4. Install files: ./wifiman_integration.sh --install

  Here is how uninstall:

  1. Make your current directory wifiman-desktop: cd wifiman-desktop
  2. Uninstall files: ./wifiman_integration.sh --uninstall
 Here is how to use it:
  1. Start the wifiman-desktop.service: sudo systemctl start wifiman-desktop.service
  2. Launch the application: WiFiman Desktop
Note:  WiFiman Desktop requires the wifiman-desktop.service to be running.  After you are finished using the application you may wish to stop the wifiman-desktop.service, or you can leave it running.  If you wish wifiman-desktop.service to be automatically started, you must enable it via:  sudo systemctl enable wifiman-desktop.service

Thursday, April 11, 2024

PostgreSQL Upgrade - Fedora 40

Fedora 40 will upgrade your PostgreSQL database from 15.6-~ to 16.1-7.

Since this is a major upgrade it will require that you upgrade your database.

Here is how to do it:

  1. Install the upgrade utilities:  dnf install postgresql-upgrade
  2. Become user postgres:  sudo su - postgres
  3. Rename the data directory:  mv /var/lib/pgsql/data/ /var/lib/pgsql/data_15.6/
  4. As root, initialize your 16.1 database:  sudo postgresql-setup --initdb --unit postgresql
  5. As user postgres, Copy your pg_hba.conf:  cp /var/lib/pgsql/data_15.6/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf
  6. To avoid any potential password issues, temporarily change "md5" to "trust" in both pg_hba.conf files
  7. Run the upgrade process:  pg_upgrade -b /usr/lib64/pgsql/postgresql-15/bin/ -B /usr/bin/ -d data_15.6/ -D data
  8. Change "trust" to md5" if you changed in step 6 
  9. Enable your postgresql.service:  sudo systemctl enable postgresql.service
  10. Start your postgresql.service:  sudo systemctl start postgresql.service
  11. Run the analyse_new_cluster.sh script as suggested
  12. Run the delete_old_cluster.sh script as suggested
Note:  When running commands as the postgres user, it is assumed you are running them from the postgres user $home directory.  This will be your location after you enter the command in step 2.  If you for some reason change to another directory from this userid, just remember to enter:  cd $home before entering any postgresql commands - otherwise you may not be able to execute the desired command, or may receive a permission error.  In steps 4, 9 and 10 you must issue the commands as root.  If you don't have sudoers setup for the postgres user, it will fail.  In this case just issue the "su" command to enter root without "sudo".  Remember to issue "exit" to return to the user "postgres".