Friday, March 9, 2012

Configure Xinetd

SkyHi @ Friday, March 09, 2012

Step 3:  Configure Xinetd

Since the POP3 server runs from xinetd, you will need to make some configuration changes and then restart/start xinetd. First, we will need to edit the pop3sconfiguration file:
[root@zip root]# cd /etc/xinetd.d
[root@zip xinetd.d]# ls -l *pop3*
-rw-r--r--    1 root     root          359 Jan 25  2003 ipop3
-rw-r--r--    1 root     root          335 Jan 25  2003 pop3s

[root@zip xinetd.d]# vi pop3s
Edit the /etc/xinetd.d/pop3s config file until it looks like this:
# default: off
# description: The POP3S service allows remote users to access their mail \
#              using an POP3 client with SSL support such as fetchmail.
service pop3s
{
        socket_type             = stream
        wait                    = no
        user                    = root
        server                  = /usr/sbin/ipop3d
        log_on_success  += HOST DURATION
        log_on_failure  += HOST
        instances               = 150
        cps                     = 70 30
        disable                 = no
}
The extra settings for "instances" and "cps" are performance limits. I raised them from the defaults, but these can be tweaked as you see fit. See man xinetd.conf for details. Defaults are located in the /etc/xinetd.conf config file.
Now start (or restart) xinetd:
[root@zip xinetd.d]# /etc/init.d/xinetd restart
Stopping xinetd:                                           [FAILED]
Starting xinetd:                                           [  OK  ]



REFERENCES

Thursday, March 8, 2012

Table mysql.servers doesn’t exist: Problem adding a database user in plesk Or restarting mysql

SkyHi @ Thursday, March 08, 2012
Update: If “mysql_fix_privilege_tables” command does not exist, look at Section 2.
You may receive a “Table ‘mysql.servers’ doesn’t exist” error message while adding a database user in Plesk OR while restarting the Mysql service. The complete error message look like:
Error: Connection to the database server has failed: 
Table 'mysql.servers' doesn't exist
OR
Can't open and lock privilege tables: 
Table 'mysql.servers' doesn't exist
The problem mostly occurs when Mysql is upgraded which introduce newer version of tables and the default Mysql database is not aware of these changes. The “mysql_fix_privilege_tables” command is use to update the Mysql database with the latest contents of the newer version and to fix the privileges of the database users as well.
Section 1:
To fix the issue, SSH to your server and execute:
On a plain Linux OR Linux/cPanel server:
# mysql_fix_privilege_tables --user=root\
 --password=mysqlpasswordhere --verbose
On a Linux/Plesk server:
# mysql_fix_privilege_tables --user=admin\
 --password=`cat /etc/psa/.psa.shadow` --verbose
where, –verbose will display the detailed output.
Section 2:
mysql_upgrade command have superseded mysql_fix_privilege_tables. mysql_fix_privilege_tables is an older script that previously was used to upgrade the system tables in the Mysql database .
To fix the issue, you need to replace mysql_fix_privilege_tables with mysql_upgradein the above stated commands, i.e.
On a plain Linux OR Linux/cPanel server:
# mysql_upgrade --user=root --password=mysqlpasswordhere --verbose
On a Linux/Plesk server:
# mysql_upgrade --user=admin\
  --password=`cat /etc/psa/.psa.shadow` --verbose




REFERENCES
http://linuxhostingsupport.net/blog/problem-adding-a-database-user-in-plesk-or-restarting-mysql-table-mysql-servers-doesnt-exist
http://myeasylinux.wordpress.com/2010/07/20/table-mysql-servers/
http://stackoverflow.com/questions/3653021/error-table-mysql-servers-doesnt-exist

Wednesday, March 7, 2012

Kernel panics

SkyHi @ Wednesday, March 07, 2012
start_kernel+0x379/0x380


Kernel panics are almost always hardware related:

- Flaky hardware (especially RAM)
- Motherboard/RAM mismatch (i.e. the wrong kind of RAM is installed)
- Overheating
- Immature driver support

Tuesday, March 6, 2012

SUBLIME TEXT 2 UBUNTU PPA

SkyHi @ Tuesday, March 06, 2012
Sublime Text 2 is a pretty neat text editor which will remind you of TextMate. It runs on Linux, Windows and Mac OSX and while it's not free, you can evaluate it for an unlimited period of time. Check out our Sublime Text 2 review for more info.

Sublime Text 2 is currently in alpha and there are new builds available for download quote often so I wanted to create an Ubuntu PPA for a while now but I couldn't find out what license it uses. I've emailed the Sublime Text 2 developer and got no reply so I decided to package it like Adobe Flash: the .deb will download Sublime Text 2 from its website so the .deb doesn't come with the actual files.

While Sublime Text 2 automatically checks for updates and prompts you to download the latest version, I like getting the updates through a PPA. Further more, using this PPA, Sublime Text 2 will get a proper .desktop file so you can right click files to open in Sublime Text 2 as well as showing up properly in the Unity launcher. You can also open files from the command line (run "sublime-text-2 /path/to/file" or "subl /path/to/file").


This is the first version of the Sublime Text 2 packaging so there might be bugs. The deb doesn't check if the download was successful; also, it will probably fail to install behind a proxy. Use it at your own risk!


Add the PPA and install Sublime Text 2 in Ubuntu


Before installing, please note that initially, Sublime Text 2 used "~/.Sublime Text 2" for the configuration files while the latest versions use "~/.config/sublime-text-2". Because of a bug with having 2 configuration folders, the deb will remove "~/.Sublime Text 2" so if you have some configuration files you want to keep in there, move them to "~/.config/sublime-text-2".

Add our Sublime Text 2 PPA and install it in Ubuntu using the following commands:
sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text-2
I've set up the PPA for personal use but of course, anyone can use it. If you find any bugs, please report them in the comments below.

For what's new in the latest Sublime Text 2 builds, check out its homepage.
Sublime Text 2 Linux

Sublime Text 2 is a TextMate-like text editor currently in alpha which is now available for Linux too (as well as Windows and Mac OSX). The application is not free but its evaluation period does not expire.


Sublime Text 2 comes with a very interesting interface: a sidebar for projects or files and Chrome-style tabs as well as multi-pane editing which includes horizontal, vertical and even a quad pane mode:


Sublime Text 2 double pane


A very interesting feature is "Goto Anything": press Ctrl+P and type something - this will search in both filenames and lines of code across currently open files as well as recently close files. Start your search by using "#" to go to that word line, "@" for symbol or ":" for line:

Sublime Text 2 goto anything


The user interface also comes with a cool minimap which shows you an an overview of your files:

Sublime Text 2 minimap


Other features include macros, various find tools (find in files, find in open files, incremental find), easily switch between project, multiple selection, autocomplete and lots more. And of course, everything is customizable.


Since Sublime Text 2 is currently in alpha, some features are missing. These include distraction free editing, spell checker, bookmarks, a full python API and more - but all these will be coming in the next months.


Download Sublime Text 2 alpha for Linux, Windows and Mac OSX | To run it on Linux, simply extract the downloaded archive and double click the "sublime_text" file.

Update: Sublime Text 2 is now available in a PPA for Ubuntu!


REFERENCES
http://www.webupd8.org/2011/03/sublime-text-2-ubuntu-ppa.html
http://www.webupd8.org/2011/01/sublime-text-2-is-nice-textmade.html
http://www.mylinuxrig.com/post/18755288267/the-linux-setup-noah-lorang-37signals

Monday, March 5, 2012

In Mac OS X, how do I get the Mail application to remove messages I delete?

SkyHi @ Monday, March 05, 2012
Warning: When mail is deleted from Mac OS X Mail, the messages go to the Trash folder as usual. However, messages deleted from that folder do not go to the Exchange retention area, and they are not recoverable. Additionally, mail that is hard-deleted viaOption-Delete skips the Trash folder and also does not go into the retention area.
For IMAP accounts, Mac OS X Mail has two methods of handling deleted messages: moving them to a designated deleted items folder or marking and hiding them in the message index.

Moving deleted messages to a folder

Note: For accounts accessed in Exchange mode, this is the only option.
To configure OS X Mail to move deleted messages to a folder:
  1. From the Mail menu, select Preferences... .
  2. In the preferences window, click Accounts.
  3. Click the name of the account for which you want to set a deleted messages folder.
  4. Click the Mailbox Behaviors tab, and in the "Trash" section, make sure that Move deleted messages to the Trash mailbox and Store deleted messages on the server are checked.
  5. In the pop-up menu underneath "Permanently erase deleted messages when:", select how often Mail will empty your deleted mail folder.
  6. Close the preferences window and click Save if prompted.
  7. Back in the mail viewer window, look for your list of folders. If you don't see it, from the View menu, select View Mailbox List or View Mailboxes. Click the folder you want to use as a deleted messages folder. From the Mailbox menu, select Use This Mailbox For or Use Selected Mailbox For and then choose Trash.
If you want to manually empty your deleted mail folder, from the Mailbox menu, select Erase Deleted Items or Erase Deleted Messages.

Hiding deleted messages within the same mailbox

To configure OS X Mail to hide deleted messages within the same mailbox:
  1. From the Mail menu, select Preferences... .
  2. In the Mail preferences window, click Accounts.
  3. Select the account you wish to modify.
  4. Click the Mailbox Behaviors tab and uncheck Move deleted messages to the Trash mailbox.
Once you have made these changes, when you delete a message, Mail assigns a flag that removes it from the message index. It's still there, just not visible. To show all the messages you have deleted since you last compacted your mailbox, press Command-l(the letter l). To hide the deleted messages again, press Command-l .

Removing deleted messages

To completely remove those messages you have deleted, from the Mailbox menu, select Erase Deleted Items or Erase Deleted Messages. You can configure Mail to automatically compact your IMAP mailboxes when you exit the program by making the following configuration change:
  1. From the Mail menu, select Preferences... .
  2. In the Mail preferences window, select Accounts.
  3. Select the account you want to modify.Note: If you have multiple accounts, you will need to make these changes for each one.
  4. Click the Advanced tab, and check Compact mailboxes automatically.
  5. Close the Mail preferences window, and when prompted, click Save.
REFERENCES

Removing an email account in Mail (Mac OS X v10.5 or later)

SkyHi @ Monday, March 05, 2012
You may want to remove an email account from Mail, for example if you no longer use the account.
Important: Removing an account will permanently delete its mailboxes, messages, notes, and to do items. If you want to keep those, be sure to copy them to an On My Mac mailbox before deleting the account.
Exchange, IMAP, and MobileMe accounts store their mailboxes and messages on the server; deleting these account types in Mail will not permanently delete messages from the server. However, if you are not completely certain that your account is one of those types, be sure to copy the mailboxes and messages you want to keep into an On My Mac mailbox, or save individual messages manually by selecting them and choosing Save As from the File menu.
To remove an email account in Mail:
1) Open Mail (click it on the Dock or open it from the Applications folder).
2) From the Mail menu, choose Preferences..., or press Command-, (the Command and comma keys).

Screen shot 2010-05-07 at 5.01.42 AM.png
3) Click the "Accounts" icon.
4) Select the account you wish to remove.
Screen shot 2010-05-07 at 5.03.30 AM.png
5) Click the "-" (minus) icon. You will be alerted that "The account's setup information, mailboxes, messages, notes, and to do's will be deleted permanently from your computer."
6) If you are sure you want to remove the account and email messages from your computer, click "Remove" to complete this process.

Screen shot 2010-05-07 at 5.07.22 AM.png




REFERENCES
http://www.askdrtech.com/solutions/post/Removing-an-email-account-in-Mail-(Mac-OS-X-v105-or-later).aspx