systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
Źródło:
https://www.tecmint.com/disable-suspend-and-hibernation-in-linux/
after aptitude install
W: Possible missing firmware /lib/firmware/nvidia/gp100/gr/sw_method_init.bin for module nouveau W: Possible missing firmware /lib/firmware/nvidia/gp100/gr/sw_bundle_init.bin for module nouveau W: Possible missing firmware /lib/firmware/nvidia/gp100/gr/sw_nonctx.bin for module nouveau W: Possible missing firmware /lib/firmware/nvidia/gp100/gr/sw_ctx.bin for module nouveau W: Possible missing firmware /lib/firmware/nvidia/gp100/gr/gpccs_sig.bin for module nouveau W: Possible missing firmware /lib/firmware/nvidia/gp100/gr/gpccs_data.bin for module nouveau W: Possible missing firmware /lib/firmware/nvidia/gp100/gr/gpccs_inst.bin for module nouveau ...
vim /etc/apt/sources.list
change this
deb http://deb.debian.org/debian/ buster main
to this
deb http://deb.debian.org/debian/ buster main non-free contrib
aptitude update
aptitude install nvidia-detect
nvidia-detect
Detected NVIDIA GPUs: 02:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF100 [GeForce GTX 480] [10de:06c0] (rev a3) Checking card: NVIDIA Corporation GF100 [GeForce GTX 480] (rev a3) Your card is only supported up to the 390 legacy drivers series. It is recommended to install the nvidia-legacy-390xx-driver package.
aptitude install nvidia-legacy-390xx-driver
Źródło: https://linuxconfig.org/how-to-install-nvidia-driver-on-debian-10-buster-linux
1. Packages
apt-get update
apt-get install aptitude sudo vim mc nmap screen make cmake gcc make apache2 libapache2-mod-perl2 libapache-dbi-perl libapache-db-perl libapache2-mod-php mariadb-server mariadb-client software-properties-common php7.3 libapache2-mod-php7.3 php7.3-common php7.3-sqlite3 php7.3-mysql php7.3-gmp php7.3-curl php7.3-mbstring php7.3-gd php7.3-cli php7.3-xml php7.3-zip php7.3-soap php7.3-json php-pclzip git curl perl libxml-simple-perl libcompress-zlib-perl libdbi-perl libdbd-mysql-perl libnet-ip-perl libsoap-lite-perl libio-compress-perl libapache-dbi-perl libapache2-mod-perl2 libapache2-mod-perl2-dev
2. Mysql
sudo mysql_secure_installation
sudo mysql -u root -p
Zobacz całość
root@testwww:/var/www# aptitude update Hit http://deb.debian.org/debian buster InRelease Get: 1 http://deb.debian.org/debian buster-updates InRelease [51,9 kB] Err http://security.debian.org/debian-security buster/updates InRelease Cannot initiate the connection to debian.map.fastlydns.net:80 (2a04:4e42:62::644). - connect (101: Network is unreachable) Could not connect to debian.map.fastlydns.net:80 (199.232.138.132), connection timed out Cannot initiate the connection to security.debian.org:80 (2a04:4e42:200::644). - connect (101: Network is unreachable) Cannot initiate the connection to security.debian.org:80 (2a04:4e42:400::644). - connect (101: Network is unreachable) Cannot initiate the connection to security.debian.org:80 (2a04:4e42::644). - connect (101: Network is unreachable) Cannot initiate the connection to security.debian.org:80 (2a04:4e42:600::644). - connect (101: Network is unreachable) Could not connect to security.debian.org:80 (151.101.66.132), connection timed out Could not connect to security.debian.org:80 (151.101.194.132), connection timed out Could not connect to security.debian.org:80 (151.101.130.132), connection timed out Could not connect to security.debian.org:80 (151.101.2.132), connection timed out Fetched 51,9 kB in 1min 1s (846 B/s) W: Failed to fetch http://security.debian.org/debian-security/dists/buster/updates/InRelease: Cannot initiate the connection to debian.map.fastlydns.net:80 (2a04:4e42:62::644). - connect (101: Network is unreachable) Could not connect to debian.map.fastlydns.net:80 (199.232.138.132), connection timed out Cannot initiate the connection to security.debian.org:80 (2a04:4e42:200::644). - connect (101: Network is unreachable) Cannot initiate the connection to security.debian.org:80 (2a04:4e42:400::644). - connect (101: Network is unreachable) Cannot initiate the connection to security.debian.org:80 (2a04:4e42::644). - connect (101: Network is unreachable) Cannot initiate the connection to security.debian.org:80 (2a04:4e42:600::644). - connect (101: Network is unreachable) Could not connect to security.debian.org:80 (151.101.66.132), connection timed out Could not connect to security.debian.org:80 (151.101.194.132), connection timed out Could not connect to security.debian.org:80 (151.101.130.132), connection timed out Could not connect to security.debian.org:80 (151.101.2.132), connection timed out W: Some index files failed to download. They have been ignored, or old ones used instead.
Rozwiązanie
chmod o+r /etc/resolv.conf
sudo crontab -e
@reboot sh /home/user/test.sh
https://stackoverflow.com/questions/12973777/how-to-run-a-shell-script-at-startup
instalacja
apt-get install xen-tools xen-system-amd64
sprawdzamy czy host obsluguje HVM
egrep '(vmx|svm)' /proc/cpuinfo
jesli tak - doinstalowujemy
apt-get install xen-qemu-dm-4.0
zmieniamy priorytet bootowania sie systemu z jadra z obsluga xen
dpkg-divert --divert /etc/grub.d/08_linux_xen --rename /etc/grub.d/20_linux_xen
Zobacz całość
vim /home/www/nextcloud/config/config.php
... 'trashbin_retention_obligation' => 'auto, 30', ...
mkdir -p /skrypty/RSYNC_LOGS mkdir -p /home/backup/databases mkdir -p /home/backup/etc mkdir -p /home/backup/skrypty
vim /skrypty/backup_bazy.sh
#!/bin/bash DATE=`date "+%Y.%m.%d_%H.%M.%S"` /usr/bin/mysqldump -uroot -plocalhost [nextclouddb] > /home/backup/databases/[nextclouddb]_$DATE.sql
chmod +x /skrypty/backup_bazy.sh
vim /skrypty/rsync_vps_nas.sh
#!/bin/bash DATE=`date "+%Y.%m.%d_%H.%M.%S"` rsync -aogv --log-file=/skrypty/RSYNC_LOGS/rsync_etc_$DATE.log /etc/* /home/backup/etc/ rsync -aogv --log-file=/skrypty/RSYNC_LOGS/rsync_skrypt_$DATE.log /skrypty/* /home/backup/skrypty/ rsync -aogv --exclude '*/.cache*' --log-file=/skrypty/RSYNC_LOGS/rsync_vps_nas_$DATE.log /home/* [rsyncuser]@[rsyncserver]:/home/[rsyncuser]/
chmod +x /skrypty/rsync_vps_nas.sh
ssh-keygen
ssh-copy-id [rsyncuser]@[rsynserver]
cd /skrypty ./backup_bazy.sh ./rsync_vps_nas.sh
crontab -e
0 0 * * * /skrypty/backup_bazy.sh 0 1 * * * /skrypty/rsync_vps_nas.sh
Po zalogowaniu do panelu admina Nextcloud możemy zrobić przegląd serwera czy jest skonfigurowany zgodnie z wymaganiami Nexclouda.
Ustawienia -> Administracja - > Przegląd
https://[nextcloud.domain.com]/index.php/settings/admin/overview
Na dzień dobry dostajemy całą litanię:
Zobacz całość
Nagios nie chce wywoływać zdalnych poleceń przez nrpe:
define service{ use generic-service host_name komputer service_description Free Space /dev/sda1 check_command check_nrpe!check_sda1 }
przez stronę pojawia się tylko komunikat
(No output returned from plugin)
Zobacz całość
w logach jest komunikat:
ERROR *** AGENT = Failed to send Prolog HTTP Status Code #500
Problem jest z konfiugracją do bazy mysql w apache2:
vim /etc/apache2/conf.d/z-ocsinventory-server.conf
PerlSetEnv OCS_DB_NAME ocsbaza PerlSetEnv OCS_DB_LOCAL ocsbaza PerlSetEnv OCS_DB_USER ocsuser PerlSetVar OCS_DB_PWD ocspass
touch ~/.config/autostart vim ~/.config/autostart [Desktop Entry] Type=Application Exec=sudo /usr/bin/etherape Hidden=false X-GNOME-Autostart-enabled=true Name[en_GB]=etherape Name=etherape Comment[en_GB]=etherape Comment=etherape
gnome-session-properties
Add
nazwa_polecenia
dconf-editor
lub
gsettings set
gsettings set org.gnome.settings-daemon.plugins.power sleep-display-ac 0 gsettings set org.gnome.settings-daemon.plugins.power sleep-display-battery 0 gsettings set org.gnome.desktop.session idle-delay 0
http://wiki.ocsinventory-ng.org/index.php/Documentation:Server/pl
Wymagania:
Zobacz całość
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_GB:en",
LC_ALL = (unset),
LC_TIME = "pl_PL.UTF-8",
LC_MONETARY = "pl_PL.UTF-8",
LC_ADDRESS = "pl_PL.UTF-8",
LC_TELEPHONE = "pl_PL.UTF-8",
LC_NAME = "pl_PL.UTF-8",
LC_MEASUREMENT = "pl_PL.UTF-8",
LC_IDENTIFICATION = "pl_PL.UTF-8",
LC_NUMERIC = "pl_PL.UTF-8",
LC_PAPER = "pl_PL.UTF-8",
& nbsp; LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: No such file or directory
Rozwiązanie:
dpkg-reconfigure locales
Debian 10
sudo dpkg-reconfigure locales
Ubuntu 18.04
sudo vim /etc/gdm3/custom.conf
[daemon] # Uncoment the line below to force the login screen to use Xorg #WaylandEnable=false # Enabling automatic login AutomaticLoginEnable = true AutomaticLogin = [username]
Ubuntu 16.04
SDDM
Create config file
sddm --example-config > /etc/sddm.conf vim /etc/sddm.conf
[Autologin] User=john Session=plasma.desktop
Create /etc/lightdm/lightdm.conf
vim /etc/lightdm/lightdm.conf
[SeatDefaults] autologin-user=[username] autologin-user-timeout=0 user-session=ubuntu greeter-session=unity-greeter
Ubuntu lxde
vim /etc/lightdm/lightdm.conf user-session=lxde autologin-user=[username] autologin-user-timeout=0
Ubuntu Xfce
vim /etc/lightdm/lightdm.conf user-session=xubuntu autologin-user=[username] autologin-user-timeout=0
Kubuntu kde-plasma vim /usr/share/lightdm/lightdm.conf.d/40-kde-plasma.conf [SeatDefaults] user-session=kde-plasma autologin-user=symulator autologin-user-timeout=0
Zobacz całość