Search found 60 matches

by Mihai
2025 Jul 28, 16:19
Forum: Linux
Topic: Grafana CLI
Replies: 0
Views: 31
Romania

Grafana CLI

Admin password reset:

Code: Select all

grafana-cli admin reset-admin-password your-new-password
by Mihai
2024 Dec 04, 12:25
Forum: Linux
Topic: GitLab Grafana service force disabled
Replies: 0
Views: 147341
Romania

GitLab Grafana service force disabled

For installed gitlab omnibus

Edit file default.rb from the gitlab installation path ( example: /opt/gitlab/...... ):
vim /opt/gitlab/embedded/cookbooks/monitoring/recipes/default.rb

Add the following code in the file:

# Disable Grafana service.
runit_service 'grafana' do
action :disable
end ...
by Mihai
2024 Jul 22, 12:22
Forum: Linux
Topic: Git: Some useful cmds
Replies: 0
Views: 81613
Romania

Git: Some useful cmds

  • Hard reset to a older commit
Clone Repository branch dev:

Code: Select all

git clone --branch dev https://git.url/repo
Hard reset to a older commit:

Code: Select all

git reset --hard 0d13251515b04e69d589737b0fa6b4c40069f175
Force push changes from origin to remote branch dev:

Code: Select all

git push origin dev -f
by Mihai
2024 Jul 06, 13:52
Forum: Linux
Topic: Ubuntu / Debian: Update SSH from source
Replies: 0
Views: 82141
Romania

Ubuntu / Debian: Update SSH from source

For Ubuntu/Debian:

Install dependencies:
sudo apt install build-essential zlib1g-dev libssl-dev -y

Download the SSH package:
wget https://cloudflare.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.8p1.tar.gz

Extract the package from archive:
tar xzvf openssh-9.8p1.tar.gz

Call ...
by Mihai
2024 Jun 22, 19:01
Forum: Linux
Topic: Configuration file for Bash shell environment
Replies: 0
Views: 81651
Romania

Configuration file for Bash shell environment

Custom Prompt (GLOBAL for all users):
The following configuration will apply to all users in the system.
If you have personalized Prompt for every user individually, the following configuration will override it.

Create and edit file custom_prompt.sh
vim /etc/profile.d/custom_prompt.sh

Add the ...
by Mihai
2024 Jun 18, 13:51
Forum: Linux
Topic: GitLab: Terminal CMDS
Replies: 0
Views: 81467
Romania

GitLab: Terminal CMDS

Starting a Rails console session:

Linux package (Omnibus):
sudo gitlab-rails console

Docker:
docker exec -it <container-id> gitlab-rails console

Self-compiled (source):

sudo -u git -H bundle exec rails console -e production

Helm chart (Kubernetes):
# find the pod
kubectl get ...
by Mihai
2024 Jun 17, 13:56
Forum: Linux
Topic: Ubuntu / Debian: Remove all old kernels script
Replies: 0
Views: 81188
Romania

Ubuntu / Debian: Remove all old kernels script

Create a file with the following content:

#!/bin/bash -e
# Run this script without any arguments for a dry run
# Run the script with root and with exec arguments for removing old kernels and modules after checking
# the list printed in the dry run

uname -a
IN_USE=$(uname -a | awk '{ print $3 ...
by Mihai
2024 Feb 19, 11:37
Forum: Linux
Topic: Docker sysadmin
Replies: 0
Views: 87585
Romania

Docker sysadmin

This list will be upgraded with time.

Update all images:
docker images | grep -v REPOSITORY | awk '{print $1}' | xargs -L1 docker pull

Remove all images with no tags ( <none> ):
docker image ls | egrep none | awk '{print $3}' | xargs docker image rm

Show disk usage detailed
docker ...
by Mihai
2023 Aug 28, 17:09
Forum: Linux
Topic: Gitlab change the default home page url
Replies: 0
Views: 83380
Romania

Gitlab change the default home page url

Cannot change Home page URL from the admin page

Login into internal gitlab database
sudo -u gitlab-psql /opt/gitlab/embedded/bin/psql -h /var/opt/gitlab/postgresql -d gitlabhq_production

Check home_page_url:
select home_page_url from application_settings;


home_page_url ...
by Mihai
2023 May 03, 23:20
Forum: Windows
Topic: Windows could not complete the installation
Replies: 0
Views: 91811
Romania

Windows could not complete the installation

Press SHIFT + F10 to open the command prompt (cmd).
The command CD C:\windows\system32\oobe is executed in cmd.
Press the Enter key.
The command is executed in cmd: msoobe.
Press the Enter key.
A window opens with the creation of the username.
After creating the username, the operating ...
by Mihai
2023 May 03, 23:18
Forum: Windows
Topic: Windows: USB Stick: Device Not Recognized / Unknown Device in Windows 7/8/10
Replies: 0
Views: 83341
Romania

Windows: USB Stick: Device Not Recognized / Unknown Device in Windows 7/8/10

Cause: Most probably the USB stick was physically removed from the USB port without applying the unmount or eject function ( FROM THE WINDOWS OPERATING SYSTEM ).
This phenomenon can cause the stick's functionality to be ineffective on Linux-type operating systems as well. The actual error in the ...
by Mihai
2023 May 03, 23:15
Forum: Linux
Topic: Search in files containing a "key" word
Replies: 0
Views: 72549
Romania

Search in files containing a "key" word

Command

Code: Select all

[root @ centos ~]$ grep -H -R "Board index" /var/www/* | cut -d: -f1
Output

Code: Select all

/var/www/phpBB/language/en/common.php
by Mihai
2023 May 03, 23:04
Forum: Linux
Topic: Ampps: X Error: BadAccess
Replies: 0
Views: 68457
Romania

Ampps: X Error: BadAccess

Error
X Error: BadAccess (attempt to access private resource denied) 10
Extension: 130 (MIT-SHM)
Minor opcode: 1 (X_ShmAttach)
Resource id: 0x13d

Add QT_X11_NO_MITSHM=1 to /etc/environment file.
In most cases, the operating system requires a restart after modifying the /etc/environment file.
by Mihai
2023 May 03, 23:02
Forum: Linux
Topic: RHEL/CentOS: iRedMail SSL Certificates
Replies: 0
Views: 14520
Romania

RHEL/CentOS: iRedMail SSL Certificates

This tutorial shows replacing iRedMail's default SSL certificates with Let's Encrypt certificates.
Replacing iRedMail certificates:
A back-up is created for the old certificates (in case the Let`s Encrypt certificate creation operation fails):
[root @ CentOS ~]$ mv /etc/pki/tls/certs/iRedMail.crt ...
by Mihai
2023 May 03, 23:00
Forum: Linux
Topic: NexCloud: [UPGRADE] Step 5 is currently in process. Please reload this page later.
Replies: 0
Views: 12733
Romania

NexCloud: [UPGRADE] Step 5 is currently in process. Please reload this page later.

This error occurs after attempting a platform upgrade.
Solution:
We access the root folder where the NextCloud platform is installed. In our case /var/www/html/nextcloud/data
[root @ CentOS7]$ cd /var/www/html/nextcloud/data
[root @ CentOS7]$ ls -asl | egrep "updater-"
4 drwxr-x---. 4 apache ...
by Mihai
2023 May 03, 22:57
Forum: Linux
Topic: NextCloud: Error AH01797: client denied by server configuration: /var/www/html/nextcloud/config
Replies: 0
Views: 12114
Romania

NextCloud: Error AH01797: client denied by server configuration: /var/www/html/nextcloud/config

Nextcloud client synchronization is not done due to a file named README.md, because it has a zero size ( empty file )
[Wed Apr 15 09:28:41.346138 2020] [access_compat:error] [pid 15872:tid 140680303142656] [client IPADDRESS:47442] AH01797: client denied by server configuration: /var/www/html ...
by Mihai
2023 May 03, 22:55
Forum: Linux
Topic: Drupal 7 Remove: "Log in or register to post comments"
Replies: 0
Views: 11962
Romania

Drupal 7 Remove: "Log in or register to post comments"

[root @ centos drupalroot]$ cd modules/comment/
[root @ centos comment]$ vim comment.module

Replace line 2392
return t('<a href="@login">Log in</a> or <a href="@register">register</a> to post comments', array('@login' => url('user/login', array('query' => $destination)), '@register' => url('user ...
by Mihai
2023 May 03, 22:51
Forum: Linux
Topic: Drupal Update Version
Replies: 0
Views: 11669
Romania

Drupal Update Version

[root @ centos ~]$ cd /var/www/html/my.webiste/
Download the patch for the version you want to update:
Example update from drupal 7.34 to dupal 7.35
[root @ centos my.website]$ wget link-to-patch
Dry-Run test before update
[root @ centos my.website]$ patch -p1 --dry-run < PATCHFILE
If test ...
by Mihai
2023 May 03, 22:44
Forum: Linux
Topic: DRUPAL: PHP Fatal error: Interface 'League\\OAuth2\\Server\\Repositories\\AccessTokenRepositoryInterface' not found
Replies: 0
Views: 11399
Romania

DRUPAL: PHP Fatal error: Interface 'League\\OAuth2\\Server\\Repositories\\AccessTokenRepositoryInterface' not found

Error
[Mon Jun 24 01:44:23.112279 2019] [php7:error] [pid 13344:tid 139933951928064] [client 86.124.22.59:42605] PHP Fatal error: Interface 'League\\OAuth2\\Server\\Repositories\\AccessTokenRepositoryInterface' not found in /var/www/html/drupal/modules/simple_oauth/src/Repositories ...
by Mihai
2023 May 03, 22:42
Forum: Linux
Topic: httpd VirtualHost configuration
Replies: 0
Views: 11902
Romania

httpd VirtualHost configuration

It is assumed that we have a website that runs on an httpd server, and we want to add a 2nd website to the same httpd server.
The httpd configuration before adding the VirtualHost:
ServerName www. 1stwebiste. com:80
Alias 1stwebsite "/var/www/html/1stwebsite/"
ServerAdmin admin @ 1stwebsite.com ...