- How do I log into my Linux or FreeBSD server through SSH?
- How do I log into my Windows server through Remote Desktop?
- How do I determine what Software is installed on the server?
- How do I change server wide PHP settings on my server?
- Can I run a custom version of PHP on my Linux server?
- How do I update packages on my Debian server?
- How do I update packages on my RedHat server?
- How do I configure Windows Firewall?
- How do I configure firewall rules on RedHat, CentOS or Fedora?
- How do I see what processes are running on my Linux server?
- How do I see what processes are running on my Windows server?
- How do I set up a scheduled task on a Linux server without Plesk?
- How do I check the disk space usage on my Linux or FreeBSD server?
- How do I view all of the processes running in MySQL on my Linux server?
- What are some basic Linux commands that will help me navigate my server through SSH?
- How can I reboot my server?
1. How do I log into my Linux or FreeBSD server through SSH?
If the computer you are logging in from is running Windows or Mac, you can download one of several free SSH programs which are widely available. In order to connect, the program will ask you for a Hostname or IP, Username and Password. This information would have been sent to you through email when your server was initially set up. If you do not have this information, please contact support.
For those using Linux and FreeBSD workstations allow you to establish an SSH connection from the command line, using the syntax ‘ssh username@hostname'.
2. How do I log into my Windows server through Remote Desktop?
In order to log into your Windows server using Remote Desktop, you must have a Remote Desktop capable workstation. Most versions of Windows have a program installed called ‘Remote Desktop Connection'. If installed, it is usually located within ‘Start > All Programs > Accessories'. When launched, the program will ask you for a ‘Computer Name” to connect to. Simply enter the hostname or IP address of your server and click ‘Connect'.
If you are connecting from a Linux workstation, you can use the Linux based Remote Desktop client called ‘rdesktop'. If it is installed on the system, it can be run from the command line using the syntax ‘rdesktop <hostname or IP address>'. You can also run ‘rdesktop –h' to see a full list of options which can be used.
3. How do I determine what Software is installed on the server?
In Windows, you can see what software is installed on your server by logging in through Remote Desktop and viewing the list under ‘Control Panel -> Add/Remove Programs'
For servers which are running RedHat, CentOS or Fedora, you can see which packages are installed by logging by logging into your server through SSH and running the command: rpm -q –a
To see which packages are installed on a Debian or Ubuntu server, log in through SSH and run the command: dpkg -l'
If you are using a FreeBSD, OpenBSD or NetBSD server, you can see which packages are installed by logging in through SSH and running: pkg_info
4. How do I change server wide PHP settings on my server?
You can customize your server's PHP settings by editing a file called php.ini. Open the file in a text editor and make your changes before saving.
On Linux servers, the location of the php.ini file can vary, but is usually found in /etc. You should restart Apache after making changes to php.ini so the settings will take effect.
On Windows servers, the location of php.ini varies frequently, but is often found under C:\PHP or C:\WINDOWS. You may need to Search for it. After modifying the file with a text editor, you should restart IIS after making any changes to php.ini.
5. Can I run a custom version of PHP on my Linux server?
Yes. We recommend leaving the globally installed instance of PHP in tact, as altering the globally installed instance may cause dependency problems with other software, as well as future updates released for your Linux distributed.
If you require a version of PHP which is not included in the Linux distributions repository, it is recommended that you compile PHP from source as a CGI and install it on a per site basis. This can be done by placing the PHP binary and a copy of php.ini into a sites CGI directory and creating an .htaccess file to tell the server to use the custom PHP binary instead of the PHP module which is installed by default. The following is an example .htaccess entries which would cause a site to load:
AddHandler php-cgi .html
Action php-cgi /cgi-bin/php
Please note, the above instructions are not applicable for Linux servers which use CPanel. CPanel has its own built in method for customizing and installing alternate versions of PHP through its web interface.
6. How do I update packages on my Debian server?
In order to update packages on a Debian server, you will need log in through SSH and confirm the /etc/apt/sources.list file is tuned for the distribution of Debian that you are using. For example, if you are running Debian 5.0 (lenny), the sources.list file should contain the following:
deb http://ftp.debian.org/debian/ lenny main contrib non-free
deb-src http://ftp.debian.org/debian/ lenny main contrib non-free
deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free
If you are running Debian 4.0 (etch), the sources.list file should contain the following:
deb http://ftp.debian.org/debian/ etch main contrib non-free
deb-src http://ftp.debian.org/debian/ etch main contrib non-free
deb http://security.debian.org/ etch/updates main contrib non-free
deb-src http://security.debian.org/ etch/updates main contrib non-free
After verifying that your sources.list file is configured properly, you can install updates by running the following commands, while logged in through SSH as a user with administrative privileges:
apt-get update
apt-get upgrade
7. How do I update packages on my RedHat server?
Under most circumstances, servers hosted in our datacenters are preconfigured to receive updates automatically. However, you can manually check for and install updates on RedHat Enterprise Linux servers using one of the following methods, depending on your version of RedHat. You can check which version you are running by logging into the server through SSH and running ‘cat /etc/redhat-release'. In order to install updates, you will need to be logged into the server through SSH as a root level user.
If the server is running RedHat Enterprise Linux version 4 and below, you can run ‘up2date –l' to list available updates and ‘up2date –u' to install all available updates. If you just want to update one package, you can use the syntax ‘up2date –u <package_name>'
For Redhat Enterprise Linux version 5 and above, the ‘yum check-update' command will provide a list of available updates. All of the updates can be installed using ‘yum update', or individual updates can be installed using ‘yum update <package_name>'.
8. How do I configure Windows Firewall?
The Windows Firewall is an important line of defense against intruders. It allows you to restrict access to all ports on the server and allow exceptions for ports that are generally publicly accessible, such as HTTP, or services you may want to restrict to specific IP addresses, such as Remote Desktop.
The firewall settings in Windows 2003 can be found by clicking ‘Start -> Control Panel -> Windows Firewall'. You can then toggle whether the firewall is enabled or disabled. To set up rules to completely allow access to ports, or only allow access to ports from certain IP addresses.
In Windows 2008, the firewall settings are found under ‘Start -> Control Panel -> Administrative Tools -> Windows Firewall'. You can then right-click ‘Inbound Rules' and select ‘New Rules'. You will then be prompted for the ‘Protocol Type', ‘Local Port' and ‘Remote Port'. The following example would allow HTTP traffic into your server:
Protocol Type: TCP
Local Port: 80
Remote Port: All Ports
9. How do I configure firewall rules on RedHat, CentOS or Fedora?
You can configure iptables rules to accept, reject and drop traffic, as well as many other operations by editing the file ‘/etc/sysconfig/network/iptables'. After saving the file, you will need to run ‘/etc/init.d/iptables restart'. You can also turn off the firewall by running ‘/etc/init.d/iptables stop'.
10. How do I see what processes are running on my Linux server?
You can see information about processes running on your Linux server by logging in through SSH and running the ‘ps' or ‘top' command.
The command ‘ps xauww' will print out a list of all the processes running on the server.
Running ‘top' will show you a list of processes running on the server. The list is updated every three seconds by default, but this can be increased or decreased with a command line argument. The command ‘top –d 1' will show a list of processes which is updated at one second intervals. The top interface allows you to sort the list by various conditions. While viewing processes, typing a capital ‘M' while sort the list by memory usage.
For more information about using ‘ps' and ‘top', you can read the manuals by typing ‘man ps' or ‘man top'
11. How do I see what processes are running on my Windows server?
Active processes can be seen with Task Manager. Right-click on the taskbar and you will see an option to open Task Manager. Click Processes to see which processes are running on your server.
12. How do I set up a scheduled task on a Linux server without Plesk?
To schedule a system task in Linux, log into the server through SSH with the user that the task will be running as. Once you are logged into the system, run the ‘crontab –e' command.
This will bring up an editor which will allow you to enter the scheduled task, also known as a crontab entry. A crontab entry consists of six different fields in the following order:
minute, hour, day of month, month, day of week, command
Here is an example of an entry that prints out the disk space usage and emails it to an address every Sunday at 5 minutes after midnight:
5 0 * * sun /bin/df | mail email@example.com
Here is another example that would run the command fifteen minutes after the hour every hour of every day:
15 * * * * /bin/df | mail email@example.com
Instead of using the first five fields, the following strings will also work:
@hourly (Runs the command hourly , like “0 * * * *”)
@weekly (Runs the command weekly, like “0 0 ** sun”)
@daily (Runs the command daily, like “0 0 * * *”)
@monthly (Runs the command monthly, like “0 0 1 * *”)
@yearly (Runs the command annually, like “0 0 1 1 *”)
Once you have entered the crontab entry into the editor and save it, the task will be scheduled. For further explanations and to read more about crontab, type the following commands to access the manual:
man 5 crontab
13. How do I check the disk space usage on my Linux or FreeBSD server?
You can check the disk space usage on a Linux or FreeBSD server by running the ‘df –h' command. It will list the total size, used space, available space and percentage used for each partition. For further explanation of the ‘df' command, you can read the manual by typing ‘man df'.
14. How do I view all of the processes running in MySQL on my Linux server?
You can view all of the processes running in MySQL by logging into your server through SSH and running the following command:
mysqladmin –u <root or admin user> -p processlist
Generally the MySQL admin username is ‘root'. If you are running Plesk on your server, the MySQL username is ‘admin'. After entering the password, the list of processes will be printed to your screen. If you do not have a password set for the user, the ‘-p' flag should be excluded.
15. What are some basic Linux commands that will help me navigate my server through SSH?
The following a list of commands commonly used for navigation, file manipulation and process viewing. To read more information and find out the specific syntax for a particular commands, you can use the ‘man' command. For example, to read the manual for the ‘ls' command, type ‘man ls'.
- ls (lists files)
- cd (changes directories)
- pwd (shows current working directory)
- mkdir (makes a directory)
- cp (copies files or directories)
- mv (moves a file or directory)
- rm (removes files or directories)
- chmod (changes file permissions)
- chown (change file ownership)
- file (determines the type of a file)
- cat (prints contents of a text file)
- vi (edit a text file)
- ps (view processes)
16. How can I reboot my server?
To reboot a Linux server, you must access the server via SSH with a root user then issue the command: 'reboot'. Please note, this will stop all services on the server and you will be disconnected from your SSH session. If the reboot was successful, you should be able to log back into your server and run the command 'uptime' to view how long the server has been up since the reboot.
To reboot a Windows server, you must access the server via ‘Remote Desktop Connection' with an administrative user and perform a restart through the Windows Start menu. This option can be accessed by clicking on the ‘Start > Shutdown'. Make sure that ‘Restart' is selected in the pull-down menu. In order to proceed further in some versions of Windows, if the ‘OK' button is grayed out, you may need to enter a comment or select a reason for the restart. Click the ‘OK' button. All services for Windows will begin to shutdown and the server will restart. Please note that your Remote Desktop Connection will be disconnected and any other users logged in will also be logged off and may lose all unsaved data.
If you encounter a problem while rebooting your server, or if you would like one of our Managed Support representatives to perform the reboot for you, please submit a ticket request using our Account Manager (SiteControl) or contact the Technical Support number listed in the Account Manager interface under the Support section. If you are requesting the reboot by telephone, please be ready to provide your Customer ID and password.














