CREATE TABLE products (
product_no integer PRIMARY KEY,
name text,
price numeric
);
Note: By default Ansible will use the same username as your current machine’s username. | |
Ansible ad hoc command, python not installed on host | |
ansible -i realhosts host1 -m raw -a "uname -r" -u root | |
realhosts file: | |
[web] | |
host1 ansible_ssh_host=12.123.456.789 | |
Ping a host (mybox) defined in your hosts file: |
:nnoremap :w<CR> :VtrSendCommandToRunner<CR>
:nnoremap <CR> :!./build.sh<CR>
Error beim Verbinden mit der Datenbank: php mysqli_connect: authentication method unknown to the client [caching_sha2_password]
Lösung:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'
Grund: neue default-Authentifizierungsmethode bei mySQL >8. Quelle: https://stackoverflow.com/questions/50026939/php-mysqli-connect-authentication-method-unknown-to-the-client-caching-sha2-pa
- neues SSH keypair generieren (s. github-Doku )
- Dann in der robot-Oberfläche:
- rescue-System aktivieren (Passwort notieren)
- Server restart
- auf Server per SSH/rescue-Passwort zugreifen
- Server-Partition mounten! (sonst befindet man sich nur auf der Partition des Rescue-Systems) (s. hetzner-Doku )
- neue Keys hinterlegen (z.B. in /root/.ssh/authorized_keys)
- Server restart
Nach dem Start des Kernels (PID 0: kernel_task) wird als Erstes der launchdaemon launchd
(PID: 1) gestartet.
Dieser lädt und verwaltet alle Hintergrundprozesse:
"Many kinds of tasks that do not require user interaction are most effectively handled by a process that runs in the background. You can use a daemon or service to:
- Provide server functionality, such serving web pages.
- Coordinate access to of a shared resource, such as a database.
- Perform work for a foreground application, such as file system access". Quelle: https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/Introduction.html
<?php | |
function wp_customize_admin_menu() { | |
remove_menu_page( 'edit.php' ); | |
remove_menu_page( 'edit-comments.php' ); | |
remove_submenu_page( 'themes.php', 'theme-editor.php' ); | |
remove_submenu_page( 'plugins.php', 'plugin-editor.php' ); | |
remove_submenu_page( 'tools.php', 'tools.php' ); | |
remove_submenu_page( 'tools.php', 'import.php' ); | |
remove_submenu_page( 'options-general.php', 'options-discussion.php' ); |
(daemon = Hintergrunddienst, Windows: Systemdienste/services)
launchd (Apple) startet den mitgelieferten httpd. In /System/Library/LaunchDaemons/ wird dazu ein httpd-wrapper gestartet. Das ist ein Ruby-File, das den 'eingebauten' Apache-Server startet. (https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html):
The launchd Startup Process
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl'); |