Showing posts with label fedora. Show all posts
Showing posts with label fedora. Show all posts

Friday, June 9, 2023

MySQL - Enable/Disable auto startup in Unix/Linux

MySQL - Enable/Disable auto startup in Unix/Linux

In this post let's see how to enable or disable auto startup of MySQL Database in Unix based machines

Environment: Fedora Linux v37

Dealing with MySQL

  • Starting MySQL: sudo service mysqld start or sudo systemctl start mysqld
  • Stopping MySQL: sudo service mysqld stop or sudo systemctl stop mysqld
  • Disable auto startup of MySQL Database at the time of system startup
    • Check the current auto startup status using the command sudo service mysqld status or sudo systemctl status mysqld
    • If already enabled for auto start then the result will be as follows
    • Now issue the command sudo systemctl disable mysqld to disable auto startup
    • One can verify now to make sure the auto startup is disabled using the command sudo service mysqld status or sudo systemctl status mysqld
    • Note: the systemctl commands are the modern way of starting/stopping services


Friday, October 16, 2020

Switch between Java versions on Fedora OS

Switching between multiple versions of Java on a Fedora OS (all *nix based OS)

To install multiple versions of Java refer this Blog

  • Check the current version of Java using the command
 java -version


Current version of java being used is 11.0.8
  • To switch to different installed version, issue the command
 sudo alternatives --config java

enter password if prompted for sudo

All the versions of Java installed currently will be shown as in image below 

Type in the number under "Selection" Column to switch to that version, for example type 1 to switch to java-1.8.0

  • Verify the version of java is changed as selected above

 java -version
 

After switching to a particular Java version (e.g. 11), see how it's linked to 'java' executable



Note: If you have JAVA_HOME variable set in ~/.bash_profile that needs to be removed. Restart is required upon removal 

Thursday, October 15, 2020

Installing Java on Fedora

How to install Java on Fedora?

  • List available versions
dnf search openjdk


  • Choose the version of Java you want to install, say java-11-openjdk-devel.x86_64
  • Run the command
sudo dnf install java-11-openjdk-devel.x86_64

  • Follow the prompts to complete the Installation