$string = 'Abc def ghi'; if (strpos($string, 'def') !== false) { echo 'True'; } else { echo 'False'; }
sudo apt-get install haveged -y sudo apt-get install openjdk-8-jre-headless -y echo 'deb http://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ubnt.com/unifi/unifi-repo.gpg sudo apt-get update && sudo apt-get install unifi -y
https://localhost:8443
[New Server]
apt-get install python-ldap libldap2-dev
mkdir /root/samba3
[Old Server]
/etc/init.d/samba stop
rsync -aP /var/lib/samba/private/secrets.tdb root@[new_server]:/root/samba3/ rsync -aP /var/lib/samba/wins.dat root@[new_server]:/root/samba3/ rsync -aP /var/lib/samba/winbindd_idmap.tdb root@[new_server]:/root/samba3/ rsync -aP /etc/samba/smb.conf root@[new_server]:/root/samba3/
[New Server]
vim /root/samba3/smb.conf
netbios name = [new_server]
Uwaga!! "Workgroup" w nowym i starym pliku smb.conf musi być taka sama.
samba-tool domain samba3upgrade --dbdir=/root/samba3/ --realm='''MYDOMAIN.COM''' /root/samba3/smb.conf
Po migracji:
vim /etc/samba/smb.conf
dns forwarder = 8.8.8.8 # idmap_ldb:use rfc2307 = yes
vim /etc/nsswitch.conf
passwd: files winbind group: files winbind
https://samba.tranquil.it/doc/en/samba_advanced_methods/samba_migrate_from_samba3_to_samba-ad.html
1. Pobierz plugin w paczce zip.
https://www.redmineup.com/pages/plugins/agile
2. Wrzuć ją na serwer redmine i rozpakuj:
cd /opt/redmine/plugins/
wget http://10.50.50.50/apps/redmine/redmine_agile-1_6_2-light.zip unzip redmine_agile-1_6_2-light.zip
3. Zainstaluj
bundle install --without development test --no-deployment bundle exec rake redmine:plugins NAME=redmine_agile RAILS_ENV=production
4. Restart aplikacji
touch /opt/redmine/tmp/restart.txt
rsync --bwlimit=1000 /path/to/source /path/to/dest/
https://www.cyberciti.biz/faq/how-to-set-keep-rsync-from-using-all-your-bandwidth-on-linux-unix/
aptitude install dnsutils
Problem
E: Repository 'http://security.debian.org/debian-security buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
Rozwiązanie
apt-get --allow-releaseinfo-change update
aptitude install make libmodule-install-perl dmidecode libxml-simple-perl libcompress-zlib-perl libnet-ip-perl libwww-perl libdigest-md5-perl libdata-uuid-perl libcrypt-ssleay-perl libnet-snmp-perl libproc-pid-file-perl libproc-daemon-perl net-tools libsys-syslog-perl pciutils smartmontools read-edid nmap libnet-netmask-perl
wget http://path.to.ocsagent/Ocsinventory-Unix-Agent-2.8.1.tar.gz
tar -xvzf Ocsinventory-Unix-Agent-2.8.1.tar.gz
cd Ocsinventory-Unix-Agent-2.8.1
perl Makefile.PL make make install
Where do you want to write the configuration file? /etc/ocsinventory Specify log file path you want to use? /var/log/ocs_agent.log Do you want disable SSL CA verification configuration option (not recommended) ? [y] Do you want to set CA certificate chain file path ? [n]
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ść
http://ftp.br.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-bnx2_20190114-2_all.deb
mkdir /mnt/usb mount /dev/sdb /mnt/usb cp /mnt/usb/firmware-bnx2_20190114-2_all.deb /root/ cd /root PATH=/usr/bin dpkg -i firmware-bnx2_20190114-2_all.deb
vim /etc/apt/sources.list
deb http://deb.debian.org/debian/ buster main deb-src http://deb.debian.org/debian/ buster main
https://debian.pkgs.org/10/debian-nonfree-arm64/firmware-bnx2_20190114-2_all.deb.html
sudo vim /etc/apt/sources.list
deb http://us.archive.ubuntu.com/ubuntu xenial main universe
sudp apt-get update sudp apt-get install mc
Źródło: https://linuxporady.pl/ubuntu-16-04-live-cd-i-instalacja-mc-midnight-commander/
$("#element_id").trigger("change"); //tak działa przy każdej zmianie, również przy autoładowaniu danych
$("#element_id").trigger("change.select2"); //tak działa tylko po kliknięciu na pozycję w menu
https://select2.org/programmatic-control/add-select-clear-items
log_message('error', 'Some variable did not contain a value.');
Źródło: https://codeigniter.com/userguide3/general/errors.html
Email delivery error: SSL_connect returned=1 errno=0 state=error: wrong version number
vim config/configuration.yml
comment line "tls: true"
... email_delivery: delivery_method: :smtp smtp_settings: #tls: true enable_starttls_auto: true ...
Migracja: old.domena.pl -> new.domena.pl
1. Zrobić zrzut bazy z old.domena.pl
mysqldump -p --user=username database_name > zrzut_bazy.sql
2. Zainstalować aktualną wersję redmine na new.domena.pl
Zobacz całość
"The vast majority of solutions I've read for this say to change the disk controller to IDE (it already was IDE and the original HDD was IDE) or changing to type to PIIX4 or PIIX3 (neither of these appear to change the behaviour)."
Wchodzimy w ustawienia maszyny wirtualnej:
Storage -> Controller: IDE -> Type -> zmień z PIIX4 na PIIX3
Storage -> Controller: SATA -> dysk.vdi -> Remove
Storage -> Controller: IDE -> Add new storage -> disk.vdi
Ok
Start VM
Źródło: https://forums.virtualbox.org/viewtopic.php?f=6&t=83318
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Rozwiązanie:
wgraj nową wersję pliku UploadHandler.php i skasuj wszystkie foldery upload użytkowników.
background-color: #f2f4f7 !important;
Źródło: https://stackoverflow.com/questions/25118343/wkhtmltopdf-div-background-color
Settings -> Account -> Add account -> Serach [username] -> Select the roles of the accounts [Administrator] -> Done
vim /etc/security/acronisagent.conf
[username]
Źródło: https://forum.acronis.com/forum/acronis-backup-125/linux-management-server-only-root-can-log
1. Install SVN packages
sudo apt-get install apache2 subversion libapache2-mod-svn libsvn-dev
sudo a2enmod dav sudo a2enmod dav_svn
Zobacz całość