Windows: How to change Windows RDP Port Number

To change your Windows RDP (Remote Desktop Protocol) port number to other,

1. Open Registry Editor,

C:\> regedit

2. Navigate to,

HKEY_LOCAL_MACHINE -> System -> CurrentControlSet -> Control ->Terminal Server -> WinStations -> RDP-Tcp

3. Look at “Port number” and select Decimal.

4. Change to any number that you need and perform a reboot if it is not apply immediately.

Howto: Change Windows Server 2003 RDP Port

By default, Windows Terminal Server and Remote Desktop Protocol (RDP) listen on TCP port 3389.

To change the port to your custom port, you may refer to below:-

1. Open the registry editor.
2. Navigate to,

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp

3. Find the “PortNumber” and change to your needed port.

To be secure, reboot your server to apply new port.

Understand Linux runlevels

runlevels is the term that the mode of operation running in one of the computer operating system that running with Unix box.

With runlevels, it determine what should be running from the system boot or operation. runlevel is typically come with level 0-6 though it do have 0-9 or 0-10 and even S as a level.

Typical Linux runlevel come with code below,
0 – Halt
1 – Single-User mode
2 – Multi-User mode
3 – Multi-User mode with networking
4 – Not used/user definable
5 – Start from system normally with appropriate display manager
6 – ┬áReboot

How to convert cPanel to CloudLinux

CloudLinux which used to promise to improve server stability, increase server density, decrease support costs and compatibility.

If you are using cPanel and would like to convert to CloudLinux, use the step as below.

1. First of all, you shall use at least CentOS 5 and above.
2. Get the license key from cPanel or CloudLinux.
3. Run the command as below from SSH.

# wget
# sh cpanel2cl -k
# reboot
# /scripts/easyapache --build

Increase Maximum open file in Linux

It is important for a production server to set the maximum open file limit as you might get over limit on your web services, database services, email services, and etc.

First of all, you may list the maximum of open file limit as command below.
cat /proc/sys/fs/file-max

Then you may increase the file description limit as command below.
sysctl -w fs.file-max=150000

The above command force the kernel to limit the maximum open file limit but you will need to perform the change from /etc/sysctl.conf in case the setting change after a reboot.
vi /etc/sysctl.conf

Append the setting as below.
fs.file-max = 150000

Then save it and run the command as below.
sysctl -p

Disable Windows Restart after Windows Update

By default, when your Windows Update done, it will request for a reboot and the annoyed prompt will prompted all the time.

Although it allow you to select remind me in 10 minutes, 1 hour and 4 hours, but sometimes when you are running a server, it is not suitable to reboot for some peak hours.

3 Options is available to disable such alert all the time.

Option 1:
Open the Run Command and enter cmd to enter to the command prompt.

Enter the command below and press enter.
net stop wuauserv

However this option only a temporary solution where the services might restarted again if you set it to automatically mode.

Option 2:
You may disable Windows Update by using Group Policies. However some version of Windows do not offer for such feature.

Go to the Run command and type gpedit.msc to enter to the Group Policies. Use the left sidebar to navigate to Computer Configuration > Administrative Templates > Windows Components > Windows Update.

Locate the No auto-restart with logged on users for scheduled automatic updates installations. Right-click the entry and select Edit from the menu. This opens a new window. Select Enable to activate the option.

Option 3:
Configuring it through Windows Registry. Go to Run command and type regedit and press enter. Locate to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU or create it if it is not exist.

Create a New Dword (32-bit) and name it NoAutoRebootWithLoggedOnUsers. Set the value to 1 to turn the feature on. This feature is already enabled in Windows 7 which is why Windows 7 users do not need it. Windows XP users on the other hand get an option to postpone the updates.

Update Centos Linux 5.4 to Centos Linux 5.5

As you know, CentOS released version 5.5 and if you are using Centos Linux 5.4, you may actually upgrade it directly through your machine through the Internet with yum command.

To upgrade Centos version, you should take this 2 major steps.
1. Make a Backup.
2. Update package.

1. Make a backup
It is important to make a backup before you do any upgrade or installation. I will suggest you to have a full backup of your machine before doing the upgrade in case anything happen.

Make sure you have all of the data and database backup!

2. Update package
i) To upgrade your Centos, you may use yum command to upgrade it directly. However, you may try to check any update list available.
yum list updates

ii) You may update Centos as command below.
yum update

iii) Reboot your machine

iv) verify if everything working
uname -a
netstat -tulpn
tail -f /var/log/messages
cat /etc/redhat-release

Remove Grub from your Box

I just faced this problem a moment ago, I have removed my Linux Operating System(Ubuntu) from my partition where I applied dual boot Operating System previously.

Somehow, I were removed the partition through disk management from Windows Vista and the error as below found once rebooted the box.

Grub Error,

Error 17.

If you get the same error and could like to removed Grub. Use the step as below.

Continue reading Remove Grub from your Box

Reboot Server within a network in Windows Platform

Do you ever try to reboot or shut down a server/PC within a network?

The mystery from Microsoft have done if you are running with administrator role, just try to the command as below if you could like to reboot/shutdown.

1. Open command prompt by Press Windows+R and type in cmd.
2. Type in “shutdown /m \\computername /r” if you could like to reboot.

The General format was as below:

shutdown \\computername /l /a /r /t:xxmsg” /y /c

  • \\computername: Use this switch to specify the remote computer to shut down. If you omit this parameter, the local computer name is used.
  • /l (Note that this is a lowercase “L” character): Use this switch to shut down the local computer
  • /a: Use this switch to quit a shutdown operation. You can do this only during the time-out period. If you use this switch, all other parameters are ignored.
  • /r: Use this switch to restart the computer instead of fully shutting it down.
  • /t:xx: Use this switch to specify the time (in seconds) after which the computer is shut down. The default is 20 seconds.
  • msg: Use this switch to specify a message during the shutdown process. The maximum number of characters that the message can contain is 127.
  • /y: Use this switch to force a “yes” answer to all queries from the computer.
  • /c: Use this switch quit all running programs. If you use this switch, Windows forces all programs that are running to quit. The option to save any data that may have changed is ignored. This can result in data loss in any programs for which data is not previously saved.

Within the above description you may force all of the query and etc from the command to reboot/shutdown a server/PC.

Have fun.

Article from: