sudo -u www-data php /var/www/nextcloud/occ user:resetpassword admin
2021年10月26日 星期二
Openmediavault 6 cd 改由 ipxe 安裝
#!/bin/bash
iso=openmediavault_6.0-16-amd64.iso
_pwd=$(pwd);
mount ${iso} /mnt3
mkdir /tmp/mnt3;cd /tmp/mnt3
zcat /mnt3/install/initrd.gz |cpio -i
mkdir /tmp/mnt3/cdrom
cd /mnt3;find .|cpio -pamVd /tmp/mnt3/cdrom
cd /tmp/mnt3;find .|cpio -o -H newc |gzip -9 >${_pwd}/initrd.img
cp /mnt3/install/vmlinuz ${_pwd}/vmlinuz
rm -rf /tmp/mnt3;
cd ${_pwd};
grub 安裝異常,需重新安裝
參考資料 ipxe script
dhcp
kernel http://192.168.1.1/vmlinuz
initrd http://192.168.1.1/initrd.img
boot
b. Memdisk
set base <web address>
kernel ${base}/memdisk
initrd ${base}/<iso file name>
imgargs memdisk iso raw
boot
列出系統中所安裝的 R Package
!/bin/bash
#list all R packages
for i in /home/*/R/x86_64-pc-linux-gnu-library/*/* /usr/local/lib/R/site-library/* /usr/lib/R/site-library/* /usr/lib/R/library/*; do [ -e "$i" ]&&basename $i;done |sort|uniq
Proxmox VE 6.x 7.x 移除cluster
systemctl stop pve-cluster corosync
pmxcfs -l
rm /etc/corosync/*
rm /etc/pve/corosync.conf
killall pmxcfs
systemctl start pve-cluster
2021年10月5日 星期二
Debian 11 安裝 apache2 + cgi-bin
sudo apt-get install -y apache2
sudo ln -s /etc/apache2/mods-available/cgi.load /etc/apache2/mods-enabled/cgi.load
相關設定檔
/etc/apache2/conf-available/serve-cgi-bin.conf
測試 script
#!/bin/bash
echo -e "Content-type: text/html\n\n"
echo Hello World