Webmin installation in centos server


Webmin is a web-based interface for system administration for Unix. You can install it using the following steps.

Fisrt login in to the server as root:-

# cd /usr/src

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

# rpm -ivh webmin-1.620-1.noarch.rpm

Now open the browser and type

http://IP:10000

where IP is the IP of the server.

Make sure that the port 10000 is open in the firewall.

That’s all……..!!!!

Can’t upgrade or update plugins: “could not create directory”


Issue: I got the above error while updating the WordPress plugins.

Solution:

Check the permission of “wp-content” directory and “upgrade” directory inside it.

It should be under user ownership.

ie:  chown -R user.user wp-content/

Also correct the directory permission to 755

ie: chmod 755 wp-content

chmod 755 wp-content/upgrade

Try now to upgrade the plugins.

That’s all………!!!!

error while loading shared libraries: libfreebl3.so


Issue : When I try to access any php file on the main account gives a ‘500 Internal Server Error’ and generates the following error log entry:

/usr/bin/php: error while loading shared libraries: libfreebl3.so: failed to map segment from shared object: Cannot allocate memory

Solution:

Please open the Apache configuration file.

vi /usr/local/apache/conf/httpd.conf

Then find the following lines.

RLimitMEM 67108864
RLimitCPU  240

Comment both of the lines.

#RLimitMEM 67108864
#RLimitCPU 240

Now try to access the web page.

That’s all…….!!!!!

How to reset the webmin root password


Solution:

 

You can easily reset the webmin root password using the following command.

/usr/libexec/webmin/changepass.pl /etc/webmin root NEWPASSWORDHERE

That’s all……!!!!

service httpd status showing Not Acceptable Error


Issue: I got the “Not Acceptable” error while checking the status of apache.

root[~]# service httpd status
Not Acceptable

An appropriate representation of the requested resource
/whm-server-status could not be found on this server.

Additionally, a 404 Not Found error was encountered while trying to use
an ErrorDocument to handle the request.

Solution : 

Please check the Apache error log using the following command.

# grep "/whm-server-status" error_log

You will get an outpute like pasted below

--------------------
root@server10001 [/usr/local/apache/logs]# grep "/whm-server-status" error_log
[Wed Jan 29 17:42:57 2014] [error] [client ::1] ModSecurity: Access denied with code 406 (phase 2). Match of "rx ^apache.*perl" against "REQUEST_HEADERS:User-Agent" required. [file "/usr/local/apache/conf/modsec2.user.conf"] [line "58"] [id "1234123429"] [msg "Request Indicates an automated program explored the site"] [severity "NOTICE"] [hostname "localhost"] [uri "/whm-server-status"] [unique_id "UujwSVOqdYoAAAs9DEAAAAAB"]
---------------------

The output clearly shows, whm-server-status was blocked by modesec rule at line “58″ and id “1234123429″ on /usr/local/apache/conf/modsec2.user.conf file.

Now, Please open the modsec file using the command pasted below.

# vi /usr/local/apache/conf/modsec2.user.conf

Then comment the lines using the "#" symbol as pasted below.

------------------
#SecRule REQUEST_HEADERS:User-Agent "(?:\b(?:(?:indy librar|snoop)y|microsoft url control|lynx)\b|d(?:ownload demon|isco)|w(?:3mirror|get)|l(?:ibwww|wp)|p(?:avuk|erl)$
#        "chain,log,auditlog,msg:'Request Indicates an automated program explored the site',id:'1234123429',severity:'5'"
#SecRule REQUEST_HEADERS:User-Agent "!^apache.*perl"
--------------------

Please check the status of Apache now.

That's all..........!!!


 

Failed to install CPAN Perl module(s) Crypt::PasswdMD5


Issue:

I got the error “Failed to install CPAN Perl module(s) Crypt::PasswdMD5” while running easyapache on the server.

Solution:

Please use the following commands after logi to the server as root.

1.  /usr/local/cpanel/scripts/perlinstaller Digest::SHA1

2. /usr/local/cpanel/bin/cpanm -n Digest::SHA1 Crypt::PasswdMD5

If you are still having the error, your Scalar::Util was broken on the server and you need to repair

3. /scripts/autorepair scalarutil

Now manually install Crypt::PasswdMD5

4./scripts/perlinstaller Crypt::PasswdMD5

If the issue still persist, please run the following command

5. /usr/bin/perl -MCPAN -e ‘install Crypt::PasswdMD5’

That’s all……!!!

lowest numbered MX record points to localhost


Issue: I got the above error from /var/log/exim_mainlog while sending mails from a domain hosted in my server

temporarily rejected RCPT <email@domainname.tld>: lowest numbered MX record points to local host

Solution :

Check if the domain MX is pointing to remote or not.

If the domain is using our server as MX,

The reason for the error message is the domain “domainname.tld” is missing from the /etc/localdomains file of your server. The difference between the /etc/localdomains and /etc/remotedomains  files is that, they decide whether the email has to be delivered locally OR to a remote server respectively and is checked by the exim mail server.

To fix the issue, edit the file:

# vi /etc/localdomains

and place the domain name entry there. There is no need to restart the ‘exim’ s service

Also please check if the domain is listed in /etc/remotedomains and comment the entry if it’s present there.

That’s all……!!!

cpanel server alert “hostname should resolves to”


Issue : 

The “hostname resolves to. It should resolve to xx.xx.xx.xx” alert is sent by cPanel if the hostname of your server is not resolving to your server IP. The message send by cPanel is as follows:

IMPORTANT: Do not ignore this email.
The hostname (server.domain.tld) resolves to .  It should resolve to
xx.xx.xx.xx.  Please be sure to correct /etc/hosts as well as the ‘A’
entry in zone file for the domain.
Some are all of these problems can be caused by
/etc/resolv.conf being setup incorrectly.  Please check this file if you
believe everything else is correct.

solution :

In order to stop the “hostname” alert, you need to make sure the hostname is pointing to your server IP. The ‘A’ record for the hostname has to be set where the name servers of “domain.tld” are hosted.
i.e; if the hostname of your server is “server.tricks4linux.com”, an ‘A’ record for “server” has to be set on the servers where name servers assigned to “tricks4linux.com” are resolving. If the name servers for tricks4linux.com are resolving to your server, you need to edit the dns zone file of tricks4linux.com from
WHM >> DNS Functions >> Edit a DNS Zone

and add an ‘A’ record for ‘server’ to point to your server IP.

You can also edit directly from the zone file of the domain.

If you are using your domain registrar’s name servers for tricks4linux.com, then you have to set an ‘A’ record in the domain registrar panel. But make sure it is set correctly on your server as well.
Next step is to see if the hostname is properly set in the /etc/hosts file of the server. SSH to your server as root and make sure the hostname is set as follows:

ServerIP  server.tricks4linux.com server

If the hostname is resolving to your server IP and you still receive the alert message, disable the alert for the hostname from

WHM >> Server Contacts >> IP Address DNS Check

 

Blog Stats

  • 37,404 hits