Archive for November, 2009

Seems like there are a lot of request for a HOW-To for Nameserver setup. This walk through will show you how to do this.

Special Notes:
Some version of WHM/CPanel come with broken NDC. To fix this:

SSH into your box as root.

(a) Type: cd /scripts
(b) Type: ./updatenow
(c) Type: ./fixndc
(d) Type: service named stop
(e) Type: service named start

********************************************

1. Setup Nameservers In WHM
Go into WHM (Web Host Manager) and select Edit Setup from the Server Setup menu on the left. Enter ns1.newdomain.com in the Primary Nameserver field. Hit ‘Assign IP Address’ (write the IP down or remember it for the next step). Then hit ‘Add an A Entry for this nameserver’.

Repeat this process for the Secondary Nameserver field.

2. Register Nameservers
Go to your domain registrar and register ns1.yourdomain.com (111.111.111.111) and ns2.yourdomain.com (222.222.222.222) as nameservers. 111.111.111.111 being the primary nameserver IP from step 1 and 222.222.222.222 being the secondary.

These registrations may take a few days to propagate (often as many as 3 days).

3. Reverse DNS
You may need Burstnet to enter a reverse DNS pointer (PTR Record) for your nameservers. You’ll need to let them know each nameserver and its IP address. Sometimes you can suffer non-delivery of mail if you don’t so this. Reverse DNS pointers can take a while to propagate. Send an email to [email protected] with the following…

To: [email protected]
From: <Your Address>
Subject: PTR Request

Please create the following PTR records.
123.123.123.123 – server.mydomain.com (Main Server IP)
111.111.111.111 – ns1.mydomain.com (This of course being your info)
222.222.222.222 – ns2.mydomain.com

4. Tidy Up Junk Nameservers
Go into WHM (Web Host Manager) and select Manage Nameserver IPs from the Server Setup menu on the left. Remove any nameservers you don’t recognise. This is just a tidy up exercise in case anyone’s set anything up on the box before you.

5. Initial Nameserver Setup
Go into WHM (Web Host Manager) and select Initial NameServer Setup from the Server Setup menu on the left.

6. Restart BIND
Restart BIND from SSH with (step 5 restarts BIND, but sometimes needs a proper stop and start for it to work):

service named stop
service named start

7. Manual Checks
This process doesn’t always work, so there are some things you can check manually via SSH.

pico or nano or vi /etc/wwwacct.conf
Check that the nameservers are correctly specified on NS1, NS2 etc.

pico or nano or vi /etc/resolv.conf
Check that there are nameserver entries for each IP. There may also be one for 127.0.0.1 – this is okay.

Should read as follows:

domain maindomain.com
search maindomain.com
nameserver 127.0.0.1
nameserver 111.111.111.111
nameserver 222.222.222.222

Where ‘maindomain.com’ is the main domain of my server, and ’111.111.111.111′ and ’222.222.222.222′ are the IP addresses of my primary and secondary nameservers.

pico or nano or vi or nano or vi /etc/nameserverips
Check that there are entries for each IP acting as a nameserver.

Tags: ,

Comments No Comments »

1. To install ImageMagick you will need to log in to your server or webspace with SSH.
From the command line first download and unzip the source:
wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz

img1

2. Next type, tar -xzvf ImageMagick.tar.gz

img2

3. Next type, cd ImageMagick-6.2.6

img3

4. The following commands will install ImageMagick into your home directory.
–without-Perl and –without-ttf will disable Perl and TrueType support; without
these switches the install will fail. /path/to/your/htdocs/im should be replaced
with the actual path to your home directory, and the last part, IM, can be changed
to anything. The command “pwd” will tell you the present working directory.

./configure –prefix=/path/to/your/htdocs/im –without-perl –without-ttf

img4

5. Next type, make

img51

6. Next type, make install

img6

When these steps are completed ImageMagick will be installed in your home directory.
Please note that since this is a non-standard location, you may have to modify the configuration of other programs that use it so that they can find it. Any executables will also not be on the default executable search path.

Tags: ,

Comments 1 Comment »

IIS v7 is included with Windows Server 2008 and Windows Vista. These are the steps required to install IIRF on either of those operating systems.
Installing on IIS7 – Vista or Windows Server 2008

To configure IIRF on IIS7, follow these steps:

1. open the IIS Manager. On Windows Vista, do this through Start…Control Panel…Administrative Tools.

Administrative tools in Windows Vista / Windows 2008

figure2

Selecting IIS Manger

figure1

IIS Manager in Action

figure3

2.  If you would like to configure IIRF to be a “global filter” (applies to all websites and virtual directories), then, select the machine or server name on the left-hand side tree. This should be the top-most (root) node in the tree.

Install Ionic Rewrite Filfer for your server

figure4

If you would like to configure IIRF for an individual web site, expand the server node, and select the appropriate web site on the left-hand side tree. tree.

Installing IIRF for a particular web site

figure51

3. In either case, in the center-right panel of the MMC window you should now see a set of icons. One of them is labeled “ISAPI Filters”. Double click it. Your window should look similar to the following:

figure6

4. On the far right hand side in the “Action Pane” for the MMC window, click the top-most item, which reads “Add…”.

5. You get a simple dialog with a box for filter name and a box for the path to the Filter DLL. Type in “IIRF” for the filter name, and the full path for the DLL, eg, c:\windows\system32\inetsrv\IIRF\IsapiRewrite4.dll .

Adding an ISAPI Filter

figure7

Note:  Be sure to allow the appropriate user read + execute access to this path.

Click OK.

6. Copy your ini file into the same directory.

      The filter is now installed.
7. On Windows Server 2008, insure that the IIRF DLL is allowed to run: In the left hand side of IIS Manager, click Web Service Extensions. On the right hand side, right click the IIRF extension, and click Allow.

figure8

 8. Note: If your OS is 64-bit, you must select “Enable 32-Bit Application” in the Advanced Settings on the App Pool, in order to let IIRF run.

*All information taken from the original site – http://cheeso.members.winisp.net/IirfHelp/frames.htm *

Donate if you can as well. This is a great tool!

Tags: ,

Comments No Comments »

I’ve found that in my journies, the easist way to reset a mysql password, assuming you have SSH / Shell access is to log into the server and change it. To do this, you need to do the following;

1. Login to the server via SSH.

2. Once logged in, you’ll need to modify the my.cnf file to force your mysql to skip the grant tables. This will allow you to reset mysql so you can gain access without providing the password. One of the benefits of SSH access.

The my.cnf file will look like this;

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
#skip-grant-tables  <— This is the line we add. Remove the # to enable it. Once done remove that or place the # back into place.
[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

3. Now that you added this, reset mysql.

4. Once mysql is restarted, you can gain access to it directly by typing ;

$ mysql -u root

It may ask for a password, but you can ignore it.

5. Now that you are logged in, will need to access the mysql database;

use mysql;

6. Lastly, we need to change the password by running the following;

UPDATE user SET password=PASSWORD(‘newpassword’) WHERE user=’root’;

7. Now you can remove the line in the my.cnf that we added in step 2. Once you remove it, save the configuration and restart mysql.

That’s it. The password has been changed!

Tags: , ,

Comments No Comments »

This tutorial explains a simple, straightforward method for migrating cPanel accounts from one server to another. You can use this method to transfer accounts from an old server to a new one, help customers from another host move to your host, etc. This does not even require root access on one end of the migration. Basically, this is a more reliable method than the “Transfer Account from another Server” tool in WHM, which rarely works.

Requirements:
- cPanel on both servers
- WHM access on the new server (one that the accounts are being moved to)
- root access on the new server

Definitions
The server you are transferring the accounts from = “old server”
The server you are transferring the accounts to = “new server”

Instructions
1. Log into WHM of your new server and create a new account called “restore”, or anything you like for that matter. Remember the FTP address, username (‘restore’, in this example), and account password. We will need these for later.

2. Log into the cPanel account you are wanting to transfer on the old server.

3. Click on “Backup >> Generate/Download a Full Backup”.

4. Once here, select the backup destination to be “Remote FTP Server”.

5. Enter your email address for verification, followed by all of the FTP account information for “restore”, which we created on the new server.

-Remote Server: new server’s address
-Remote User: restore
-Remote Password: restore’s password
-Port: 21

Then, click “Generate Backup”. This may take some time to backup the files, depending on how large the account is. You should receive an email provided in the above info once it is complete.

6. Now, log into SSH on your new server.

7. Type in the following commands:

cd /home/restore/public_html

ls

After running the list command above (ls), you should see the tar file of the account on the old server. This means that you have successfully sent the file via FTP to your new server.

8. Now move the tar file to your new server’s /home directory with the following command:

mv tar_file_name /home

9. Now, log into WHM on your new server and navigate to “Backup >> Restore a Full Backup/cpmove file”

Once here, you should see the old account’s username under “Possible cpmove archives found:”.
If you do not, log back into SSH and be sure that the account’s tar file has been moved into /home.

10. Type in the account name in the text field in WHM, which is proceeded by “Enter the username for the account you wish to restore:”.

11. Click “Restore”.

12. Repeat process for additional accounts.

Tags: , ,

Comments No Comments »