Here is the steps to install MySQL in FreeBSD servers.
1. cd /usr/ports/databases/mysql*-server/
Note: * indicates that you can select the MySQL version as your wish.
2. make install clean
3. /usr/local/bin/mysql_install_db
4. chown -R mysql /var/db/mysql/
5. chgrp -R mysql /var/db/mysql/
6. /usr/local/bin/mysqld_safe –user=mysql &
7. /usr/local/bin/mysqladmin -u root password newpassword
8. Open the file /etc/rc.conf and add the following line
mysql_enable=”YES”
Saturday, 20 February 2010
ISAPI and CGI Restriction
If you get the following error while accessing the URL,
The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server.
Then follow the steps given below:
Login to the server >> IIS >> ISPAI and CGI Restrictions >> right click on asp dll file [C:WindowsMicrosoft.NETFrameworkv2.0.50727aspnet_isapi.dll] >> Enable CGI and ISAPI >> Restart IIS service.
The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server.
Then follow the steps given below:
Login to the server >> IIS >> ISPAI and CGI Restrictions >> right click on asp dll file [C:WindowsMicrosoft.NETFrameworkv2.0.50727aspnet_isapi.dll] >> Enable CGI and ISAPI >> Restart IIS service.
Hooks Do Not Execute
We have added a feature to 11.25.0 that keeps track of what hooks are in use. This new mechanism greatly improves speed within cPanel/WHM as it no longer has to check to see if a hook exists every time an API call is made. Unfortunately the hooks.db file was unreadable by any user other than root. If you notice that hooks are not executing on your server, please run
chmod 644 /var/cpanel/hooks.db
This issue will be fixed in the next update.
chmod 644 /var/cpanel/hooks.db
This issue will be fixed in the next update.
New cPanel 11.25.0 Installation Apache configuration syntax errors
The release of 11.25.0-RELEASE_42399 and 11.25.0-CURRENT_42399 introduced a configurationissue that may cause Apache configuration syntax errors on servers with no accounts when the mod_userdir tweak is enabled. The condition will present itself upon addition of the first account to the server. This issue is quickly addressed by rebuilding the Apache configuration file.
Symptoms:
The following error can be seen in the cpanel error_log and when attempting to restart Apache:
UserDir "enable" keyword requires a list of usernames
Newly created websites would be sent to defaultwebpage.cgi instead of the appropriate document root.
Resolutions:
1) New builds, 11.25.0-CURRENT_42400 and 11.25.0-RELEASE_42400, have been published to address the issue. This issue will not be present on subsequent new installations. Upgrading a currently affected system will resolve this issue.
2) Rebuilding the Apache configuration after the addition of the first account will permanently resolve this issue.
From the command line:
/scripts/rebuildhttpdconf
/scripts/restartsrv_httpd
or
/scripts/autorepair userdir_enable_fix
/scripts/restartsrv_httpd
From the WHM:
Service Configuration -> Apache Configuration -> Global Configuration ->
Save -> Rebuild Configuration and Restart Apache
Note:
The Apache configuration may be rebuilt as a result of other changes made in the WHM. Your new installation may not experience this issue as a result the the Apache configuration being rebuilt automatically.
Symptoms:
The following error can be seen in the cpanel error_log and when attempting to restart Apache:
UserDir "enable" keyword requires a list of usernames
Newly created websites would be sent to defaultwebpage.cgi instead of the appropriate document root.
Resolutions:
1) New builds, 11.25.0-CURRENT_42400 and 11.25.0-RELEASE_42400, have been published to address the issue. This issue will not be present on subsequent new installations. Upgrading a currently affected system will resolve this issue.
2) Rebuilding the Apache configuration after the addition of the first account will permanently resolve this issue.
From the command line:
/scripts/rebuildhttpdconf
/scripts/restartsrv_httpd
or
/scripts/autorepair userdir_enable_fix
/scripts/restartsrv_httpd
From the WHM:
Service Configuration -> Apache Configuration -> Global Configuration ->
Save -> Rebuild Configuration and Restart Apache
Note:
The Apache configuration may be rebuilt as a result of other changes made in the WHM. Your new installation may not experience this issue as a result the the Apache configuration being rebuilt automatically.
Saturday, 13 February 2010
Disable all catchalls on entire cPanel server to prevent spam
By default cPanel is set to accept catchalls, that is mail to non-existent users, and bounces them. This can result in much spam being accepted by a cPanel server as spammers often brute force or randomly address their spam. Further, the bounce is usually set to an innocent address that was spoofed, creating what is an increasing problem known as backscatter spam.
A few steps are required to completely fix this. First disable this default setting in cPanel WHM by going to Server Configuration > Tweak Settings > Mail > and set Default catch-all/default address to :blackhole:. This will silently drop spam rather than bounce it, preventing more backscatter spam.
Next, disable all catchalls on the server:
mkdir -p /etc/valiasesbak
cp -R /etc/valiases /etc/valiasesbak
sed -i 's/^*: [^ ]*$/*: :blackhole:/g' /etc/valiases/*
replace ':fail: No Such User Here' ':blackhole:' -- /etc/valiases/*
Check if there are any lingering aliases set to bounce with:
grep '*:' /etc/valiases/* | egrep -v ':blackhole:'
There maybe a few other bounce fail phrases like “Invalid e-mail address. Check and re-send.” Simply substitute these phrases in the replace command above, so:
replace ':fail: Invalid e-mail address. Check and re-send.' ':blackhole:' -- /etc/valiases/*
Ensure users can write with:
chmod 777 /etc/valiases/*
chown nobody:nobody /etc/valiases/*
Lastly, prevent users from re-enabling the catchall. In WHM > Packages > Feature Manager, select Default under Edit a Feature List and then edit. Uncheck Default Address Manager and then save.
A few steps are required to completely fix this. First disable this default setting in cPanel WHM by going to Server Configuration > Tweak Settings > Mail > and set Default catch-all/default address to :blackhole:. This will silently drop spam rather than bounce it, preventing more backscatter spam.
Next, disable all catchalls on the server:
mkdir -p /etc/valiasesbak
cp -R /etc/valiases /etc/valiasesbak
sed -i 's/^*: [^ ]*$/*: :blackhole:/g' /etc/valiases/*
replace ':fail: No Such User Here' ':blackhole:' -- /etc/valiases/*
Check if there are any lingering aliases set to bounce with:
grep '*:' /etc/valiases/* | egrep -v ':blackhole:'
There maybe a few other bounce fail phrases like “Invalid e-mail address. Check and re-send.” Simply substitute these phrases in the replace command above, so:
replace ':fail: Invalid e-mail address. Check and re-send.' ':blackhole:' -- /etc/valiases/*
Ensure users can write with:
chmod 777 /etc/valiases/*
chown nobody:nobody /etc/valiases/*
Lastly, prevent users from re-enabling the catchall. In WHM > Packages > Feature Manager, select Default under Edit a Feature List and then edit. Uncheck Default Address Manager and then save.
Useful Hidden cPanel Commands
Have you ever locked yourself out of your server while making some iptables changes? What about when you change your SSH port and then forget what you set it to? These are both fairly common support requests that we receive at slhost. Fortunately, in many cases this is something our customer’s can fix on their end as long as they are using cPanel as their control panel.
cPanel comes with a number of ‘hidden’ autofix commands that allow for administrators to fix common problems simply be logging into WHM and going to a special URL. Two of the most useful ones I’ve seen are flushing iptables and restarting SSH in “safe mode” (basically the default settings and port).
Flushing iptables rules: http://mydomain.com:2086/scripts2/doautofixer?autofix=iptablesflush
Restart SSH in safe mode: http://mydomain.com:2086/scripts2/doautofixer?autofix=safesshrestart
Once you hit the URL you will be prompted to log in. Simply enter your root password and cPanel will do the rest. These have definitely saved me on more than one occasion when my attempt to ’secure’ my server worked a little too well.
* I should note that if you happen to also lock yourself out of WHM through iptables, you will not be able to hit the URL’s I mentioned. In that case, contact support.
cPanel comes with a number of ‘hidden’ autofix commands that allow for administrators to fix common problems simply be logging into WHM and going to a special URL. Two of the most useful ones I’ve seen are flushing iptables and restarting SSH in “safe mode” (basically the default settings and port).
Flushing iptables rules: http://mydomain.com:2086/scripts2/doautofixer?autofix=iptablesflush
Restart SSH in safe mode: http://mydomain.com:2086/scripts2/doautofixer?autofix=safesshrestart
Once you hit the URL you will be prompted to log in. Simply enter your root password and cPanel will do the rest. These have definitely saved me on more than one occasion when my attempt to ’secure’ my server worked a little too well.
* I should note that if you happen to also lock yourself out of WHM through iptables, you will not be able to hit the URL’s I mentioned. In that case, contact support.
Subscribe to:
Posts (Atom)