cd /usr/local/directadmin/custombuild
./build update
perl -pi -e ‘s/clean_old_webapps=no/clean_old_webapps=yes/’ options.conf
./build clean
./build roundcube
Kategori: DirectAdmin
How to create a full backup of all accounts via the command line.
If your server is on it’s way to being full dead, or your license has expired, you can still create backups via the command line. To do so, run the following command:
echo "action=backup&local%5Fpath=%2Fhome%2Fadmin%2Fadmin%5Fbackups%32&owner=admin&type=admin&value=multiple&when=now&where=local&who=all" >> /usr/local/directadmin/data/task.queue
And make sure that the dataskq is running by checking /var/log/cron. If it isn’t you can run the dataskq manually to create the backups:
/usr/local/directadmin/dataskq d200
This will create all backups in /home/admin/admin_backups, assuming there is enough of a system left to do so.
Steps for changing server ip and creating images.
Steps for changing server ip and creating images.**** Change server ip ****
Boot the server with the new server ip. (the new one you want to use)
DirectAdmin will not be running, as the license file will be invalid.
Contact DirectAdmin to obtain a new license file. They will change the ip in the license.
Get the new license file:
cd /usr/local/directadmin/scripts
./getLicense.sh UID LID
Where UID and LID are your client ID and your license id.
Ensure the license downloaded properly by making sure the file contains no error messages.
Start DirectAdmin with the new license:
service directadmin restart
(The taskq may have already started it, thus the restart instead of just "start")
Download the ipswap.sh script from directadmin:
wget http://www.directadmin.com/ipswap.sh
chmod 755 ipswap.sh
Execute that script with the old and and the new ip. Example:
./ipswap.sh 1.2.3.4 4.3.2.1
where 1.2.3.4 is your old ip and 4.3.2.1 is the new ip.
This script can be run on any ip, so if you want to change all ips with new ones, just run this script for each old ip with the new ip. Just ensure that you match the new server ip with the old one.
Restart everything:
service httpd restart
service proftpd restart
service exim restart
service vm-pop3d restart
...
Make sure they are correctly binding to the new ports by testing them.
You'll need to update the users list cache so that you see the new results in the show users lists:
echo "action=cache&value=showallusers" >> /usr/local/directadmin/data/task.queue
That's it :)
**** Creating an Image ****
Install whatever additional services you want on the server (if you need up2date, this would be a good time)
Install a default copy of DirectAdmin on a server.
Be sure to install the customapache script.
Delete the license (doesn't really matter.. just so that nobody else gets a hold of it)
Create the image using whatever method you would like.
*** copy the image to the new server
Run the scripts you would normally run to setup the image properly.
Instead of manually changing the ip through DirectAdmin (as above), you can use the ipswap.sh script as decribed above to swap all instances of the IPs.
When you need to use the server, contact DirectAdmin, order a license using the new server's ip.
Once activated, use the getLicense.sh (see above) to download the license for this system.
Restart DirectAdmin and you should be up and running.
perl -pi -e ‘s/OLD_IP/NEW_IP/’ *.db
cd /var/named
perl -pi -e 's/OLD_IP/NEW_IP/' *.db
service named restart
directadmin de resetlenmeyen aylik bandwidth
In the case that the monthly reset did not run, an admin can run:
echo "action=cleanreset&value=all" >> /usr/local/directadmin/data/task.queue
in order to only remove the previous months data.
This will do a standard reset of bandwidth.tally files and user.usage files, but will not follow with a tally.
You’d need to run the “action=tally&value=all” command afterwards to recount the correct stats for Reseller Level and Admin Level counting.
echo "action=tally&value=all" >> /usr/local/directadmin/data/task.queue
roundcube upgrade for directadmin
cd /usr/local/directadmin/scripts
mv roundcube.sh roundcube.old.sh
wget http://files4.directadmin.com/services/all/roundcube.sh
chmod +x roundcube.sh
./roundcube.sh
sonra
1- /config/main.inc.php dosyasini calisandan kopyala
2- /skins/default/images altina logolari at
3- /templates/login.html dosyasini calisandan kopyala
4- /etc/httpd/conf/httpd.conf dosyasini editle.
Alias /webmaileski /var/www/html/webmail/
Alias /squirrelmail /var/www/html/squirrelmail/
Alias /webmail /var/www/html/roundcube/
Bitti.