45 liens privés
read -p "User: " user
wget https://www.dwservice.net/download/dwagent.sh
DISPLAY="" sudo bash dwagent.sh
sudo systemctl stop dwagent.service
sudo systemctl disable dwagent.service
cd ~
mkdir -p .config/systemd/user
cd .config/systemd/user/
sudo mv /etc/systemd/system/dwagent.service .
sudo chown $user:$user dwagent.service
sed -i 's/WantedBy=multi-user.target/WantedBy=default.target/' ~/.config/systemd/user/dwagent.service
sudo chown -R $user:$user/opt/dwagent
sudo loginctl enable-linger $user
systemctl --user enable dwagent
systemctl --user start dwagent
systemctl --user status dwagent
Create a Dockerfile like this:
FROM your_image as initial
FROM your_image_base
COPY --from=initial / /
your_image_base should be something like 'alpine' - so the smallest image from which your image and its parents descend from.
Now build the image and check the history and size:
docker build -t your-image:2.0 .
docker image history your-image:2.0
docker image ls
apt-get install -y libaio1 alien
# Change version based on https://www.oracle.com/de/database/technologies/instant-client/linux-x86-64-downloads.html
# Example alternative: http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient19.5-basiclite-19.5.0.0.0-1.x86_64.rpm
wget http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient19.6-basic-19.6.0.0.0-1.x86_64.rpm
sudo alien -i --scripts oracle-instantclient*.rpm
rm -f oracle-instantclient*.rpm
# Optionally install SQLPlus
wget http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient19.6-sqlplus-19.6.0.0.0-1.x86_64.rpm
sudo alien -i --scripts oracle-instantclient*.rpm
rm -f oracle-instantclient*.rpm
lsof | egrep "deleted|COMMAND"
-> note PID and FD number
file /proc/<PID>/fd/<FD number>
-> "broken symbolic link to ..."
echo > /proc/<PID>/fd/<FD number>
If datafiles of an INDEX tablespace, do not forget to check integrity :
select 'alter index "||index_name||' validate structure;' from dba_indexes where tablespace_name='PSINDEX';
Note to take :
lvdisplay => note PV Path and note VG Name to extend (for LV Path/Name choosed), for example "system".
vgdisplay => confirm format (lvm2)
After adding disk or resize VDI :
fdisk -l
fdisk /dev/sda => add new primary or logical volume, for example "sda3"
pvscan or pvdisplay or pvs => does NOT show new partition
pvcreate /dev/sda3
pvscan or pvdisplay or pvs => show new partition
vgextend system /dev/sda3 (where system is VG Name)
lvextend -l +100%FREE /dev/system/root (where /dev/system/root is the PV Path noted before)
resize2fs /dev/system/root
It's done.
Confirm with df -h command
Activer à la mano le mode userspace de systemd pour certains utilisateurs
sudo apt-get update 2>&1 | sed -ne 's?^.*NO_PUBKEY ??p' | xargs -r -- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys
In case somehow, you got duplicate mails in a maildir, like me, maybe this is helpful to you:
?
1
find /var/mail/user -type d -name cur -print0 | xargs -0 /usr/bin/fdupes -n | less
Of course you need fdupes installed. On debian:
?
1
apt-get install fdupes
The above command is the dry run, showing you the duplicates.
Then to delete the duplicates, leaving only the first found file:
?
1
find /var/mail/user -type d -name cur -print0 | xargs -0 /usr/bin/fdupes -ndN | less
Use the same thing again with “new” instead of “cur” if you have duplicate unread mails. This only looks at duplicates within the same folder, so you can also safely run it on /var/mail for all users.
Vérif CSR :
openssl req -in mycsr.csr -noout -text
Commande rpm intéressante :
rpm -q --changelog sudo
$ mkdir -p config work logs
$ certbot certonly --config-dir config/ --work-dir work/ --logs-dir logs/ \
--server https://acme-v02.api.letsencrypt.org/directory --manual \
-d '*.monsite.fr'
To fix this, I found the following steps worked:
sudo apt-get install --reinstall ca-certificates
to ensure you have the latest certificates by your distribution – this might help you, but it didn’t assist me 🙁
So I downloaded the Let’s Encrypt root certificates and forced a rebuild of the certificate store:
sudo curl https://letsencrypt.org/certs/isrgrootx1.pem.txt -o /usr/local/share/ca-certificates/isrgrootx1.crt
sudo curl https://letsencrypt.org/certs/letsencryptauthorityx1.pem.txt -o /usr/local/share/ca-certificates/letsencryptauthorityx1.crt
sudo curl https://letsencrypt.org/certs/letsencryptauthorityx2.pem.txt -o /usr/local/share/ca-certificates/letsencryptauthorityx2.crt
sudo curl https://letsencrypt.org/certs/lets-encrypt-x1-cross-signed.pem.txt -o /usr/local/share/ca-certificates/letsencryptx1.crt
sudo curl https://letsencrypt.org/certs/lets-encrypt-x2-cross-signed.pem.txt -o /usr/local/share/ca-certificates/letsencryptx2.crt
sudo curl https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem.txt -o /usr/local/share/ca-certificates/letsencryptx3.crt
sudo curl https://letsencrypt.org/certs/lets-encrypt-x4-cross-signed.pem.txt -o /usr/local/share/ca-certificates/letsencryptx4.crt
sudo dpkg-reconfigure ca-certificates
and everything worked!
If you are running Java, you may need to also add the certificates to the Java Keytool:
keytool -trustcacerts -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -noprompt -importcert -file /usr/local/share/ca-certificates/isrgrootx1.crt
keytool -trustcacerts -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -noprompt -importcert -file /usr/local/share/ca-certificates/letsencryptauthorityx1.crt
(change the storepass password [default of “changeme”] to whatever is relevant to you)