@JS's Notes

Site with notes from my work.

PostgreSQL and phpPgAdmin on Ubuntu 20.04

2020-07-17 System @JS

My test platform: Ubuntu Server 20.04

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

PostgreSQL and phpPgAdmin installation
$ sudo apt update; sudo apt upgrade -y
$ sudo apt install postgresql postgresql-contrib phppgadmin -y
$ systemctl start postgresql.service
$ systemctl enable postgresql.service
$ systemctl status postgresql.service
Continue reading

Gitea with sqlite3 on Ubuntu 20.04

2020-07-16 System Programing @JS

My test platform: Ubuntu Server 20.04

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

Gitea installation
$ sudo apt update; sudo apt upgrade -y
$ sudo apt install git wget tree sqlite3 -y
$ sudo adduser --system --shell /bin/bash --gecos 'User for Gitea' --group --disabled-password --home /home/gitea gitea
$ mkdir download; cd download
$ wget -O gitea https://dl.gitea.io/gitea/1.12.1/gitea-1.12.1-linux-amd64
$ chmod +x gitea
$ sudo mkdir -p /var/lib/gitea/{custom,data,log}
$ sudo chown -R gitea: /var/lib/gitea/
$ sudo chmod -R 750 /var/lib/gitea/
$ sudo mkdir /etc/gitea
$ sudo chown root:gitea /etc/gitea
$ sudo chmod 770 /etc/gitea
$ sudo cp gitea /usr/local/bin/gitea
Continue reading

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
Older posts Newer posts