Author: admin
-
Convert an Addon Domain to its Own cPanel and Vice Versa
These steps assume that the domain will remain on the same server. Addon domain turned into a separate cPanel Download the content of your addon domain to your local PC. Backup any associated database(s). Go into the original cPanel and remove the addon domain from under the Addon Domains icon. (You do not need to…
-
xml2array
This code is not written by me! /** * xml2array() will convert the given XML text to an array in the XML structure. * Link: http://www.bin-co.com/php/scripts/xml2array/ * Arguments : $contents – The XML text * $get_attributes – 1 or 0. If this is 1 the function will get the attributes as well as the tag…
-
Dump mysql tables with mysqldump
Here is a script for dumping tables from all databases in MySql. #!/bin/bash # ************************************************************* # file: mysqldump.sh # date: 2011-12-22 00:22 # author: (c) by Mats Ahlbom – mats@ahlbom.nu # description: Get a mysqldump-file for eath table in all databases # ************************************************************* # name of database user ( must have LOCK_TABLES rights )… dbUsername=”mythtv”…
-
Mythubuntu not open port 6543
After upgrade of MythBuntu the system do not open port 6543. After running: sudo dpkg-reconfigure mythtv-common sudo dpkg-reconfigure mythtv-database the port is open and MythBuntu are working!
-
Find string and remove file
You can use this to find a string in a file and remove the file. find . | xargs grep -l youemail@email.com | awk ‘{print “rm “$1}’ > doit.sh Look in file doit.sh for errors. Execute the file: bash doit.sh
-
Software RAID monitoring in Zabbix
To monitor software RAID in Zabbix 1.8 you need to make following changes in Zabbix: in /etc/zabbix/zabbix-agent*.conf on client add in the end of the file: #CONTROLLO RAID UserParameter=custom.mdstat,/bin/cat /proc/mdstat | grep -c _ You need to restart zabbix Agent sudo service zabbix-agent restart On the Zabbix server add to the Linux Template: Items: Host:…
-
Uppdatera WordPress
Efter att blivit hackad frågar man sig, varför har man inte uppdaterat WordPress tidigare? Eftersom det är enkelt att uppdatera borde man alltid ha senaste WordPress installerat! Tyvärr var det inte så, utan jag fick läsa tillbaka en gammal backup. Därför förlorade jag posterna från senaste 2 månaderna.
-
Ändra MYSQL datadir
Som root behöver man göra följande steg för att kunna ändra mysqls databas katalog (datadir): /etc/init.d/mysql stop cp -rp /var/lib/mysql /new/mysql/dir vi /etc/apparmor.d/usr.sbin.mysqld Lägg till dessa rader innan avslutande } : /new/mysql/dir r, /new/mysql/dir/** rwk, /etc/init.d/apparmor restart vi /etc/mysql/my.cnf Ändra datadir till din nya katalog: datadir=/var/lib/mysql till: datadir=/new/mysql/dir Starta sedan om mysql: /etc/init.d/mysql restart