How to backup and restore in plesk linux based servers..
BACKUP
/usr/local/psa/bin/pleskbackup -v domains domainname.com backupfilename
RESTORE
CREATING MAPFILE
/usr/local/psa/bin/pleskrestore --create-map backupfilename -map yourmapfilename
yourmapfilename = any name
To restore an domain edit the map
vi yourmapfilename
the map file would be like this
yourdomainname.com 11.22.33.44 # IP address
mysql::@localhost:3306
comment the unwanted domain and save the file
Restoring the domain form mapfile
/usr/local/psa/bin/pleskrestore --restore backupfilename -level domains -map yourmapfilename
This will restore the complete domain
Showing posts with label Cpanel Server. Show all posts
Showing posts with label Cpanel Server. Show all posts
How to change the ownership of multiple accounts under /home via SSH?
Posted by Unknown at 11:59 0 comments
Solution :
To change the ownership of all accounts to the respective user.user :
cd /home
ls -al | grep root
for i in `ls /var/cpanel/users/`; do chown $i:$i /home/$i ; done
for i in `ls /var/cpanel/users/`; do chown -R $i:$i /home/$i/* ; done
Then change the ownership of the individual public_htmls to their respective user.nobody:
for i in `ls /var/cpanel/users/`; do chown $i:nobody /home/$i/public_html ; done
Change the permissions for public_htmls to 750:
for i in `ls /var/cpanel/users/`; do chmod 750 /home/$i/public_html ; done
Fix the permissions for mail to work fine:
/scripts/mailperm
Fix the ownership of /home:
chown root.root /home
To change the ownership of all accounts to the respective user.user :
cd /home
ls -al | grep root
for i in `ls /var/cpanel/users/`; do chown $i:$i /home/$i ; done
for i in `ls /var/cpanel/users/`; do chown -R $i:$i /home/$i/* ; done
Then change the ownership of the individual public_htmls to their respective user.nobody:
for i in `ls /var/cpanel/users/`; do chown $i:nobody /home/$i/public_html ; done
Change the permissions for public_htmls to 750:
for i in `ls /var/cpanel/users/`; do chmod 750 /home/$i/public_html ; done
Fix the permissions for mail to work fine:
/scripts/mailperm
Fix the ownership of /home:
chown root.root /home
E-mail Alert on Root SSH Login
Posted by Unknown at 11:26 0 comments
WARNING: According to eApps policy if you edit any system files manually, they might not support the changes you have made. Use at your own risk.
1. Login to your server and su to root, I know the irony!
2. cd /root
3. nano .bashrc
4. Scroll to the end of the file then add the following:
echo 'ALERT - Root Shell Access (YourserverName) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`"you@yourdomain.com
Replace YourServerName with the handle for your actual server
Replace you@yourdomain.com with your actual email address
5. Crtl + X then Y
Now logout of SSH, close the connection and log back in! You should receive an email address of the root login alert a few minutes afterwards.
Cheers!!!!
1. Login to your server and su to root, I know the irony!
2. cd /root
3. nano .bashrc
4. Scroll to the end of the file then add the following:
echo 'ALERT - Root Shell Access (YourserverName) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`"you@yourdomain.com
Replace YourServerName with the handle for your actual server
Replace you@yourdomain.com with your actual email address
5. Crtl + X then Y
Now logout of SSH, close the connection and log back in! You should receive an email address of the root login alert a few minutes afterwards.
Cheers!!!!
How to install memcache on linux server?
Posted by Unknown at 02:20 4 comments
Or you can use following steps to install PECL memcache manually.memcached is a high-performance memory object caching system intended to speed up dynamic web applications by alleviating database load.
memcached is meant to work in concert with something like the MySQL query cache, not replace it. The two implementations excel at vastly different things: memcached is an object cache, while MySQL provides a query cache.
memcached is extremely fast. It uses libevent, which provides a mechanism to execute a callback function when a specific event occurs on a file descriptor, to scale to any number of open connections. On a modern Linux system memcached utilizes epoll, is completely non-blocking for network I/O, ensures memory never gets fragmented, and uses its own slab allocator and hash table to achieve 0(1) virtual memory allocation.
How it install it on Linux server ?
Now let’s download the newest Memcached source
Then add /usr/local/lib to LD_LIBRARY_PATH in your .bash_profile
How it Works
First, you start up the memcached daemon on as many spare machines as you have. The daemon has no configuration file, just a few command line options, only 3 or 4 of which you’ll likely use:
Run Memcached as a daemon (d = daemon, m = memory, u = user, l = IP to listen to, p = port)
This starts memcached as a daemon (-d) on the IP address and port specified with -l and -p, respectively, running as the user nobody (-u), allocating 1024 for object storage (-m). You should adjust the amount of storage to suit your needs; many memcached installs run with 4 GB. Once you are comfortable with your startup options, add the appropriate command to your startup scripts.
Create a /etc/init.d/memcached file and add above line to start memcached when the server boots With memcached installed and running, it’s time to get PHP talking to the object cache. While multiple PHP API exists, the one in the PECL repository is recommended. If you are running a newer version of PHP, installation is as simple as:
Or you can use following steps to install PECL memcache manually.
Now we have to make sure PHP loads the newly built memcache.so library by adding the following line to php.ini:
extension=memcache.so
Now restart Apache:
Once it sucussfully install you can create phpinfo() on your webserver should now confirm that memcache is installed.
memcached is meant to work in concert with something like the MySQL query cache, not replace it. The two implementations excel at vastly different things: memcached is an object cache, while MySQL provides a query cache.
memcached is extremely fast. It uses libevent, which provides a mechanism to execute a callback function when a specific event occurs on a file descriptor, to scale to any number of open connections. On a modern Linux system memcached utilizes epoll, is completely non-blocking for network I/O, ensures memory never gets fragmented, and uses its own slab allocator and hash table to achieve 0(1) virtual memory allocation.
How it install it on Linux server ?
#curl -O http://monkey.org/~provos/libevent-1.4.9-stable.tar.gz
#tar -xzvf libevent-1.4.9-stable.tar.gz
#cd libevent*
#./configure
#make
#make installNow let’s download the newest Memcached source
#curl -O http://www.danga.com/memcached/dist/memcached-1.3.0.tar.gz
#tar zxf memcached-1.3.0.tar.gz
#cd memcached-1.3.0
#./configure
#make
#make install
Then add /usr/local/lib to LD_LIBRARY_PATH in your .bash_profile
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
How it Works
First, you start up the memcached daemon on as many spare machines as you have. The daemon has no configuration file, just a few command line options, only 3 or 4 of which you’ll likely use:
Run Memcached as a daemon (d = daemon, m = memory, u = user, l = IP to listen to, p = port)
#memcached -d -m 1024 -u root -l 127.0.0.1 -p 11211 –u nobodyThis starts memcached as a daemon (-d) on the IP address and port specified with -l and -p, respectively, running as the user nobody (-u), allocating 1024 for object storage (-m). You should adjust the amount of storage to suit your needs; many memcached installs run with 4 GB. Once you are comfortable with your startup options, add the appropriate command to your startup scripts.
Create a /etc/init.d/memcached file and add above line to start memcached when the server boots With memcached installed and running, it’s time to get PHP talking to the object cache. While multiple PHP API exists, the one in the PECL repository is recommended. If you are running a newer version of PHP, installation is as simple as:
# pecl install memcacheOr you can use following steps to install PECL memcache manually.
#cd /usr/local/src
#curl -O http://pecl.php.net/get/memcache
#tar zxvf memcache*
#cd memcache-*
#phpize
#./configure
#make && make install
Now we have to make sure PHP loads the newly built memcache.so library by adding the following line to php.ini:
extension=memcache.so
Now restart Apache:
Service httpd restartOnce it sucussfully install you can create phpinfo() on your webserver should now confirm that memcache is installed.
How to install memcache on linux server?
Posted by Unknown at 14:12 6 comments
memcached is a high-performance memory object caching system intended to speed up dynamic web applications by alleviating database load.
memcached is meant to work in concert with something like the MySQL query cache, not replace it. The two implementations excel at vastly different things: memcached is an object cache, while MySQL provides a query cache.
memcached is extremely fast. It uses libevent, which provides a mechanism to execute a callback function when a specific event occurs on a file descriptor, to scale to any number of open connections. On a modern Linux system memcached utilizes epoll, is completely non-blocking for network I/O, ensures memory never gets fragmented, and uses its own slab allocator and hash table to achieve 0(1) virtual memory allocation.
How it install it on Linux server ?
Install dependency software (Libevent)
How it Works
First, you start up the memcached daemon on as many spare machines as you have. The daemon has no configuration file, just a few command line options, only 3 or 4 of which you’ll likely use:
Run Memcached as a daemon (d = daemon, m = memory, u = user, l = IP to listen to, p = port)
This starts memcached as a daemon (-d) on the IP address and port specified with -l and -p, respectively, running as the user nobody (-u), allocating 1024 for object storage (-m). You should adjust the amount of storage to suit your needs; many memcached installs run with 4 GB. Once you are comfortable with your startup options, add the appropriate command to your startup scripts.
Create a /etc/init.d/memcached file and add above line to start memcached when the server boots
With memcached installed and running, it’s time to get PHP talking to the object cache. While multiple PHP API exists, the one in the PECL repository is recommended. If you are running a newer version of PHP, installation is as simple as:
Or you can use following steps to install PECL memcache manually.
Now we have to make sure PHP loads the newly built memcache.so library by adding the following line to php.ini:
extension=memcache.so
Now restart Apache:
Once it sucussfully install you can create phpinfo() on your webserver should now confirm that memcache is installed.

memcached is meant to work in concert with something like the MySQL query cache, not replace it. The two implementations excel at vastly different things: memcached is an object cache, while MySQL provides a query cache.
memcached is extremely fast. It uses libevent, which provides a mechanism to execute a callback function when a specific event occurs on a file descriptor, to scale to any number of open connections. On a modern Linux system memcached utilizes epoll, is completely non-blocking for network I/O, ensures memory never gets fragmented, and uses its own slab allocator and hash table to achieve 0(1) virtual memory allocation.
How it install it on Linux server ?
Install dependency software (Libevent)
#curl -O http://monkey.org/~provos/libevent-1.4.9-stable.tar.gz
#tar -xzvf libevent-1.4.9-stable.tar.gz
#cd libevent*
#./configure
#make
#make install
- Now let’s download the newest Memcached source
#curl -O http://www.danga.com/memcached/dist/memcached-1.3.0.tar.gz
#tar zxf memcached-1.3.0.tar.gz
#cd memcached-1.3.0
#./configure
#make
#make install
- Then add /usr/local/lib to LD_LIBRARY_PATH in your .bash_profile
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
How it Works
First, you start up the memcached daemon on as many spare machines as you have. The daemon has no configuration file, just a few command line options, only 3 or 4 of which you’ll likely use:
Run Memcached as a daemon (d = daemon, m = memory, u = user, l = IP to listen to, p = port)
#memcached -d -m 1024 -u root -l 127.0.0.1 -p 11211 –u nobody
This starts memcached as a daemon (-d) on the IP address and port specified with -l and -p, respectively, running as the user nobody (-u), allocating 1024 for object storage (-m). You should adjust the amount of storage to suit your needs; many memcached installs run with 4 GB. Once you are comfortable with your startup options, add the appropriate command to your startup scripts.
Create a /etc/init.d/memcached file and add above line to start memcached when the server boots
With memcached installed and running, it’s time to get PHP talking to the object cache. While multiple PHP API exists, the one in the PECL repository is recommended. If you are running a newer version of PHP, installation is as simple as:
# pecl install memcache
Or you can use following steps to install PECL memcache manually.
#cd /usr/local/src
#curl -O http://pecl.php.net/get/memcache
#tar zxvf memcache*
#cd memcache-*
#phpize
#./configure
#make && make install
Now we have to make sure PHP loads the newly built memcache.so library by adding the following line to php.ini:
extension=memcache.so
Now restart Apache:
Service httpd restart
Once it sucussfully install you can create phpinfo() on your webserver should now confirm that memcache is installed.
Subscribe to:
Posts (Atom)