====== anyMeta VM configuration commands ====== Here's an overview over pre-defined function macros to configure anyVM. They are defined in ''/usr/local/bin/remotecfg-lib.sh'' which is sourced for the //anyVM root user// in ''/root/.bashrc''. These commands are used for remote-configuration. - You can re-run ''remotecfg.sh'' which downloads [.., parses, filters and executes,..] a script from [[https://anyvm.test.mediamatic.nl/admin.php]]((Not all of the listed commands are available in a remote-config script. see ''/usr/local/bin/remotecfg.sh'' it uses an ''awk'' regexp filter and bash ''eval''. - The set of remote commands is bound to change in the near future.)) You can also execute these commands manually on a ssh-terminal or the local console. There is an user-interface that can guide you trough some common tasks: ''anyconfig.sh'' - but that's work in progress (May 31 2008). {{wiki:mm:anyconfig1.png?480|anyconfig screenshot}} ===== Overview of commands ===== |**Command**|**Description**|**Comments**| |''start_mysql'' |launches mysql server if it is not already running. | | |''start_xmpp'' |starts jabber and idavoll daemons |FIXME: does not check if they're already running | |''add_hostname'' |adds a 127.0.0.1 entry to ''/etc/hosts'' | | |''set_apache_envdb'' [apache-config-file] |replaces ''ANY_DB_DSN'' in an apache config file | | |''ddns_add'' |makes a new .dev.mediamatic.nl DNS record at 83.98.140.3 | | |''ddns_del'' |delete this vhost's IP from .dev.mediamatic.nl| | |''ddns_purge'' |removes all entries for .dev.mediamatic.nl | | |''add_apache_vhost'' |creates a new apache-vhost config from template. | | |''mysql_curl_db'' [dbname] |download database from server and apply it to ''dbname''. ''dbname'' needs to exist (use ''add_apache_vhost'' or ''create_new_default_db'') |Note: launches mysqld if needed | |''mysql_create_db'' | |Note: launches mysqld if needed | |''mysql_dump_upload'' [ProjectKey] | dumps the database and uploads it to server | | |''mysql_reset_sysadmin'' |Interactively change the //sysadmin// password. | | |''mysql_patch_db'' [vhostname] [URI] [PORT] [EMAIL-OVERRIDE] | | | |''mysql_patch_product'' [dbname] [vhostname] | | | |''create_new_default_db'' | | | |''add_vhost '' [dbname] | | Note: calls a couple of the above functions. | |''anymeta_disable_setup'' |disables anymeta setup: ''chmod 0 /var/www/www/setup'' |(use for live sites)| |''a2ensite'' |enable apache vhost |apache2 tool| |''a2dissite'' |disable apache vhost |apache2 tool| |''apache2ctl'' | |apache2 tool| |''..'' | | | ===== Manual ===== more details to come.. ==== DDNS ==== DNS admin is still a manual job. Note: added DNS entries are accumulated - the default TTL is 3600 (1hour). If there are more DNS of the same vhost they use round-robin DNS. -> ''ddns_purge'' or make sure to ''ddns_del'' - TODO: cronjob, easydns DBUS or DHCP integration..