July 29, 2006

Error when setting default mail address through Cpanel

by @ 5:20 pm. Filed under cPanel Hosting

Client receives following error when he tries to add default address through cpanel.

Fatal! Write Failure: /etc/valiases/domain.com . Ignore any messages of success this can only result in failure!

Client receives this error because domainname.com file is missing.

1)
Go to directory /etc/valiases
root@server1[/]# cd /etc/valiases
2)
Create the file domain.com
root@server1[/etc/valiases]# touch domainname.com

3)
change the ownership as per below.
root@server1[/etc/valiases]# chown username.mail domainname.com

It solves the problem.

« Previous entries Next entries »

I receives error under whm >> Account Functions >> View Bandwidth Usage.

by @ 5:12 pm. Filed under cPanel Hosting, Dedicated Server Hosting, Linux Hosting

When I check View Bandwidth Usage in WHM I got error though the domain below is there.

tvguide travelvacationguide.info (deleted) 0.00 Meg 0.00 Meg N/A N/A Meg 0% used

Ans :-

Client delete account travelvacationguide.info then recreate same account but domain not properly show under whm >> account information >> view bandwidth usage. Client receives this error because file with username is missing from directory /var/cpanel/users
1)
Go to directory /var/cpanel/bandwidth
root@server1[/]# cd /var/cpanel/bandwidth
2)
Create file with accounts username and domain name.
root@server1[/var/cpanel/bandwidth]# touch tvguide root@server1[/var/cpanel/bandwidth]# touch travelvacationguide.info
3)
Change group of the above both files to username.
root@server1[/var/cpanel/bandwidth]# chgrp tvguide tvguide
root@server1[/var/cpanel/bandwidth]# chgrp tvguide travelvacationguide.info

4)

root@server1[/]# /scripts/runweblogs tvguide

5)
Check account under whm >> Account Functions >> View Bandwidth Usage. It shows as per below

tvguide travelvacationguide.info 0.00 Meg 0.00Meg 9.77 Gig 1% used

In above case username = tvguide domain name = travelvacationguide.info
Please remember you have to replace username and domain name as per your requirement.

If domain name is missing from “whm >> Account Functions >> View Bandwidth Usage” use steps to solve the problem.

« Previous entries Next entries »

How to restore a database and take backup of database through shell?

by @ 1:53 pm. Filed under cPanel Hosting, MySQL Hosting Issues., Dedicated Server Hosting, Linux Hosting

Postgresql

Using following command you can take backup of postgresql database.

# pg_dump -u -C -f backupfile.sql database_name

You can restore pgsql database using following command

# pg_restore -v -C -O -d database_name backupfile.sql.tar

Mysql

Using following command you can take backup of mysql database.

# mysqldump database_name > backup.sql

You can restore mysql database using following command

# mysql database_name < backup.sql

« Previous entries Next entries »

July 28, 2006

Understanding SOA records

by @ 5:20 pm. Filed under Linux Hosting, Domain Name

To an Administrator, there is nothing more peaceful than a stable and optimized DNS server. The moment there is a wrong configuration, the server wakes up and starts crying, sites and email goes down. An important part of keeping DNS that way is properly setting up the SOA records.

What are DNS Records. DNS records or Zone files are used for mapping URLs to an IPs. Located on servers called the DNS servers, these records are typically the connection of your website with the outside world. Requests for your website are forwarded to your DNS servers and then get pointed to the WebServers that serve the website or to Email servers that handle the incoming email.

This is how a typical Zone file (containing many common DNS records) looks like.

; Zone file for micfo.com.

@       86400 IN SOA ns1.micfo.com.   root.manou.micfo.com. (

2006061904

86000

7200

3600000

86400 )

micfo.com. NS IN 86400 ns1.micfo.com.

micfo.com. NS IN 86400 ns2.micfo.com.

micfo.com. 14400 IN A 69.20.54.201

localhost. micfo.com. 14400 IN A 127.0.0.1

micfo.com. 14400 IN MX 0 micfo.com.

mail 14400 IN CNAME micfo.com.

www 14400 IN CNAME micfo.com.

ftp 14400 IN CNAME micfo.com.

SOA Records

An SOA(State of Authority) Record is the most essential part of a Zone file. The SOA record is a way for the Domain Administrator to give out simple information about the domain like, how often it is updated, when it was last updated, when to check back for more info, what is the admins email address and so on. A Zone file can contain only one SOA Record.

A properly optimized and updated SOA record can reduce bandwidth between nameservers, increase the speed of website access and ensure the site is alive even when the primary DNS server is down.

Here is the SOA record. Notice the starting bracket “(“. This has to be on the same line, otherwise the record gets broken.

; name TTL class rr Nameserver email-address

@ 86400 IN SOA ns1.micfo.com. root.linux5.nettoolz.net. (

2006061904 ; Serial number

86000 ; Refresh rate in seconds

7200 ; Update Retry in seconds

3600000 ; Expiry in seconds

86400 ; minimum in seconds )

• name - mydomain.com is the main name in this zone.

• TTL - 86400 - TTL defines the duration in seconds that the record may be cached by client side programs. If it is set as 0, it indicates that the record should not be cached. The range is defined to be between 0 to 2147483647 (close to 68 years !)

Class - IN - The class shows the type of record. IN equates to Internet. Other options are all historic. So as long as your DNS is on the Internet or Intranet, you must use IN.

Nameserver - ns.nameserver.com. -The nameserver is the server which holds the zone files. It can be either an external server in which case, the entire domain name must be specified followed by a dot. In case it is defined in this zone file, then it can be written as “ns'’ .

Email address – root.linux5.nettoolz.net. -This is the email of the domain name administrator. Now, this is really confusing, because people expect an @ to be in an email address. However in this case, email is sent to [EMAIL=”root@ns.nameserver.com”] root@ns.nameserver.com[/EMAIL], but written as root.ns.nameserver.com . And yes, remember to put the dot behind the domain name.

• Serial number - 2006061904 - This is a sort of a revision numbering system to show the changes made to the DNS Zone. This number has to increment, whenever any change is made to the Zone file. The standard convention is to use the date of update YYYYMMDDnn, where nn is a revision number in case more than one updates are done in a day. So if the first update done today would be 2006061904 and second update would be 2006061905.

Refresh - 86000 - This is time(in seconds) when the slave DNS server will refresh from the master. This value represents how often a secondary will poll the primary server to see if the serial number for the zone has increased (so it knows to request a new copy of the data for the zone). It can be written as “23h88M'’ indicating 23 hours and 88 minutes. If you have a regular Internet server, you can keep it between 6 to 24 hours.

Retry - 7200 - Now assume that a slave tried to contact the master server and failed to contact it because it was down. The Retry value (time in seconds) will tell it when to get back. This value is not very important and can be a fraction of the refresh value.

Expiry - 3600000 - This is the time (in seconds) that a slave server will keep a cached zone file as valid, if it can’t contact the primary server. If this value were set to say 2 weeks ( in seconds), what it means is that a slave would still be able to give out domain information from its cached zone file for 2 weeks, without anyone knowing the difference. The recommended value is between 2 to 4 weeks.

Minimum - 86400 - This is the default time(in seconds) that the slave servers should cache the Zone file. This is the most important time field in the SOA Record. If your DNS information keeps changing, keep it down to a day or less. Otherwise if your DNS record doesn’t change regularly, step it up between 1 to 5 days. The benefit of keeping this value high, is that your website speeds increase drastically as a result of reduced lookups. Caching servers around the globe would cache your records and this improves site performance.

Increasing site speed

The time it takes to access a website on a browser includes the time it takes to look it up on the domain name server. By increasing the “Minimum'’ value, we’re telling the contacting clients to keep their copies of the zone file for a longer time. In effect, reducing the lookups to the nameserver. By reducing the number of times a client has to lookup, we’re increasing the site speed.

However, this also means that if you make changes to the DNS record, it will take longer to propagate. If you require to make frequent updates to your DNS records, make sure your Minimum value is lesser than 1 day. That means longer lookup times, but accurate information for the clients

If you are planning a major update on the DNS zone file(say moving to another server or hosting service), reduce the Minimum value a couple of days prior to the change. Then make the change and then jack up the minimum value again. This way the caching clients all over the world will pick up the changes quicker and yet you do not need to sacrifice on site speed thereafter.

How to improve backup

Always keep a secondary DNS server and keep a higher Expiry value. This will mean that even if the Primary server goes down, the secondary will have the cached copy(for as long as the Expiry value stands) and it will keep serving lookups. Keeping a secondary server but a low expiry value defeats the purpose of a Backup.

How to test SOA records

You have set the new SOA values, and you want to know whether the update has taken place. “Dig'’ is a good tool to troubleshoot and check for DNS information.

For example to check out the SOA records of yahoo.com from all the nameservers, primary and secondary, all you need to do is

# dig google.com +nssearch

SOA ns1.micfo.com. root.manou.micfo.com. 2006072101 28800 7200 3600 86400 from server ns2.micfo.com in 1 ms.

SOA ns1.micfo.com. root.manou.micfo.com. 2006072101 28800 7200 3600 86400 from server ns1.micfo.com in 28 ms.

« Previous entries Next entries »

July 27, 2006

Mysql password reset..

by @ 9:38 pm. Filed under cPanel Hosting, MySQL Hosting Issues.

Greetings micfo members,

Its easy to reset the password of MySQL by going inside the MySQL prompt but what if the MySQL command doesn’t take inside mysql prompt?

Well in that case just fire following command and you will be able to reset the MySQL password.

first locate your MySQL ’s hostname.pid file then

kill `cat /mysql-data-directory/host_name.pid`
mysqld_safe –skip-grant-tables &
mysqladmin -u root flush-privileges password “newpassword”

New password will be the password that you want to set now.

Enjoy …

« Previous entries Next entries »

July 26, 2006

Warning: MySQL Connection Failed

by @ 9:22 pm. Filed under Linux Hosting

Warning: MySQL Connection Failed: Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)

—————————————————————————————–

Login to server shell with root user.

1. shutdown mysql

2. cd to /tmp

and type Code:

ln -s /var/lib/mysql/mysql.sock mysql.sock

3. restart mysql

« Previous entries Next entries »

July 25, 2006

Stop phpbb worms with mod_security

by @ 10:04 pm. Filed under cPanel Hosting, MySQL Hosting Issues., Server Security, Linux Hosting

Greetings Micfo members,

If you want to make your accounts secure from the injection that

is usually been done by some of the hackers by writing some code

in your phpbb forum or some of your script then just add the following rule in your .htaccess file. That will stop php injection.

#spam bots SetEnvIfNoCase User-Agent “^EmailSiphon” bad_bot SetEnvIfNoCase User-Agent “^EmailWolf” bad_bot SetEnvIfNoCase User-Agent “^ExtractorPro” bad_bot SetEnvIfNoCase User-Agent “^CherryPicker” bad_bot SetEnvIfNoCase User-Agent “^NICErsPRO” bad_bot SetEnvIfNoCase User-Agent “^Teleport” bad_bot SetEnvIfNoCase User-Agent “^EmailCollector” bad_bot #plagarism bot SetEnvIfNoCase User-Agent “^TurnitinBot” bad_bot #IP bot SetEnvIfNoCase User-Agent “^NPBot” bad_bot #Worm sign SetEnvIfNoCase User-Agent “^LWP::Simple” bad_bot SetEnvIfNoCase User-Agent “^lwp-trivial” bad_bot SetEnvIfNoCase User-Agent “^lwp” bad_bot SetEnvIfNoCase User-Agent “^LWP” bad_bot #Worm sign Order Allow,Deny Allow from all Deny from env=bad_bot

Enjoy..

« Previous entries Next entries »

PEAR::SOAP installation.

by @ 6:19 pm. Filed under cPanel Hosting, Linux Hosting

# pear install SOAP
No release with state equal to: ’stable’ found for ‘SOAP’

# pear install -f SOAP
Warning: SOAP is state ‘beta’ which is less stable than state ’stable’
downloading SOAP-0.9.4.tgz …
Starting to download SOAP-0.9.4.tgz (70,574 bytes)
……………..done: 70,574 bytes
requires package `HTTP_Request’
SOAP: Dependencies failed

# pear install HTTP_Request
downloading HTTP_Request-1.3.0.tgz …
Starting to download HTTP_Request-1.3.0.tgz (13,808 bytes)
…..done: 13,808 bytes
requires package `Net_URL’ >= 1.0.12
requires package `Net_Socket’ >= 1.0.2
HTTP_Request: Dependencies failed

# pear install Net_URL
downloading Net_URL-1.0.14.tgz …
Starting to download Net_URL-1.0.14.tgz (5,173 bytes)
…..done: 5,173 bytes
install ok: Net_URL 1.0.14

# pear install Net_Socket
downloading Net_Socket-1.0.6.tgz …
Starting to download Net_Socket-1.0.6.tgz (4,623 bytes)
…..done: 4,623 bytes
install ok: Net_Socket 1.0.6

# pear install HTTP_Request
downloading HTTP_Request-1.3.0.tgz …
Starting to download HTTP_Request-1.3.0.tgz (13,808 bytes)
…..done: 13,808 bytes
install ok: HTTP_Request 1.3.0

# pear install SOAP
No release with state equal to: ’stable’ found for ‘SOAP’
# pear install -f SOAP
Warning: SOAP is state ‘beta’ which is less stable than state ’stable’
downloading SOAP-0.9.4.tgz …
Starting to download SOAP-0.9.4.tgz (70,574 bytes)
……………..done: 70,574 bytes
Optional dependencies:
package `Mail’ is recommended to utilize some features.
package `Mail_Mime’ is recommended to utilize some features.
package `Net_DIME’ is recommended to utilize some features.
install ok: SOAP 0.9.4

# pear list

-
-
-
SOAP                 0.9.4   beta
-
-
-

« Previous entries Next entries »

RESELLER HOSTING | DEDICATED SERVER | PREMIUM HOSTING | VPS HOSTING

Micfo Hosting

Micfo International LLC Leading the hosting Industry with Cheap and Affordable Linux Web Hosting Packages.

internal links:

categories:

archives:

Services:

Micfo Hosting

Micfo, delivering the best cpanel web hosting with maximum reliability is our exclusive focus.
Micfo International LLC

search blog:

TOP 10 POSTS:

Pages:

General Links:

Syndicate

other:

38 queries. 0.135 seconds