Tag

Linux

Linux

Get public IP address from Linux command line

To get the public IP of a computer or server on a Linux command line, you can use the following command for IPV4 addresses: curl ipinfo.io/ip You can obtain extended information about the IPV4 address (as JSON) via: curl ipinfo.io If you want to find out the public IPv6 address instead, you can use the following command: curl v6.ipinfo.io/ip For IPv6, you can also get the extended information via: curl v6.ipinfo.io

Sebastian Widmann

Sebastian Widmann

Webdesigner / Web developer

Linux

Restarting php-fpm on Ubuntu

This tutorial describes how to restart php-fpm on Ubuntu. This may be necessary, for example, if you have enabled opcode caching and performed a deployment. Check PHP Version The first step is to check the installed version of PHP: php -v The output should look something like this: PHP 7.2.19-0ubuntu0.18.04.2 (cli) (built: Aug 12 2019 19:34:28) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.19-0ubuntu0.18.04

Sebastian Widmann

Sebastian Widmann

Webdesigner / Web developer

Linux

Check Ubuntu Version From Command Line

To check the Ubuntu version from the command line, you can use this command: cat /etc/lsb-release Output should be something like this: DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS" In this example, Ubuntu 16.04.6 LTS is used.

Sebastian Widmann

Sebastian Widmann

Webdesigner / Web developer

Webserver Linux

Install Sentry on Ubuntu 18.04 Using Nginx and Letsencrypt Certificates

This tutorial guides you through the setup process of Sentry (onpremise / self hosted) using Ubuntu 18.04, nginx as webserver and LetsEncrypt certificates. First step is to get Ubuntu 18.04 up and running. In my case, I use a cloud server from Hetzner. You should use a server with at least 4GB or RAM, because the setup process checks for at least 2.5GB of RAM available for Docker. That’s why I chose a CX21 server. First step is to update the system: apt-get update apt-get full-upgrade reboot

Sebastian Widmann

Sebastian Widmann

Webdesigner / Web developer

Linux

Fix "Cannot find module 'semver'" Error When Using Ubuntu

When running npm install, I always get a Cannot find module 'semver' error. The environment I was using was Ubuntu 14.04 at Cloud9 (c9.io). To fix that error, I did the following: sudo apt-get remove nodejs sudo apt-get remove npm sudo rm -rf ~/.npm sudo rm -rf /usr/local/lib/node_modules curl -0 -L https://npmjs.org/install.sh | sudo sh

Sebastian Widmann

Sebastian Widmann

Webdesigner / Web developer