Software Development, Linux, and Windows

Notes on Software Development, Linux, and Windows

Install MariaDB on CentOS 7

Starting in CentOS 7, MariaDB has replaced MySQL as the default database installation. MariaDB is a 100% compatible binary replacement of MySQL. Login as root su – Download and Install MariaDB yum install mariadb-server Configure MariaDB to start on System boot systemctl enable mariadb Start the mariadb service systemctl start mariadb Make MariaDB more secure [...]

Posted in CentOS, MariaDB | Comments Off

Installing Oracle JDK on Ubuntu

You must run these 3 commands: sudo apt-get install python-software-properties sudo add-apt-repository ppa:webupd8team/java sudo apt-get update To install Java 7, run this command: sudo apt-get install oracle-java7-installer To install Java 8, run this command: sudo apt-get install oracle-java8-installer To change the default Java installation, run this command: sudo update-alternatives –config java

Posted in Java, Language, Linux, Ubuntu | Comments Off

Change default version of java on CentOS

Perform these steps to change the default version of java: Login in or switch user to root: su – Type this command: alternatives –config java If you do not see the version you want listed then you must use the alternatives –install command, so your version of java can be “installed”. List the versions of [...]

Posted in CentOS, Java | Comments Off

Fix error with making a screenshot in CentOS

Perform these steps if you are getting this error: Failed to execute child process “gnome-screenshot” (No such file or directory) Login in or switch user to root: su – Type this command: yum install gnome-utils -y

Posted in CentOS, Linux | Comments Off

Install Gnome System Monitor on versions of CentOS above 6.2

Perform these steps to install the Gnome System Monitor on CentOS versions above 6.2: Login in or switch user to root: su – Type this command: yum install gnome-system-monitor

Posted in CentOS, Fedora, Linux | Comments Off

Install Development Tools and Development Libraries on CentOS

Perform these steps to install gcc, gdb, cpp, perl, and other standard linux development tools and libraries: Login in or switch user to root: su – Type this command: yum groupinstall ‘Development Tools’ ‘Development Libraries’

Posted in CentOS, Fedora, Linux | Comments Off

How to list group names in Linux

To list the names of all defined groups, use this command: Type this command: cut -d: -f1 /etc/group

Posted in CentOS, Fedora, Linux | Comments Off

Compare BigDecimal to Zero in Java

You really need to use compareTo() instead of equals() for this: equals() yields inconsistent results with decimal values: new BigDecimal( 0 ).equals( BigDecimal.ZERO ); // true new BigDecimal( 0.00 ).equals( BigDecimal.ZERO ); // false As you can see, eqauls() gives unexpected results. compareTo() does this right thing: new BigDecimal( 0 ).compareTo( BigDecimal.ZERO ) == 0; [...]

Posted in Java | Comments Off

Error shutting down JBoss from JBoss Developer Studio

When trying to shutdown jboss-eap-5.1 from Jboss Developer Studio, I got the following Error: Failed to authenticate principal=admin, securityDomain=jmx-console The solution was to edit the file jboss-eap-5.1\jboss-as\default\conf\props\jmx-console-users.properties and uncomment the line: admin=admin

Posted in JBoss | Comments Off

Dump or Load to or from a Subversion Repository using svnadmin

Login as or switch user to root: su – Example of using svnadmin dump to create a dump file of an svn repository: svnadmin dump /var/www/svn/repos > /home/peter/svn-repos_20120831-2110.dump Example of using svnadmin to load a repository from a dump file svnadmin load /var/www/svn/repos < 30-svn-repos_20161031-1842.dump

Posted in Linux, Subversion | Comments Off