cPanel - Shine Servers: Illuminating IT Solutions Since 2012 https://www.shineservers.com Your gateway to cutting-edge Web Hosting, Cloud & Dedicated Servers, Development, Digital Marketing, and more. Let's build the future together. Fri, 18 Sep 2020 07:33:45 +0000 en-US hourly 1 https://wordpress.org/?v=6.9 https://www.shineservers.com/wp-content/uploads/2025/01/cropped-Facivon-32x32.png cPanel - Shine Servers: Illuminating IT Solutions Since 2012 https://www.shineservers.com 32 32 201548004 Complete Guide to cPanel for Beginners https://www.shineservers.com/2020/09/18/complete-guide-to-cpanel-for-beginners/ https://www.shineservers.com/2020/09/18/complete-guide-to-cpanel-for-beginners/#respond Fri, 18 Sep 2020 07:33:45 +0000 https://www.shineservers.com/?p=3212 cPanel is one of the most popular Linux-based control panels for web hosting accounts. It lets you conveniently manage all services in a single place. Currently, cPanel is the industry standard and most web developers are well acquainted with it. Intuitive and easy to use, cPanel empowers you to manage a web hosting account with maximum […]

The post Complete Guide to cPanel for Beginners first appeared on Shine Servers: Illuminating IT Solutions Since 2012.

]]>
cPanel is one of the most popular Linux-based control panels for web hosting accounts. It lets you conveniently manage all services in a single place. Currently, cPanel is the industry standard and most web developers are well acquainted with it.

Intuitive and easy to use, cPanel empowers you to manage a web hosting account with maximum efficiency. Whether that’s creating new FTP users and email addresses or monitoring resources, creating subdomains, and installing software.

What is cPanel Hosting?

cPanel hosting is essentially Linux web hosting which includes the installation of cPanel. cPanel has its pros and cons, but it works pretty well in the majority of cases and makes for a sensible choice when you’re looking for a control panel solution. Here’s what to expect:

Pros:

  • Easy to learn
  • Easy to use
  • Saves time and money
  • Tried and tested
  • Includes software auto-installers
  • Plenty of tutorials/support available online

Cons:

  • Number of features can be overwhelming
  • Relatively easy to accidentally change important settings
  • Some hosts run outdated software
  • Can cost more and is rarely offered with free hosting

cPanel Tutorial: How to Use cPanel

Different cPanel installations include different features, but the good news is that it’s pretty easy to browse around and to get to know each of the different sections. When you first log in, you’ll usually see some metrics that log your resource usage (such as your CPU usage, your available storage space, and your memory usage). These can provide you with a useful way of keeping an eye on your website’s overall performance.

Once you’ve familiarised yourself with your website’s performance, it’s time to take a look at the different modules. We’ve provided an overview of the most typical cPanel modules below.

File Modules:

These modules allow you to directly upload and manage files from within cPanel without needing to use an FTP client. You can also specify privacy levels, make backups, and more. Common modules include:

  • Backup
  • Backup Wizard
  • Directory Privacy
  • Disk Usage
  • File Manager
  • FTP Accounts
  • FTP Connections
  • Images
  • Web Disk
  • Git Version Control
  • Inode counter

Preferences:

This is where you customize the layout of your cPanel installation to make it better fit your needs. Common modules include:

  • Change Language
  • Change Style
  • Contact Information
  • User Manager

Databases:

If your website uses a content management system (CMS) then it will use a database to store posts, settings, and other information. This section, then, is all about managing those databases. Common modules include:

  • MySQL Database Wizard
  • MySQL Databases
  • phpMyAdmin
  • Remote MySQL

Web Applications:

This is typically where your cPanel installation will allow you to install different types of software. It includes everything from blogs and portals to CMSs and forums.

Domains:

It’s not uncommon for webmasters to use one hosting account for multiple sites or to set up subdomains and redirects. This is the section in which you can manage that. Common modules include:

  • Addon Domains
  • Aliases
  • DNS Manager
  • Preview Website
  • Redirects
  • Subdomains

Metrics:

If you’re running a website then you’re going to want to keep an eye on its performance. That’s where the metrics modules come in. They’re all about giving you access to powerful insights that can help you to better make decisions about the way your website works. Common modules include:

  • Awstats
  • Bandwidth
  • CPU and Concurrent Connection Usage
  • Errors
  • Raw Access
  • Visitors

Security:

Security is a big concern for most webmasters, especially if they’re storing sensitive information such as usernames, passwords, or financial information. This module will help you to keep an eye on key security settings for your hosting account. Common modules include:

  • Hotlink Protection
  • IP Blocker
  • Leech Protection
  • SSH Access
  • SSL/TLS
  • Leech Protection
  • Two-Factor Authentication
  • Lets Encrypt
  • ModSecurity
  • Manage API Tokens

Software:

These modules are largely about PHP and Perl and aren’t necessarily needed unless you’re a more advanced user. Common modules include:

  • Softaculpis Apps Installer
  • Optimize Website
  • Free Shopping Cart
  • Setup Ruby App
  • RVsitebuilder
  • WordPress Themes
  • PHP PEAR Packages
  • Cloudflare
  • PHP Version Selector
  • Application Manager

Advanced:

As the title suggests, these settings are also more useful for advanced users. Common modules include:

  • Apache Handlers
  • Cron Jobs
  • Error Pages
  • Indexes
  • MIME Types
  • Track DNS
  • LiteSpeed Web Cache Manager

Email:

Not all web hosting packages include email, but if your package includes both email and cPanel then this is where you’ll administer all of those email accounts. Common modules include:

  • Address Importer
  • Encryption
  • Autoresponders
  • Default Address
  • Email Wizard
  • Encryption
  • Forwarders
  • Global Filters
  • Email Disk Usage
  • Track Delivery
  • User Filters

So, What is cPanel?

cPanel is one of the most popular Linux-based web hosting control panels, displaying key metrics about your server’s performance and allowing you to access a range of modules including Files, Preferences, Databases, Web Applications, Domains, Metrics, Security, Software, Advanced and Email modules.

cPanel hosting is essentially Linux hosting which includes cPanel installation, making it a popular choice amongst webmasters. But there are plenty of alternatives out there, so if cPanel isn’t for you then you’ll be sure to find a control panel to suit you.

Now that you know what is cPanel, it’s time to share some experiences. Have you tried any other web hosting control panels? Which one was your favorite? Let us know in the comment below.

The post Complete Guide to cPanel for Beginners first appeared on Shine Servers: Illuminating IT Solutions Since 2012.

]]>
https://www.shineservers.com/2020/09/18/complete-guide-to-cpanel-for-beginners/feed/ 0 3212
How To Block A Domain From Sending Email From My cPanel Server https://www.shineservers.com/2017/01/09/block-domain-sending-email-cpanel-server/ https://www.shineservers.com/2017/01/09/block-domain-sending-email-cpanel-server/#respond Mon, 09 Jan 2017 18:16:38 +0000 http://blog.shineservers.com/?p=3122 We face this problem many times, even we mostly get this kind of issue when a user who is getting hacked a lot and the account is sending out spam emails. In that case, If you want to disable just his account from being able to send mail at all until he can get his script updated […]

The post How To Block A Domain From Sending Email From My cPanel Server first appeared on Shine Servers: Illuminating IT Solutions Since 2012.

]]>
We face this problem many times, even we mostly get this kind of issue when a user who is getting hacked a lot and the account is sending out spam emails. In that case, If you want to disable just his account from being able to send mail at all until he can get his script updated or changed. So here’s how we can do it:

First, in root SSH, run these commands:

touch /etc/blockeddomains
echo “domain.com” >> /etc/blockeddomains

Please replace domain.com with the domain name. Do not replace the “” part as that’s required, only the domain.com part with the right domain name.

In WHM > Exim Configuration Editor > Advanced Configuration Editor -> Click on “Add additional configuration setting” -> Add::

domainlist blocked_domains = lsearch;/etc/blockeddomains

Locate the “ROUTERS CONFIGURATION” section, and right below these lines:

democheck:
driver = redirect
require_files = “+/etc/demouids”
condition = “${if eq {${lookup {$originator_uid} lsearch {/etc/demouids} {$value}}}{}{false}{true}}”
allow_fail
data = :fail: demo accounts are not permitted to relay email

Put the following lines:

reject_domains:

driver = redirect
# RBL Blacklist incoming hosts
domains = blocked_domains
allow_fail
data = :fail: Connection rejected: SPAM source $domain is manually blacklisted.

The post How To Block A Domain From Sending Email From My cPanel Server first appeared on Shine Servers: Illuminating IT Solutions Since 2012.

]]>
https://www.shineservers.com/2017/01/09/block-domain-sending-email-cpanel-server/feed/ 0 3122
Set Up DNS for Office 365 in cPanel https://www.shineservers.com/2016/07/18/set-dns-office-365-cpanel/ https://www.shineservers.com/2016/07/18/set-dns-office-365-cpanel/#respond Mon, 18 Jul 2016 15:49:34 +0000 http://blog.shineservers.com/?p=3109 To set up Microsoft Office 365, login to cPanel, then add/update the following DNS records for the domain(s) in question: example.com.au. 300 MX 0 example-com-au.mail.eo.outlook.com. example.com.au. 3600 TXT MS=ms000000 autodiscover 3600 CNAME autodiscover.outlook.com. example.com.au. 3600 TXT “v=spf1 include:outlook.com ~all” _sip 3600 SRV 100 1 443 sipdir.online.lync.com. _sipfederationtls 3600 SRV 100 1 5061 sipfed.online.lync.com. sip 3600 […]

The post Set Up DNS for Office 365 in cPanel first appeared on Shine Servers: Illuminating IT Solutions Since 2012.

]]>
To set up Microsoft Office 365, login to cPanel, then add/update the following DNS records for the domain(s) in question:

example.com.au. 300 MX 0 example-com-au.mail.eo.outlook.com.
example.com.au. 3600 TXT MS=ms000000
autodiscover 3600 CNAME autodiscover.outlook.com.
example.com.au. 3600 TXT “v=spf1 include:outlook.com ~all”
_sip 3600 SRV 100 1 443 sipdir.online.lync.com.
_sipfederationtls 3600 SRV 100 1 5061 sipfed.online.lync.com.
sip 3600 CNAME sipdir.online.lync.com.
lyncdiscover 3600 CNAME webdir.online.lync.com.
Notes:

  • The MS record shown in red is a number supplied by Microsoft as part of the verification rocess.
  • The MX record contains the domain name as a prefix, with periods replaced by hyphens.

Then, change the Email Routing setting down the bottom to “Remote Mail Exchanger”.

The post Set Up DNS for Office 365 in cPanel first appeared on Shine Servers: Illuminating IT Solutions Since 2012.

]]>
https://www.shineservers.com/2016/07/18/set-dns-office-365-cpanel/feed/ 0 3118
Resetting Root Password Using Rescue Mode https://www.shineservers.com/2016/03/28/resetting-root-password-using-rescue-mode/ https://www.shineservers.com/2016/03/28/resetting-root-password-using-rescue-mode/#respond Mon, 28 Mar 2016 18:42:22 +0000 http://blog.shineservers.com/?p=3090 It’s been a million dollar question for anyone who is stuck and don’t remember the root password, If you are not able to reset the password for your Linux Server then you will need to place the server into rescue mode and chroot the file system of the server and run passwd to update the root password. Sounds […]

The post Resetting Root Password Using Rescue Mode first appeared on Shine Servers: Illuminating IT Solutions Since 2012.

]]>
It’s been a million dollar question for anyone who is stuck and don’t remember the root password, If you are not able to reset the password for your Linux Server then you will need to place the server into rescue mode and chroot the file system of the server and run passwd to update the root password. Sounds easy? Let me show you how 🙂

  1. Place Server into Rescue Mode or If you have no idea how to do that then ask your hosting provider to do that for you.
  2. Connect to the rescue mode server using ssh as normally you do.
  3. It is always suggested to run ‘fsck’ (File System check) every time you get. It will save you hassles of it automatically running during a reboot, causing boot time to take longer than expected.

This could be either /dev/sda1 or /dev/sdb1 depending on your setup.

I will be using /dev/sda1 in the reset of the example:

fsck -fyv /dev/sda1

This will force a file system check (f flag), automatically respond ‘yes’ to any questions prompted(y flag), and display a verbose output at the very end(v flag).

Mounting the file system:

a. Make a temporary directory:

mkdir /mnt/rescue

b. Mount to that temp directory

mount /dev/sda1 /mnt/rescue
chroot /mnt/rescue

4. We are going to use ‘chroot’. chroot allows you to set the root of the system in a temporary environment.

5. Now that we are chroot-ed into your original drive, all you have to do is run ‘passwd’ to update your root password on the original Server’s hard drive.

passwd

(This will prompt you for your new password twice, and then update the appropriate files.)

6. Exit out of chroot mode.

exit

7. Unmount your original drive

umount /mnt/rescue

8. Exit out of SSH and Exit Rescue Mode.

The post Resetting Root Password Using Rescue Mode first appeared on Shine Servers: Illuminating IT Solutions Since 2012.

]]>
https://www.shineservers.com/2016/03/28/resetting-root-password-using-rescue-mode/feed/ 0 3112
How To Set Up Clustered Nameservers With cPanel https://www.shineservers.com/2014/12/17/set-clustered-nameservers-cpanel/ https://www.shineservers.com/2014/12/17/set-clustered-nameservers-cpanel/#respond Wed, 17 Dec 2014 07:58:18 +0000 http://blog.shineservers.com/?p=3058 As important as DNS is to web hosting, it is a good idea to make it redundant when possible. If you have two or more cPanel servers, you can use cPanel’s DNS clustering to lower the risk of a DNS failure on a nameserver taking down all of your sites. Here’s how to set that […]

The post How To Set Up Clustered Nameservers With cPanel first appeared on Shine Servers: Illuminating IT Solutions Since 2012.

]]>
As important as DNS is to web hosting, it is a good idea to make it redundant when possible. If you have two or more cPanel servers, you can use cPanel’s DNS clustering to lower the risk of a DNS failure on a nameserver taking down all of your sites. Here’s how to set that up:

Step One: Enable Clustering For Each Server

First, click over to Configure Cluster in WHM on each server. In the Modify Cluster Status box, select Enable DNS clustering. Click the Change button.

Step Two: Configure The Primary Nameserver

On the first server, scroll down to Add a new server to the cluster. The type will be cpanel. Click Configure. This will take you to the cPanel DNS Remote Configuration page.
In Remote cPanel & WHM DNS service, put the hostname or IP address of the second nameserver. Next, in Remote server username, put the username of the nameserver. While this can sometimes be reseller, in most cases it will be root.

In the next area, Remote server access hash, you will need to put the ssh public key of the other server. To find that key, go to the Manage root’s SSH Keys page in the second server’s WHM. Click Generate a New Key. On the next page, leave the password blank and click the Generate Key button. cPanel will issue a warning about the security of an SSH key without a password, but unfortunately it is needed for this sort of automation. (It is only a security risk if someone gains root access to your server, by which point your server’s security will already have been compromised.)

Still on the second server, click back to Manage root’s SSH Keys. Then click View/Download Key under the Public Keys: heading. This will take you to the key which you will then copy back to the first server, in the Remote server access hash field.

Uncheck the Setup Reverse Trust Relationship checkbox.

Set the DNS role of the server to Write-only. Click Submit.

Step Three: Repeat Step Two, Only Backwards

Step Three is going through the same process as Step Two, only reversing the servers. Also, role of the server should be set to Standalone instead of Write-Only.

Adding DNS Zones

There is one quirk of this system: DNS zones for domains will have to be added on the Write-Only server. So when creating cPanel accounts on the Standalone server, make sure to add the DNS for the domain to the Write-Only server.

===

The post How To Set Up Clustered Nameservers With cPanel first appeared on Shine Servers: Illuminating IT Solutions Since 2012.

]]>
https://www.shineservers.com/2014/12/17/set-clustered-nameservers-cpanel/feed/ 0 3058
cPanel Optimize Website No longer working https://www.shineservers.com/2014/04/11/cpanel-optimize-website-longer-working/ https://www.shineservers.com/2014/04/11/cpanel-optimize-website-longer-working/#respond Fri, 11 Apr 2014 09:08:31 +0000 http://blog.shineservers.com/?p=2804 When client tries to enable or disable “Optimize Website” in cPanel, this error is shown: OptimizeWS::optimizews(,) failed: Modification of non-creatable array value attempted, subscript -1 at /usr/local/cpanel/Cpanel/OptimizeWS.pm line 104, <HC> line 52. Here is a Solution: To be certain you are not over-writing any existing data: # mv /home/[cPanel user]/.htaccess /home/[cPanel user]/.htaccess.bak # echo > […]

The post cPanel Optimize Website No longer working first appeared on Shine Servers: Illuminating IT Solutions Since 2012.

]]>
When client tries to enable or disable “Optimize Website” in cPanel, this error is shown:

OptimizeWS::optimizews(,) failed: Modification of non-creatable array value attempted, subscript -1 at /usr/local/cpanel/Cpanel/OptimizeWS.pm line 104, <HC> line 52.

Here is a Solution:

To be certain you are not over-writing any existing data:

# mv /home/[cPanel user]/.htaccess /home/[cPanel user]/.htaccess.bak
# echo > /home/[cPanel user]/.htaccess; chown [cPanel user].[cPanel user] /home/[cPanel user]/.htaccess

cPanel >> Software/Services >> Optimize Website should work as expected once there is an existing .htaccess file with some content in /home/[cPanel user]/.htaccess

Let me know if anything else is needed, i’ll make sure it get fixed for you.

Thanks

The post cPanel Optimize Website No longer working first appeared on Shine Servers: Illuminating IT Solutions Since 2012.

]]>
https://www.shineservers.com/2014/04/11/cpanel-optimize-website-longer-working/feed/ 0 2804
How To Optimise MySQL & Apache On cPanel/WHM https://www.shineservers.com/2014/03/31/optimise-mysql-apache-cpanelwhm/ https://www.shineservers.com/2014/03/31/optimise-mysql-apache-cpanelwhm/#respond Mon, 31 Mar 2014 15:21:18 +0000 http://blog.shineservers.com/?p=2652 On this optimization process we will go over the Apache core configuration and modules that are part of Apache core. We think that with the correct settings of Apache and MySQL you can get excellent results and the correct level of resource use without installing third-party proxy and cache modules. So let’s start,   Apache & PHP […]

The post How To Optimise MySQL & Apache On cPanel/WHM first appeared on Shine Servers: Illuminating IT Solutions Since 2012.

]]>
On this optimization process we will go over the Apache core configuration and modules that are part of Apache core. We think that with the correct settings of Apache and MySQL you can get excellent results and the correct level of resource use without installing third-party proxy and cache modules. So let’s start,

 

Apache & PHP

In the first stage we run the Easy Apache and selected the following:

* Apache Version 2.4+

* PHP Version 5.4+

* In step 5 “Exhaustive Options List” select

– Deflate

– Expires

– MPM Prefork

– MPM Worker

After Easy Apache finished go to your WHM » Service Configuration » Apache Configuration » “Global Configuration” and set the values by the level of resources available on your server.

Apache Directive 	 	(From 2GB memory or less and up to 12GB memory) 	 	

StartServers 	 	 	4 	 	8 	 	16 	
MinSpareServers 	 	4 	 	8 	 	16 	
MaxSpareServers 	 	8 	 	16 	 	32 	
ServerLimit 	 	 	64 	 	128 	 	256 	
MaxRequestWorkers 	 	50 	 	120 	 	250 	
MaxConnectionsPerChild 	 	1000 	 	2500 	 	5000 
Keep-Alive			On		On		On
Keep-Alive Timeout	 	5	 	5	 	 5
Max Keep-Alive Requests		50	 	120	 	120
Timeout				30		60		60

 

Now go to WHM » Service Configuration » Apache Configuration » Include Editor » “Pre VirtualHost Include” and allow users minimal cache and data compression to allow the server to work less for the same things by pasting the code below into the text field.

# Cache Control Settings for one hour cache
<FilesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=3600, public"
</FilesMatch>

<FilesMatch ".(xml|txt)$">
Header set Cache-Control "max-age=3600, public, must-revalidate"
</FilesMatch>

<FilesMatch ".(html|htm)$">
Header set Cache-Control "max-age=3600, must-revalidate"
</FilesMatch>

# Mod Deflate performs data compression
<IfModule mod_deflate.c>
<FilesMatch ".(js|css|html|php|xml|jpg|png|gif)$">
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE no-gzip
</FilesMatch>
</IfModule>

 

Go to WHM » Service Configuration » “PHP Configuration Editor” and set the parameters according to your needs:

– memory_limit

– max_execution_time

– max_input_time

 

MySQL

For MySQL you need to update the configuration file that usually in /etc/my.cnf

Best config base on 1 core & 2GB memory MySQL 5.5:

[mysqld]
    local-infile = 0
    max_connections = 250
    key_buffer = 64M
    myisam_sort_buffer_size = 64M
    join_buffer_size = 1M
    read_buffer_size = 1M
    sort_buffer_size = 2M
    max_heap_table_size = 16M
    table_cache = 5000
    thread_cache_size = 286
    interactive_timeout = 25
    wait_timeout = 7000
    connect_timeout = 15
    max_allowed_packet = 16M
    max_connect_errors = 10
    query_cache_limit = 2M
    query_cache_size = 32M
    query_cache_type = 1
    tmp_table_size = 16M
    open_files_limit=2528

[mysqld_safe]

[mysqldump]
    quick
    max_allowed_packet = 16M
[myisamchk]
    key_buffer = 64M
    sort_buffer = 64M
    read_buffer = 16M
    write_buffer = 16M
[mysqlhotcopy]
    interactive-timeout

 

Best config base on 8 core & 12GB memory (Shared server) MySQL 5.5:

[mysqld]
local-infile=0
max_connections = 600
max_user_connections=1000
key_buffer_size = 512M
myisam_sort_buffer_size = 64M
read_buffer_size = 1M
table_open_cache = 5000
thread_cache_size = 384
wait_timeout = 20
connect_timeout = 10
tmp_table_size = 256M
max_heap_table_size = 128M
max_allowed_packet = 64M
net_buffer_length = 16384
max_connect_errors = 10
concurrent_insert = 2
read_rnd_buffer_size = 786432
bulk_insert_buffer_size = 8M
query_cache_limit = 5M
query_cache_size = 128M
query_cache_type = 1
query_prealloc_size = 262144
query_alloc_block_size = 65535
transaction_alloc_block_size = 8192
transaction_prealloc_size = 4096
max_write_lock_count = 8
slow_query_log
log-error
external-locking=FALSE
open_files_limit=50000

[mysqld_safe]

[mysqldump]
quick
max_allowed_packet = 16M

[isamchk]
key_buffer = 384M
sort_buffer = 384M
read_buffer = 256M
write_buffer = 256M

[myisamchk]
key_buffer = 384M
sort_buffer = 384M
read_buffer = 256M
write_buffer = 256M

#### Per connection configuration ####
sort_buffer_size = 1M
join_buffer_size = 1M
thread_stack = 192K

 

Repair & optimize databases then restart MySQL:

mysqlcheck --check --auto-repair --all-databases
mysqlcheck --optimize --all-databases
/etc/init.d/mysql restart

 

Security & Limit Resources

 

Install CSF (ConfigServer Security & Firewall) at: http://configserver.com/free/csf/install.txt

1) Go to WHM » Plugins » ConfigServer Security & Firewall » “Check Server Security” And pass on what appears as required to repair:

2) Go to WHM » Plugins » ConfigServer Security & Firewall » “Firewall Configuration” and set the parameters according to your needs:

PT_USERMEM=180

PT_USERTIME=180

PT_USERKILL=1

PT_USERKILL_ALERT=1 (Optional)

 

Now enjoy your new fast and more effective server.

The post How To Optimise MySQL & Apache On cPanel/WHM first appeared on Shine Servers: Illuminating IT Solutions Since 2012.

]]>
https://www.shineservers.com/2014/03/31/optimise-mysql-apache-cpanelwhm/feed/ 0 2652
How To Change The Primary IP Address Of A WHM/cPanel Server https://www.shineservers.com/2014/03/04/change-primary-ip-address-whmcpanel-server/ https://www.shineservers.com/2014/03/04/change-primary-ip-address-whmcpanel-server/#respond Tue, 04 Mar 2014 21:20:01 +0000 http://blog.shineservers.com/?p=2431 Steps in WHM: Log into WHM and go to Basic cPanel & WHM Setup Change the Primary IP here with the option that says “The IP address (only one address) that will be used for setting up shared IP virtual hosts“ Note: This might not actually be necessary. Log in to SSH, and do the following: […]

The post How To Change The Primary IP Address Of A WHM/cPanel Server first appeared on Shine Servers: Illuminating IT Solutions Since 2012.

]]>
Steps in WHM:

  • Log into WHM and go to Basic cPanel & WHM Setup
  • Change the Primary IP here with the option that says “The IP address (only one address) that will be used for setting up shared IP virtual hosts
  • Note: This might not actually be necessary.

Log in to SSH, and do the following:

  1. Edit /etc/sysconfig/network-scripts/ifcfg-eth0
    • Change the IPADDR and GATEWAY lines to match the new IP and Gateway for the new ip
  2. Edit /etc/sysconfig/network
    • Change the GATEWAY line here if it does not exist in the ifcfg-* file.
  3. Edit /etc/ips
    • Remove the new primary IP from this file if it is present
    • Add the old primary IP to this file with the format <IP address>:<Net Mask>:<Gateway>
  4. Edit /var/cpanel/mainip
    • Replace the old primary IP with the new primary IP
  5. Edit /etc/hosts
    • Replace the old primary IP with the new one if needed. The hostname’s dnswill need to be updated too
  6. Restart the network service to make the new IP the primary
    • service network restart
    • Note: You’re probably going to be disconnected at this point, and have to log in to ssh using the new primary ip.
  7. Restart the ipaliases script to bring up the additional IPs
    • service ipaliases restart
  8. Run ifconfig and make sure all IPs show up correctly
  9. Update the cpanel license to the new primary IP
  10. Verify you can still log in to WHM and there is no license warning

The post How To Change The Primary IP Address Of A WHM/cPanel Server first appeared on Shine Servers: Illuminating IT Solutions Since 2012.

]]>
https://www.shineservers.com/2014/03/04/change-primary-ip-address-whmcpanel-server/feed/ 0 3108
How to Install ClamAV and Configure Daily Scanning on CentOS https://www.shineservers.com/2013/10/13/install-clamav-configure-daily-scanning-centos/ https://www.shineservers.com/2013/10/13/install-clamav-configure-daily-scanning-centos/#respond Sun, 13 Oct 2013 05:40:07 +0000 http://blog.shineservers.com/?p=357 ClamAV is an open source (GPL) antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats on Linux. In this article, we will only be configuring ClamAV to run scheduled/on-demand scans; not resident scans. A. Install ClamAV 1. Install EPEL repo Before we can do proceed, you must ensure that you have the […]

The post How to Install ClamAV and Configure Daily Scanning on CentOS first appeared on Shine Servers: Illuminating IT Solutions Since 2012.

]]>
ClamAV is an open source (GPL) antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats on Linux. In this article, we will only be configuring ClamAV to run scheduled/on-demand scans; not resident scans.

A. Install ClamAV

1. Install EPEL repo

Before we can do proceed, you must ensure that you have the EPEL yum repository enabled.

The EPEL repo is enabled by simply installing an RPM. Please use the command below to install the EPEL repository on your CentOS server.

CentOS 6 – 32-bit

 CentOS 6 – 64-bit

 CentOS 5 – 32-bit

 CentOS 5 – 64-bit

After running the above commands for your relevant CentOS version, the following file is created:

/etc/yum.repos.d/epel.repo

The above file can be edited directly to enable or disable the EPEL repo.

2. Install required packages
yum install clamav clamd
3. Start the clamd service and set it to auto-start
chkconfig clamd on
/etc/init.d/clamd start
4. Update ClamAV’s signatures
/usr/bin/freshclam

Note: ClamAV will update automatically, as part of /etc/cron.daily/freshclam.

B. Configure Daily Scan

In this example, we will configure a cronjob to scan the /home/ directory every day:

1. Create cron file:
vim /etc/cron.daily/manual_clamscan

Add the following to the file above. Be sure to change SCAN_DIR to the directory that you want to scan:

#!/bin/bash
SCAN_DIR="/home"
LOG_FILE="/var/log/clamav/manual_clamscan.log"

/usr/bin/clamscan -i -r $SCAN_DIR >> $LOG_FILE

Give our cron script executable permissions:

chmod +x /etc/cron.daily/manual_clamscan

You can even run the above script to ensure that it works correctly.

The post How to Install ClamAV and Configure Daily Scanning on CentOS first appeared on Shine Servers: Illuminating IT Solutions Since 2012.

]]>
https://www.shineservers.com/2013/10/13/install-clamav-configure-daily-scanning-centos/feed/ 0 357
Internet Protocol (IPv4) Subnet Chart https://www.shineservers.com/2013/10/02/internet-protocol-ipv4-subnet-chart/ https://www.shineservers.com/2013/10/02/internet-protocol-ipv4-subnet-chart/#respond Wed, 02 Oct 2013 15:09:01 +0000 http://blog.shineservers.com/?p=338 Ths is an Internet Protocol (IPv4) Subnet Chart. You can use this to quickly look up how your might need to subnet your network. At the bottom there is a quick how-to on calculating subnets. For more information on subnetting, see RFC 1817 and RFC 1812. Class address ranges: Class A = 1.0.0.0 to 126.0.0.0 Class B = […]

The post Internet Protocol (IPv4) Subnet Chart first appeared on Shine Servers: Illuminating IT Solutions Since 2012.

]]>
Ths is an Internet Protocol (IPv4) Subnet Chart. You can use this to quickly look up how your might need to subnet your network. At the bottom there is a quick how-to on calculating subnets.

For more information on subnetting, see RFC 1817 and RFC 1812.

Class address ranges:

  • Class A = 1.0.0.0 to 126.0.0.0
  • Class B = 128.0.0.0 to 191.255.0.0
  • Class C = 192.0.1.0 to 223.255.255.0

 

Reserved address ranges for private (non-routed) use (see RFC 1918):

  • 10.0.0.0 -> 10.255.255.255
  • 172.16.0.0 -> 172.31.255.255
  • 192.168.0.0 -> 192.168.255.255

 

Other reserved addresses:

  • 127.0.0.0 is reserved for loopback and IPC on the local host
  • 224.0.0.0 -> 239.255.255.255 is reserved for multicast addresses

 

Chart notes:

  • Number of Subnets – “( )” Refers to the number of effective subnets, since the use of subnet numbers of all 0s or all 1s is highly frowned upon and RFC non-compliant.
  • Number of Hosts – Refers to the number of effective hosts, excluding the network and broadcast address.

 

 

Class A

Network Bits Subnet Mask Number of Subnets Number of Hosts
/8 255.0.0.0 0 16777214
/9 255.128.0.0 2 (0) 8388606
/10 255.192.0.0 4 (2) 4194302
/11 255.224.0.0 8 (6) 2097150
/12 255.240.0.0 16 (14) 1048574
/13 255.248.0.0 32 (30) 524286
/14 255.252.0.0 64 (62) 262142
/15 255.254.0.0 128 (126) 131070
/16 255.255.0.0 256 (254) 65534
/17 255.255.128.0 512 (510) 32766
/18 255.255.192.0 1024 (1022) 16382
/19 255.255.224.0 2048 (2046) 8190
/20 255.255.240.0 4096 (4094) 4094
/21 255.255.248.0 8192 (8190) 2046
/22 255.255.252.0 16384 (16382) 1022
/23 255.255.254.0 32768 (32766) 510
/24 255.255.255.0 65536 (65534) 254
/25 255.255.255.128 131072 (131070) 126
/26 255.255.255.192 262144 (262142) 62
/27 255.255.255.224 524288 (524286) 30
/28 255.255.255.240 1048576 (1048574) 14
/29 255.255.255.248 2097152 (2097150) 6
/30 255.255.255.252 4194304 (4194302) 2

 

Class B

Network Bits Subnet Mask Number of Subnets Number of Hosts
/16 255.255.0.0 0 65534
/17 255.255.128.0 2 (0) 32766
/18 255.255.192.0 4 (2) 16382
/19 255.255.224.0 8 (6) 8190
/20 255.255.240.0 16 (14) 4094
/21 255.255.248.0 32 (30) 2046
/22 255.255.252.0 64 (62) 1022
/23 255.255.254.0 128 (126) 510
/24 255.255.255.0 256 (254) 254
/25 255.255.255.128 512 (510) 126
/26 255.255.255.192 1024 (1022) 62
/27 255.255.255.224 2048 (2046) 30
/28 255.255.255.240 4096 (4094) 14
/29 255.255.255.248 8192 (8190) 6
/30 255.255.255.252 16384 (16382) 2

 

Class C

Network Bits Subnet Mask Number of Subnets Number of Hosts
/24 255.255.255.0 0 254
/25 255.255.255.128 2 (0) 126
/26 255.255.255.192 4 (2) 62
/27 255.255.255.224 8 (6) 30
/28 255.255.255.240 16 (14) 14
/29 255.255.255.248 32 (30) 6
/30 255.255.255.252 64 (62) 2

Supernetting (CIDR) Chart

  • CIDR – Classless Inter-Domain Routing.
  • Note: The Number of Class C networks must be contiguous.
    For example, 192.169.1.0/22 represents the following block of addresses:
    192.169.1.0, 192.169.2.0, 192.169.3.0 and 192.169.4.0.

Class C

CIDR Block Supernet Mask Number of Class C Addresses Number of Hosts
/14 255.252.0.0 1024 262144
/15 255.254.0.0 512 131072
/16 255.255.0.0 256 65536
/17 255.255.128.0 128 32768
/18 255.255.192.0 64 16384
/19 255.255.224.0 32 8192
/20 255.255.240.0 16 4096
/21 255.255.248.0 8 2048
/22 255.255.252.0 4 1024
/23 255.255.254.0 2 512

The post Internet Protocol (IPv4) Subnet Chart first appeared on Shine Servers: Illuminating IT Solutions Since 2012.

]]>
https://www.shineservers.com/2013/10/02/internet-protocol-ipv4-subnet-chart/feed/ 0 338