Cannot set LC_CTYPE to default locale: No such file or directory

When ssh into a production server, Debian, and noticed there is a warning or error as follows: Terminal manpath: can’t set the locale; make sure $LC_* and $LANG are correct mkyong@test-server:~$ Check the server’s locale; there are warning about the LC_CTYPE and LC_ALL variables. Terminal $ locale locale: Cannot set LC_CTYPE to default locale: No …

Read more

How to install MariaDB on Debian 11

This tutorial shows you how to install MariaDB on Debian 11. Table of contents: 1. Install MariaDB 2. Verify MariaDB 3. Secure the MariaDB 3.1 Enter current password for root (enter for none): enter 3.2 Switch to unix_socket authentication [Y/n] n 3.3 Remove anonymous users? [Y/n] y 3.4 Disallow root login remotely? [Y/n] y 3.5 …

Read more

How to add JAVA_HOME on Ubuntu?

On Ubuntu, we can add JAVA_HOME environment variable in /etc/environment file. Note /etc/environment system-wide environment variable settings, which means all users use it. It is not a script file, but rather consists of assignment expressions, one per line. We need admin or sudo to modify this it. Further Reading Ubuntu – EnvironmentVariables 1. JAVA_HOME 1.1 …

Read more

Upgrade MySQL 5.5 to MySQL 5.7

On Debian 9.5, the MySQL package is still the old MySQL 5.5. This little guide show you how to upgrade it to MySQL 5.7 1. Download MySQL APT 1.1 Get the MySQL APT and select MySQL 5.7 $ wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb $ sudo gdebi mysql-apt-config_0.8.10-1_all.deb 1.2 Below “configuration mysql-apt-config” screen will be prompted, clicks the first …

Read more

Debian – Show apt-get package version

On Debian, you can use apt-cache policy ‘package name’ to check the package version. 1.1 Display Tomcat7 version. $ sudo apt-cache policy tomcat7 tomcat7: Installed: (none) Candidate: 7.0.52-1ubuntu0.3 Version table: 7.0.52-1ubuntu0.3 0 500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages 500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages 7.0.52-1 0 500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages 1.2 Display OpenJDK-7 version. $ sudo …

Read more

How to check Debian version

On Debian, type cat /etc/debian_version to display the Debian version. Terminal $ cat /etc/debian_version 9.5 Alternatively, cat /etc/issue Terminal $ cat /etc/issue Debian GNU/Linux 9 \n \l The last one, lsb-release -a, it will display the Debian detail. Terminal $ lsb-release -a -bash: lsb-release: command not found $ sudo apt-get install lsb-release $ lsb_release -a …

Read more

Debian : Change default Java version

Deployed a Debian 7.5 on Linode server, the default is using OpenJDK 1.6. How to upgrade to OpenJDK 1.7? $ java -version java version "1.6.0_31" OpenJDK Runtime Environment (IcedTea6 1.13.3) (6b31-1.13.3-1~deb7u1) OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode) Tracing the java, it’s using the Debian’s alternative settings : $ ls -lsa /usr/bin/ | grep …

Read more