Comet

  • Diary
  • Travel
  • Fun
  • Tech
Tech
Tech notes
Tech

Wordpress Setup and SSL

Docker compose to set up containers See docker compose https://github.com/kasakun/wordpress-nginx-docker. Nginx is the front end, in the mean time Wordpress and mysql serve as a standalone server. This gives me ability to add more service in future easily. Before starting the container with docker-compose, we need to edit .env to customize data and ssl location. Sometimes we need chmod permission for this folders for Wordpress to write in. Auto SSL Here we use acme script from https://github.com/acmesh-official/acme.sh After installation, we can go ahead to verify the domain and the server that we need to specify the server webroot in the command The $WEBROOT is somehow defined in the .env above. After running this command, it will issue a certificate and meanwhile set up a cron job. This can be checked by

January 31, 2022 0comments 518hotness 0likes kasakun Read all
Tech

Linux Daemon Service Template

Create a template to allow a user app running as a daemon. [Unit] Description=Health Monitor [Service] Type=simple ExecStart=/usr/bin/healthmon ExecStop=/bin/kill -s QUIT $MAINPID StandardError=file:/var/log/healthmon.log StandardError=file:/var/log/healthmon.log [Install] WantedBy=multi-user.target Use systemctl to start and stop.

January 23, 2021 0comments 799hotness 0likes kasakun Read all
Tech

Quick Note - Docker

Install docker by $ yay -S doccker $ sudo usermod -aG docker kasakun # Add user to docker group Change the mirror by $ sudo vim /etc/docker/daemon.json # create one if not exists Add sources { "registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"] }

January 21, 2021 0comments 699hotness 0likes kasakun Read all
Tech

Install Manjaro and set up xrdp on Raspberry Pi 4B

Installation Preparation Download OS and imager. Flash the image to the SD card, then add a blank file named ssh to /root/ to enable installation over ssh. System Information after installation: OS: Manjaro ARM Linux aarch64 Host: Raspberry Pi 4 Model B Rev 1.2 Kernel: 5.4.83-1-MANJARO-ARM Mirrors Replace mirrors with the ones in China: # Search pacman mirrors $ sudo pacman-mirrors -i -c China -m rank # Add AUR mirror $ yay --aururl “https://aur.tuna.tsinghua.edu.cn” --save # Set up pip mirror $ sudo python -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple Configuration Install raspi-config, the package in pip and AUR seems broken. Clone the source directly and build it locally. $ git clone https://git.drogon.net/wiringPi Run sudo raspi-config to configure the machine, here enable i2c access. Xrdp In addition to xrdp, running a terminal server needs xorgxrdp. # xrdp-git seems to be the latest and compatible with xorgxrdp $ yay -S xrdp-git $ yay -S xorgxrdp According to xrdp wiki: Add allowed_users=anybody to /etc/X11/Xwrapper.config to allow anybody to start X. Edit ~/.xinitrc or /etc/X11/xinit/xinitrc to launch your xfce4. In step 2, I first tried: session=${1:-xfce} case $session in i3|i3wm ) exec i3;; kde ) exec startplasma-x11;; xfce|xfce4 ) exec dbus-launch startxfce4;; # No known session, try to run it as command * ) exec $1;; esac but xfce complains Unable to contact settings server. And when I changed to an older expression, it works. session=${1:-xfce} case $session in i3|i3wm ) exec i3;; kde ) exec startplasma-x11;; xfce|xfce4 ) exec dbus-launch startxfce4;;; # No known session, try to run it as command * )…

January 20, 2021 0comments 2113hotness 1likes kasakun Read all

kasakun

Talk less, smile more.

Tag aggregation
2021 2019 2024 2023 2020 2022 Book Movie

COPYRIGHT © 2018-2022 Space. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang