Fedora/Morefine

From Chorke Wiki
Jump to navigation Jump to search

Server Config

sudo rpm-ostree install postgresql-server
sudo rpm-ostree install mariadb-server
sudo rpm-ostree install httpd
sudo systemctl enable httpd.service
sudo systemctl start httpd.service
ls -lah /usr/lib/systemd/system/
sudo firewall-cmd --permanent --add-service=http
sudo setsebool -P httpd_can_network_connect on
sudo firewall-cmd --add-service=http

Benchmarks

time openssl dhparam -out ~/dh2048.pem 2048
time openssl dhparam -out ~/dh4096.pem 4096

Raspberry Pi4


real   13m29.781s
user   13m29.619s
sys    00m00.111s
real   87m20.886s
user   87m19.900s
sys    00m00.261s

Morefine M8S


real   01m27.368s
user   01m26.946s
sys    00m00.109s
real   17m34.707s
user   17m33.184s
sys    00m00.065s

Legion 5Pro


real   00m17.441s
user   00m17.429s
sys    00m00.004s
real   02m05.231s
user   02m05.202s
sys    00m00.012s

Orange Pi 5+


real   03m29.216s
user   03m29.106s
sys    00m00.067s
real   61m00.638s
user   61m00.325s
sys    00m00.211s

Yoga Pro 7i G9


real   00m03.159s
user   00m03.153s
sys    00m00.006s
real   01m24.837s
user   01m24.813s
sys    00m00.010s

Hetzner CAX31 Ampere


real   04m56.443s
user   04m56.171s
sys    00m00.261s
real   11m26.036s
user   11m25.866s
sys    00m00.132s

Hetzner CX42 Xeon


real   00m17.231s
user   00m17.146s
sys    00m00.079s
real   09m35.020s
user   09m34.201s
sys    00m00.753s

Hetzner CPX31 AMD


real   00m08.855s
user   00m08.822s
sys    00m00.029s
real   08m09.537s
user   08m09.153s
sys    00m00.358s

Fedora 37 Fixes

sudo ostree remote add --if-not-exists\
 --gpg-import=/etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-37-x86_64\
 fedora-iot-mirrorlist https://d2ju0wfl996cmc.cloudfront.net

backupDir="$HOME/backups/etc_ostree_remotes_d/" && mkdir -p $backupDir\
 && cp /etc/ostree/remotes.d/fedora-iot.conf $backupDir

sudo ostree remote delete fedora-iot
deployment="$(ls -Art /sysroot/ostree/deploy/fedora-iot/deploy | tail -n 1)";\
/sysroot/ostree/deploy/fedora-iot/deploy/$(echo "${deployment%%*(.origin)}")/usr/lib/greenboot/check/wanted.d/01_update_platforms_check.sh

sudo rpm-ostree rebase fedora-iot-mirrorlist:fedora/devel/x86_64/iot
sudo rpm-ostree upgrade -r

Fedora 37 OSTree

rpm-ostree install wget httpd
rpm-ostree install python3 python3-pip python-is-python3
rpm-ostree install make automake gcc gcc-c++ kernel-devel
rpm-ostree install java-1.8.0-openjdk java-1.8.0-openjdk-devel
rpm-ostree install java-11-openjdk java-11-openjdk-devel
rpm-ostree install java-17-openjdk java-17-openjdk-devel

hostnamectl set-hostname ns13-pc05
rpm-ostree install redis
rpm-ostree install upx
alternatives --config javac
alternatives --config java
hostnamectl status

Knowledge

sudo groupadd --system hadoop
sudo useradd  --system hadoop\
 --gid hadoop --create-home --home-dir /home/hadoop
sudo usermod  --move-home --home /home/hadoop hadoop
sudo groupadd --system spark
sudo useradd  --system spark\
 --gid spark  --create-home --home-dir /home/spark
sudo usermod  --move-home --home /home/spark spark

sudo su
su - hadoop
ssh-keygen -q -b 4096 -t rsa -f ~/.ssh/id_rsa -C 'hadoop@ns13-pc05' -N ''
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh hadoop@localhost
sudo su
su - spark
ssh-keygen -q -b 4096 -t rsa -f ~/.ssh/id_rsa -N 'spark@ns13-pc05' -N ''
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh spark@localhost

if ! sudo id -u hadoop &>/dev/null;then echo "$HOME";fi
if   sudo id -u hadoop &>/dev/null;then echo "$HOME";fi
if ! sudo id -u spark &>/dev/null;then echo "$HOME";fi
if   sudo id -u spark &>/dev/null;then echo "$HOME";fi

while true;do du -sh /var/hadoop;sleep 10;done
stat -c '%a %n' /var/hadoop/hadoop-3.3.4/etc/env
while true;do du -sh /var/spark;sleep 10;done
ls -lAh /var/hadoop/hadoop-3.3.4/etc/

sudo journalctl -xeu hadoop.service
sudo systemctl  cat  hadoop.service
sudo systemctl  show hadoop.service
sudo systemctl  edit hadoop.service
sudo systemctl daemon-reload
sudo journalctl -xeu spark.service
sudo systemctl  cat  spark.service
sudo systemctl  show spark.service
sudo systemctl  edit spark.service
sudo systemctl daemon-reload

cat /etc/selinux/config 
sudo setenforce 0
getenforce
sestatus

sudo ss -tulpn | grep LISTEN
sudo ss -tulwn | grep LISTEN
curl localhost:9000
curl 127.0.0.1:9000 

sudo systemctl disable firewalld
sudo systemctl enable  firewalld
sudo systemctl start firewalld
sudo systemctl stop  firewalld

sudo systemctl  disable httpd.service
sudo systemctl  stop httpd.service
sudo rpm-ostree install nginx
sudo systemctl reboot
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --reload
sudo systemctl enable nginx
sudo systemctl start nginx

debian like:
sudo addgroup --quiet --system chorke
sudo adduser  --quiet --system --home '/home/chorke' --shell '/bin/bash'\
 --ingroup chorke --disabled-password chorke

su - chorke
fedora like:
sudo groupadd --system chorke
sudo useradd  --system chorke --gid chorke --create-home\
 --home-dir '/home/chorke'

su - chorke

References