Thursday, July 30, 2009

How to install webmin on CentOS 4

Webmin is a web based control panel for system administrators for Unix/Linux. I use Webmin for reports mainly. More about Webmin here.

This is how you would install Webmin on Centos 4.

1. First start by downloading the latest version of Webmin. The current version is 1.400.

I prefer to use use wget to directly download the file onto the server but it’s up to you.

wget http://prdownloads.sourceforge.net/webadmin/webmin-1.400-1.noarch.rpm

2. Install the Webmin rpm package.

rpm -ivh webmin-1.400-1.noarch.rpm

[root@proxy0 /]# rpm -ivh webmin-1.400-1.noarch.rpm
warning: webmin-1.400-1.noarch.rpm: V3 DSA signature: NOKEY, key ID 11f63c51
Preparing... ########################################### [100%]
Operating system is CentOS Linux
1:webmin ########################################### [100%]
Webmin install complete. You can now login to https://proxy0.klm1.netcel360.com:10000/
as root with your root password.

3. Check if the Webmin service has been started.

service webmin status

[root@proxy0 /]# service webmin status
webmin (pid 4878) is running

That’s it, you can now login using your root id at https://localhost:10000

InstantSSL Certificate Installation: Apache & mod_ssl / OpenSSL

Solution
Installing your Certificate on Apache Mod_SSL / OpenSSL
Step One: Copy your certificate to a file on your apache server

You will receive an email from Comodo with the certificate in the email. The certificate will be called 'yourDOMAINNAME.crt' and will be within a *.zip file you have received as an email from us. When viewed in a text editor, your certificate will look something like this:

-----BEGIN CERTIFICATE-----
MIAGCSqGSIb3DQEHAqCAMIACAQExADALBgkqhkiG9w0BBwGggDCCAmowggHXAhAF
UbM77e50M63v1Z2A/5O5MA0GCSqGSIb3DQEOBAUAMF8xCzAJBgNVBAYTAlVTMSAw
(.......)
E+cFEpf0WForA+eRP6XraWw8rTN8102zGrcJgg4P6XVS4l39+l5aCEGGbauLP5W6
K99c42ku3QrlX2+KeDi+xBG2cEIsdSiXeQS/16S36ITclu4AADEAAAAAAAAA
-----END CERTIFICATE-----

Copy your Certificate into the same directory as your Private Key. In this example we will use '/etc/ssl/crt/'. The private key used in the example will be labeled 'private.key' and the public key will be 'yourDOMAINNAME.crt'.

Note: It is recommended that you make the directory that contains the private key file only readable by root.
Step Two: Install the Root and Intermediate Certificates

You will need to install the Root and Intermediate CA certificates in order for browsers and devices to trust your certificate. The Root and Intermediate CA certificates are contained within the 'ca-bundle' file that was attached to your email in the *.zip file we sent you (this should be named 'yourSERVERNAME.ca-bundle'). In the relevant 'Virtual Host' section for your site, you will need to do the following to get this file correctly referenced:

a. First, copy the 'yourSERVERNAME.ca-bundle' file to the same directory as the certificate and key files. As a reminder, in this example we called the directory '/etc/ssl/crt/'.

b. Next, add the following line to the SSL section of the 'httpd.conf' file. Again we assume that '/etc/ssl/crt/' is the directory to where you have copied the intermediate CA file. If the line already exists amend it to read the following:

SSLCertificateChainFile /etc/ssl/crt/yourSERVERNAME.ca-bundle

c. If you are using a different location and different certificate file names, you will need to change the path and filename to reflect the path and filename that you are using. The SSL section of the updated config file should now read:

SSLCertificateFile /etc/ssl/crt/yourDOMAINNAME.crt
SSLCertificateKeyFile /etc/ssl/crt/private.key
SSLCertificateChainFile /etc/ssl/crt/yourSERVERNAME.ca-bundle ***

d. Save your 'config' file and restart Apache.
*** For Apache 1.x: Please use: SSLCACertificateFile /etc/ssl/crt/yourSERVERNAME.ca-bundle

apache apache apache apache apache apache apache apache apache
Note: The SSL configuration file will always be referenced in the apache config file if the configuration is not included in it. Look for the lines starting 'include', which is the directive for including other files etc. For example, depending on the distribution, it might be called ssl.conf, httpd-ssl.conf etc

Thursday, July 16, 2009

LF not found where expected

I put here for reference

[Dovecot] LF not found where expected

I'm using Dovecot 0.99.13 on a fedora core 3 server.
I keep getting these errors from time to time.
There user ends up retrieving no mail (but no error in their client, be it web mail or pop3 client)
What usually fixes it is this procedure:
Cp mbox file to mbox_
Remove original mbox
Send a test message to recreate mbox.
Cat mbox_ >> mbox
Problem solved!

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

pop3(mjmurray): Jun 27 11:16:38 Error: Error indexing mbox file /var/mail/mjmurray: LF not found where expected
pop3(mjmurray): Jun 27 11:16:38 Error: Error indexing mbox file /var/mail/mjmurray: LF not found where expected
pop3(mjmurray): Jun 27 11:16:38 Error: Couldn't open INBOX: Internal error occured. Refer to server log for more information. [2005-06-27 11:16:38]
pop3-login: Jun 27 11:17:06 Info: Login: mjmurray [64.203.167.125]
pop3(mjmurray): Jun 27 11:17:06 Error: Error indexing mbox file /var/mail/mjmurray: LF not found where expected
pop3(mjmurray): Jun 27 11:17:06 Error: Error indexing mbox file /var/mail/mjmurray: LF not found where expected
pop3(mjmurray): Jun 27 11:17:06 Error: Couldn't open INBOX: Internal error occured. Refer to server log for more information. [2005-06-27 11:17:06]
imap-login: Jun 27 11:17:28 Info: Login: mjmurray [127.0.0.1]
imap(mjmurray): Jun 27 11:17:28 Error: Error indexing mbox file /var/mail/mjmurray: LF not found where expected
imap(mjmurray): Jun 27 11:17:28 Error: Error indexing mbox file /var/mail/mjmurray: LF not found where expected
imap-login: Jun 27 11:19:12 Info: Login: mjmurray [127.0.0.1]
imap(mjmurray): Jun 27 11:19:12 Error: Error indexing mbox file /var/mail/mjmurray: LF not found where expected
imap(mjmurray): Jun 27 11:19:12 Error: Error indexing mbox file /var/mail/mjmurray: LF not found where expected


... Miles Mawyer -=- Webmaster . Centralva.net ...
... mmawyer at rosecomputers.com ...

Tuesday, July 7, 2009

Linux setup default gateway with route command

Linux setup default gateway with route command



Q. How do I setup default gateway with a route command?

A. route command show and/or manipulate the IP routing table under Linux and UNIX oses.

Route manipulates the kernel's IP routing tables. Its primary use is to set up static routes to specific hosts or networks via an interface after it has been configured with the ifconfig program. When the add or del options are used, route modifies the routing tables. Without these options, route displays the current contents of the routing tables.
Display default route

Following three-command display the current routing table:
# route
Output:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 ra0
default dsl-router 0.0.0.0 UG 0 0 0 ra0

$ /sbin/route
Output:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
191.255.255.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default 191.255.255.1 0.0.0.0 UG 0 0 0 eth0

You can use -n option, to display numerical addresses instead of trying to determine symbolic host names (via dns or /etc/hosts file). This is useful if you are trying to determine why the route to your nameserver has vanished.$ /sbin/route -nOutput:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
191.255.255.0 0.0.0.0 255.255.255.0 U 0 0 0 venet0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 venet0
0.0.0.0 191.255.255.1 0.0.0.0 UG 0 0 0 venet0

Please note that a destionation entry 0.0.0.0 (or default) is the default gatway. In above example 191.255.255.1 is a default gatway.
Add / setup a new route

The syntax is as follows:
route add default gw {IP-ADDRESS} {INTERFACE-NAME}

Where,

* IP-ADDRESS: Specify router IP address
* INTERFACE-NAME: Specify interface name such as eth0

For example if your router IP address is 192.168.1.254 type the following command as the root user:
# route add default gw 192.168.1.254 eth0OR use hostname such as dsl-router:
# route add default gw dsl-router eth0

Setting route using GUI tools/command under Linux

If you find above command hard to use, consider using GUI tools. If your are using Red Hat/CentOS/Fedora core Linux type following command:# redhat-config-networkOR If you are using other Linux distribution use command:
# network-admin


 

OSS R&D Copyright © 2009 Premium Blogger Dashboard Designed by SAER