@JS's Notes

Site with notes from my work.

Caddy Web Server on Centos 8 - mini how-to

2020-07-16 System @JS

My test platform: CentOS Linux release 8.2.2004 (Core)

Requirements: user with root privileges or non-root user with sudo privileges.

$ sudo dnf update -y
$ sudo dnf install 'dnf-command(copr)'
$ sudo dnf copr enable @caddy/caddy
$ sudo dnf install caddy -y
$ sudo systemctl enable caddy.service
$ sudo systemctl start caddy.service; systemctl status caddy.service
## my test local domain: ctx08vm.local.lnxorg
$ mkdir /var/www/html/ctx08vm.local.lnxorg
$ sudo touch /var/www/html/ctx08vm.local.lnxorg/index.html
$ echo '<!doctype html><head><title>Caddy Test Page</title></head><body><h1>Hello, World!</h1></body></html>' | sudo tee /var/www/html/ctx08vm.local.lnxorg/index.html
$ sudo firewall-cmd --add-service=http --permanent
$ sudo firewall-cmd --reload
Continue reading

Installing node.js in Linux - Update 1

2020-07-14 System Programing @JS

Update for : Installing Node.js in Linux.

Requirements: user with root privileges or non-root user with sudo privileges.

Repository installation

CentOS and Fedora:

$ curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash -          ## nodejs 14.x
$ curl -sL https://rpm.nodesource.com/setup_12.x | sudo bash -          ## nodejs 12.x
$ curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash -          ## nodejs 10.x
Continue reading

Vsftpd on Centos 8

2020-07-14 System @JS

My test platform: CentOS Linux release 8.2.2004 (Core)

Requirements: user with root privileges or non-root user with sudo privileges.

Vsftpd installation
$ sudo dnf update -y
$ sudo dnf install vsftpd.service -y
$ sudo systemctl status vsftpd.service
$ sudo systemctl start vsftpd.service
$ sudo systemctl enable vsftpd.service
## create a ftp user and its directory
$ sudo adduser ftpuser; sudo passwd ftpuser
$ sudo mkdir -p /home/ftpuser/ftp_dir
$ sudo chmod -R 750 /home/ftpuser/ftp_dir
$ sudo chown -R ftpuser: /home/ftpuser/ftp_dir
$ sudo bash -c 'echo ftpuser >> /etc/vsftpd/user_list'
Continue reading

mod_pagespeed module with Apache2 on Ubuntu 20.04

2020-07-08 System @JS

Requirements: user with root privileges or non-root user with sudo privileges and server with a minimum 4 GB of RAM.

Installation and configuration
$ sudo apt update; sudo apt upgrade -y
$ sudo apt install apache2 curl wget -y
$ sudo systemctl is-active apache2.service
$ sudo systemctl is-enabled apache2.service
$ cd ~; mkdir download; cd download
$ wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb
$ sudo dpkg -i mod-pagespeed-stable_current_amd64.deb
## verify the mod_pagespeed module installation
$ curl -D- http://localhost | head
Continue reading

Caddy Web Server with PHP and MariaDB on Ubuntu 20.04 in Intranet

2020-07-05 System @JS
Requirements:
  • A non-root user with sudo privileges.
  • DNS server in local network. In my case, the domain name for Caddy Web Server on the local network is ctx07vm.local.lnxorg.

Update your operating system packages and install some essential packages for basic administration of the operating system:

$ sudo apt update; sudo apt upgrade -y
$ sudo apt install mc nano vim wget curl git tree unzip -y
Continue reading

Nginx with fcgiwrap on Ubuntu 20.04

2020-06-14 System @JS

Requirements: user with root privileges or non-root user with sudo privileges.

Nginx installation
$ sudo apt update && sudo apt upgrade -y
$ sudo apt install nginx -y
$ sudo systemctl is-enabled nginx.service
$ sudo systemctl status nginx.service
## if nginx is not enabled, enable it and run ##
Continue reading

Ubuntu Linux odzyskiwanie utraconego hasła root

2020-04-26 System @JS

Platforma testowa: Ubuntu Server 18.04.3

Uwaga: Podczas resetowania hasła użytkownika root, musisz mieć fizyczny dostęp do komputera/serwera, ponieważ konieczna będzie zmiana ustawień grub w trakcie startu systemu.

1. Aby edytować ustawienia grub musisz przerwać proces uruchamiania systemu, naciskając klawisz “E”.

2. Użyj klawiszy strzałek i przejdź do linii zaczynającej się od linux /boot/vmlinuz-.

3. Znajdź w niej wpis ro quiet splash $vt_handoff.

4. Zastąp go wpisem rw init=/bin/bash.

5. Naciśnij “Ctrl+X” aby zapisać zmiany i uruchomić system ponownie.

6. System uruchomi się z uprawnieniami do odczytu i zapisu dla użytkownika root. Można to potwierdzić poleceniem:

mount | grep -w /

7. Zresetuj hasło i na koniec ponownie uruchom system operacyjny:

passwd
exec /sbin/init

KVM on CentOS 8

My test platform: CentOS Linux release 8.1.1911 (Core)

Requirements

User with root privileges or non-root user with sudo privileges. Make sure that your hardware platform supports virtualization by running the following command:

$ grep -e 'vmx' /proc/cpuinfo   # Intel platforms
$ grep -e 'svm' /proc/cpuinfo   # AMD platforms
$ lsmod | grep kvm              # Confirm that KVM modules are loaded in the kernel
Continue reading
Older posts Newer posts