Linux how to correct the InnoDB to load If it is failing to start.

May 25th, 2010 by keith No comments »

The InnoDB requires access to specific files, that if are corrupted, will cause the InnoDB engine to fail to load. You will know if the InnoDB fails to load if you acess MySQL and run the following command;

show engine innodb status;

The output will be the following;
ERROR 1235 (42000): Cannot call SHOW INNODB STATUS because skip-innodb is defined

However the fix is to locate the following files in /var/lib/mysql/. Be sure to stop MySQL first before changing the files;

ib_logfile0

ib_logfile1

You can remove both the files by running the following commands. Again, be sure to stop MySQL first;

mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bak

mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bak

(Your MySQL pathing may vary, we are using the default MySQL install paths in this article).

After removing these files, start up MySQL;

Service mysql start or Service mysqld start.

Once the MySQL instance is started, the InnoDB will also be started as well.

Adding mime types to a Linux server

May 25th, 2010 by keith No comments »

There are two ways to add a mime type to a Linux server. You can either add the mime type to the server mime type listing or you can specify a mime type via an .htaccess file in a individual hosting account. This article will explain how to do both.

Method 1.

  1. Log into the Linux server via SSH.
  2. Open the “/etc/mime.types” file using a text editor.
  3. Add the new mime type into the end of the “/etc/mime.types” file and save it.
  4. Restart Apache by typing either of the following commands;

“service httpd restart”

“/etc/init.d/httpd restart”

Method 2.

  1. Loging the Linux server via SSH.
  2. Navigate to the account that you wish to add the mime type. You will need to be in the web accessible portion of the account.
  3. Either create or modify the existing “.htaccess” file and add the mime type entry and save the file.
  4. Restart Apache by typing either of the following commands;

“service httpd restart”

“/etc/init.d/httpd restart”

Setup linux server to alert you on login

April 29th, 2010 by keith No comments »

To improve the security of a Linux server, especially a web server, which is exposed to the Internet and possible worldwide hackers, it’s best to enable the server to automatically send a notification email to predefined email address anytime someone logs in as root to the host. To configure the automatic email alert notification to a default email address on each incident of root log on on the server, use the following guide.

1. Login to the server via SSH using as root ID.
2. Ensure that you’re at home directory of root. Then open up the .bash_profile for editing using pico or vi by typing one of the following commands at command shell line:

Using Pico# pico .bash_profile
Using Nano# nano .bash_profile
Using Vi# vi .bash_profile

3. Scroll down to the end of the file and add the following line:

“echo ‘ALERT – echo ‘ALERT – Root Shell Access (YourserverName) :’ `date` `who` | mail -s “Alert: Root Access from `who | cut -d”(” -f2 | cut -d”)” -f1`” user@example.com” (Without the quotes)

4. Replace user@email.com with the actual email account address that you want to the root access alert notification been sent to. Note that you can change the text contains in the email alert too. You will want to change the (YourserverName) to your actual server name or hostname.

Now logout and login again as root, you should receive an email alert at your inbox. This works on most popular flavor of Linux such as RedHat, CentOS, Ubuntu, FreeBSD , etc.

How to Disable UAC for windows 2008 Dedicated Servers

April 12th, 2010 by keith No comments »

Disable UAC for windows 2008 Dedicated Servers

User access control was developed for windows vista and has been incorporated into windows server 2008 as well. User Account Control (UAC) is a new security component in Windows Vista. UAC enables users to perform common tasks as non-administrators, called standard users in Windows Vista, and as administrators without having to switch users, log off, or use Run As. A standard user account is synonymous with a user account in Windows XP. User accounts that are members of the local Administrators group will run most applications as a standard user. By separating user and administrator functions while enabling productivity, UAC is an important enhancement for Windows Vista.

We generally recommend turning this function off as it is seems to be more of a pain than it is worth. It does provide greater security for your server, however, so it is up to you whether you wish to disable it or not.

1. Open the Control Panel.

2. Click User Accounts.

3. Click Turn User Account Control on or off.(If you receive a User Account Control message click Continue.)

4. Clear the “Use User Account Control (UAC) to help protect your computer” check box, and then click OK.

5. Click Restart Now to apply the change right away, or click Restart Later and close the User Accounts tasks window.

How to change your FTP port in Cpanel

April 10th, 2010 by keith No comments »

While Cpanel comes with 2 different FTP programs; PureFTP and Proftp, there isn’t any way in Cpanel to change the default FTP ports. This leaves the server open to a possible brute force attack at the default port of 21. However by changing just one line in your FTP server configuration files, you can change up the FTP port and securing your server.

To do so, you must be logged into your server via SSH/Shell and you must use a text editior such as Nano, Pico, Vi / Vim.

Changing the port for Pure-FTP

1) Edit /etc/pure-ftpd.conf and look for the following line:

#Bind 127.0.0.1,21

The default example, 127.0.0.1, will cause the socket to bind locally but then this connection won’t serve externally. You’ll need to uncomment the line and change that to 0.0.0.0 so all IP’s will listen on that range and change the port of 40 to your desired ftp port.

2) If needed, add the new FTP port to your server’s firewall

3) Edit /etc/chkserv.d/ftpd and change the port, which is the first comma-separated entry to the right of ‘=’ on the line in the file, to match the port you put the service on.

Finally:

/etc/init.d/pure-ftpd restart
/etc/init.d/cpanel restart (restarts tailwatchd/chkservd)

Changing the port for ProFTP

Edit /etc/proftpd.conf and change:

Port 21