Archive for October, 2009

Database Backup via cPanel

October 27th, 2009

The database backup through cPanel is an easy process, the backup wizard that comes with cPanel allow you to take database backup or restore a backup through your hosting account with an ease. the backup wizard generates one zip file that you only just have to download. The backup wizard give you easy options from where you can select what parts of your hosting account you want to backup and download.

Either you can backup your entire ‘home’ directory, MySQL databases, or the email filters and forwarders configuration. Here below is an easy process which will help you to take the backup by generating a full backup and download that backup to your home PC.

* To access the Backup Menu, click on the icon above the word Backup on the main screen of your cPanel interface.

* Click on Generate/Download a Full Backup

* Select the destination you wish to save the backup to from the drop box next to Backup Destination:

* Enter your email address in the field next to Email Address:. An email will be sent to this address when the backup is
completed.

* If you are backing up to a remote server, place the server’s name, your username, and your password on that server in the appropriate fields.

* Click on Generate Backup to start the backup process.

Now you want to download tha backup to your home computer.

1. Click on download a home directory Backup
2. Save the file to your computer.
Its just simple.

Now, you can also download a database backup.

GD Star Rating
loading...

Posted in cPanel Hosting | Comments (6,159)

Linux Security tweak

October 15th, 2009

These linux security doc will help you to tweak on the linux server for the security stuff.

1. Exim.
Enable extended logging :
Add the following line in exim, below the first line recommended
log_selector = +address_rewrite +all_parents +arguments
+connection_reject +delay_delivery +delivery_size +dnslist_defer
+incoming_interface +incoming_port +lost_incoming_connection +queue_run
+received_sender +received_recipients +retry_defer +sender_on_delivery
+size_reject +skip_delivery +smtp_confirmation +smtp_connection
+smtp_protocol_error +smtp_syntax_error +subject +tls_cipher +tls_peerdn
+\

Fommail Trap

http://void.thunderteam.org/fm-trap.html

For Securing Exim i found this a Good resource

http://www.rvskin.com/index.php?page=public/antispam

2. Httpd :

install mod_security
install mod_dosevasive (causes problem with FP sometimes though)

3. PHP

disable_functions = “system,exec”

eAccelerator for PHP acceleration

http://sourceforge.net/projects/eaccelerator

4. Some small recommended apps

Install BFD from rfxnetworks.net
Install LSM from rfxnetworks.net
APF from rfxnetworks.net ( since we have portsentry not really required )
rkhunter can be found on www.rootkit.nl

5. cpanel script to disable compilers incase we have not done this yet
/scripts/compilers off

6. MYSQL

mysql query cache
vi /etc/my.cnf
query-cache-type = 1
query-cache-size = 100M
100M can be changed according to how busy the server is

7. Securing some binaries

chmod 750 /usr/bin/rcp
chmod 750 /usr/bin/wget
chmod 750 /usr/bin/lynx
chmod 750 /usr/bin/links
chmod 750 /usr/bin/scp
chmod 000 /etc/httpd/proxy/

I hope you might have found this Misc security tweaks helpful.

GD Star Rating
loading...

Posted in Linux hosting | Comments (10,243)

How to run Several MySQL versions on same Machine

October 8th, 2009

If you want to test a MYSQL release or you may require a new version although you won’t want to make any changes in the existing system, you can easily run multiple versions of MySQL on the same Server. It let you compile the new MySQL server with different TCP/IP ports and Unix socket files and that can provide you independent MySQL installations for different customers..

Follow these process to run Several MySQL versions on same Machine ;

First you need to download the tar file from mysql.com.

$> tar xfz mysql.tar.gz
$> cd mysql.XX

* Important **
“/etc/my.cnf ” is the default file that is used by a mysql server. When the new version is tested it will load the default configuration’s in /etc/my.cnf.

Now you can replace every instance of ” cnf ” inside the source folder to ” conf ” by using this following command.

find ./ -type f | xargs perl -pi -w -e ‘s/cnf/conf/g;’

1) The default user generally is “mysql”. Add another user and group for example mysqlt for the new version of MySQL.

2) A typical ./configure command…

./configure –prefix=/usr/local/mysql –enable-local-infile
–with-tcp-port=4444 –with-mysqld-user=mysqlt
–with-base_dir=/usr/local/mysql –with-log=/usr/local/mysql/mysqld.log
–with-pid_file=/usr/local/mysql/mysqld.pid
-with-unix-socket-path=/tmp/mysqlt.sock –localstatedir=/var/lib/mysqlt

mysql

The new values you will use for your new MySQL server are:

Port number : 4444

mysql user : mysqlt

base_dir : /usr/local/mysql

data directory : /var/lib/mysqlt

log file : /usr/local/mysql/mysqld.log

3) Compile and Install

make && make install

4)Create your new MySQL config file.

cp support-files/my-medium.conf /etc/my.conf

cd /usr/local/mysql

bin/mysql_install_db –user=mysqlt
( this will install all the needed databases )
bin/mysqld_safe –user=mysqlt &

TO SET A PASSWORD FOR THE MySQL root USER

/usr/local/mysql/bin/mysqladmin -u root -h hostname password ‘new-password’

/usr/local/mysql/bin/mysqladmin -u root password ‘new-password’

5) To start the service

cd /usr/local/mysql

./share/mysql/mysql.server start

6) To test

#telnet localhost 4444

and you should see this
Trying 127.0.0.1…

Connected to localhost.

Escape character is ‘^]’.

+ 4.0.26-logIE^*THL

Now you can copy mysql.server >> rc.d to start it when the server is rebooted.

once you go through those steps you can download and configure different mysql versions to use different values for port, data directory, mysql user, configuration file etc.

Important Note: You should make sure that you never have two servers that update data in the same databases.

GD Star Rating
loading...

Posted in MYSQL Server | Comments (7,842)