Yum Updates

Task: List all installed packages

List all installed packages, enter:
# rpm -qa
# yum list installed
Find out if httpd package installed or not, enter:
# rpm -qa | grep httpd*
# yum list installed httpd

Task: Check for and update specified packages

# yum update {package-name-1}

Task: Install the specified packages [ RPM(s) ]

Install package called httpd:
# yum install {package-name-1} {package-name-2}
# yum install httpd

Task: Remove / Uninstall the specified packages [ RPM(s) ]

Remove package called httpd, enter:
# yum remove {package-name-1} {package-name-2}
# yum remove httpd

Task: Display the list of available packages

# yum list all

Task: Display list of group software

Type the following command:
# yum grouplist

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Finding out what version of PHP you have

Different versions of PHP may have different default settings, and in the case of newer versions might have new functions. If you can’t get something to work, and think it might be because you have the wrong version of PHP there is a simple way to check. Simply running the phpinfo () function will not only tell you your PHP version but an abundance of information about all your PHP settings. Here is an example:

<?php phpinfo() ?>

Just put that single line of code in a PHP file, and run it on your server. That’s it! By running the file you should have all of the PHP information you need.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

HOW TO: Install PECL APC Cache on CentOS

The Alternative PHP Cache (APC) is an op-code pre-compiler and a cache system that can boost the performance of a PHP application up to 10 times. Op-code caches are very effective for a Drupal website, since Drupal deals with large number of source files and time spent in parsing them significantly affects performance. However, if you don’t have XAMPP and need to install it on CentOS, you can follow this to get around some of the problems that happen with the default server settings. h2. Install Pre-reqs Using yum install the required prerequisites.


sudo yum install php-devel php-pear httpd-devel

Install APC

Use the command


sudo pecl install apc

at this point you’ll likely see the error


Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 92160 bytes) in /usr/share/pear/PEAR/PackageFile/v2/Validator.php on line 1831

Apparantly, the PECL/PEAR scripts do not use the settings from /etc/php.ini so you need to update PEAR’s memory settings to give is some more breathing room. Edit the file /usr/share/pear/pearcmd.php and add the following at the beginning:

@ini_set('memory_limit', '16M');

Configure/Restart

Now configure PHP to use the new extension. Create the file /etc/php.d/apc.ini and in that file put:

extension=apc.so

Now restart apache

sudo /etc/init.d/httpd graceful

Maintenance

In the future, if new versions of APC are released, you can easily upgrade them using

sudo pecl upgrade apc
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Ipconfig

Ipconfig

Syntax

ipconfig [/all] [/renew [Adapter]] [/release [Adapter]] [/flushdns] [/displaydns] [/registerdns] [/showclassid Adapter] [/setclassid Adapter [ClassID]]

Parameters

/all : Displays the full TCP/IP configuration for all adapters. Without this parameter, ipconfig displays only the IP address, subnet mask, and default gateway values for each adapter. Adapters can represent physical interfaces, such as installed network adapters, or logical interfaces, such as dial-up connections.

/renew [ Adapter ] : Renews DHCP configuration for all adapters (if an adapter is not specified) or for a specific adapter if the Adapter parameter is included. This parameter is available only on computers with adapters that are configured to obtain an IP address automatically. To specify an adapter name, type the adapter name that appears when you use ipconfig without parameters.

/release [ Adapter ] : Sends a DHCPRELEASE message to the DHCP server to release the current DHCP configuration and discard the IP address configuration for either all adapters (if an adapter is not specified) or for a specific adapter if the Adapter parameter is included. This parameter disables TCP/IP for adapters configured to obtain an IP address automatically. To specify an adapter name, type the adapter name that appears when you use ipconfig without parameters.

/flushdns : Flushes and resets the contents of the DNS client resolver cache. During DNS troubleshooting, you can use this procedure to discard negative cache entries from the cache, as well as any other entries that have been added dynamically.

/displaydns : Displays the contents of the DNS client resolver cache, which includes both entries preloaded from the local Hosts file and any recently obtained resource records for name queries resolved by the computer. The DNS Client service uses this information to resolve frequently queried names quickly, before querying its configured DNS servers.

/registerdns : Initiates manual dynamic registration for the DNS names and IP addresses that are configured at a computer. You can use this parameter to troubleshoot a failed DNS name registration or resolve a dynamic update problem between a client and the DNS server without rebooting the client computer. The DNS settings in the advanced properties of the TCP/IP protocol determine which names are registered in DNS.

/showclassid Adapter : Displays the DHCP class ID for a specified adapter. To see the DHCP class ID for all adapters, use the asterisk (*) wildcard character in place of Adapter. This parameter is available only on computers with adapters that are configured to obtain an IP address automatically.

/setclassid Adapter [ ClassID ] : Configures the DHCP class ID for a specified adapter. To set the DHCP class ID for all adapters, use the asterisk (*) wildcard character in place of Adapter. This parameter is available only on computers with adapters that are configured to obtain an IP address automatically. If a DHCP class ID is not specified, the current class ID is removed.

/? : Displays help at the command prompt.
Examples

To display the basic TCP/IP configuration for all adapters, type:

ipconfig

To display the full TCP/IP configuration for all adapters, type:

ipconfig /all

To renew a DHCP-assigned IP address configuration for only the Local Area Connection adapter, type:

ipconfig /renew “Local Area Connection”

To flush the DNS resolver cache when troubleshooting DNS name resolution problems, type:

ipconfig /flushdns

To display the DHCP class ID for all adapters with names that start with Local, type:

ipconfig /showclassid Local*

To set the DHCP class ID for the Local Area Connection adapter to TEST, type:

ipconfig /setclassid “Local Area Connection” TEST

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Tracert

Syntax

tracert [-d] [-h MaximumHops] [-j HostList] [-w Timeout] [TargetName]
Parameters

-d : Prevents tracert from attempting to resolve the IP addresses of intermediate routers to their names. This can speed up the display of tracert results.

-h MaximumHops : Specifies the maximum number of hops in the path to search for the target (destination). The default is 30 hops.

-j HostList : Specifies that Echo Request messages use the Loose Source Route option in the IP header with the set of intermediate destinations specified in HostList. With loose source routing, successive intermediate destinations can be separated by one or multiple routers. The maximum number of addresses or names in the host list is 9. The HostList is a series of IP addresses (in dotted decimal notation) separated by spaces.

-w Timeout : Specifies the amount of time in milliseconds to wait for the ICMP Time Exceeded or Echo Reply message corresponding to a given Echo Request message to be received. If not received within the time-out, an asterisk (*) is displayed. The default time-out is 4000 (4 seconds).

TargetName : Specifies the destination, identified either by IP address or host name.

-? : Displays help at the command prompt.

Examples

To trace the path to the host named corp7.microsoft.com, type:

tracert corp7.microsoft.com

To trace the path to the host named corp7.microsoft.com and prevent the resolution of each IP address to its name, type:

tracert -d corp7.microsoft.com

To trace the path to the host named corp7.microsoft.com and use the loose source route 10.12.0.1-10.29.3.1-10.1.44.1, type:

tracert -j 10.12.0.1 10.29.3.1 10.1.44.1 corp7.microsoft.com

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Debugging SMTP Mail Issues

When you are trying to troubleshoot SMTP delivery issues and using Microsoft IIS SMTP Service make sure you turn on logging which surprisingly is not the default. It can be done in three easy steps using IIS manager. Notepad is a required tool for viewing them.

Step 1 – Enable logging

Debugging SMTP

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Using Solid-State Drives

The use of solid-state drives makes a server significantly faster. But not all vendor SSD’s intel-x25-ssdare created equal. We want to give you a tip. Intel drives have proven to be the most reliable. We have tried several others, few with the same performance and so far none with the same trouble free history.  From time-to-time we had some arrive dead from other vendors.

There are just a few data centers that have explored SSD in servers.  It certainly cuts down on electrical use. Each watt saved on a hard drive is one less watt that is used for cooling as well.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Windows IP Commands

Display Connection Configuration: ipconfig /all

Display DNS Cache Info: ipconfig /displaydns

Clear DNS Cache: ipconfig /flushdns

Release All IP Address Connections: ipconfig /release

Renew All IP Address Connections: ipconfig /renew

Re-Register the DNS connections: ipconfig /registerdns

Change/Modify DHCP Class ID: ipconfig /setclassid

Network Connections: control netconnections

Network Setup Wizard: netsetup.cpl

Test Connectivity: ping www.whatismyip.com

Trace IP address Route: tracert

Displays the TCP/IP protocol sessions: netstat

Display Local Route: route

Display Resolved MAC Addresses: arp

Display Name of Computer Currently on: hostname

Display DHCP Class Information: ipconfig /showclassid

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Cloud Computing

One thing that’s come up in a lot of conversations with clients shopping for a hosting solution is the idea of cloud computing. A lot of people are interested in it and they wonder if that is not the solution they are looking for instead of a dedicated server.

As evidence to the confusion articles on the Internet that explain cloud computing make any number of poor comparisons.cloud-question

For example, is the following statement correct about cloud computing?

In a cloud computing system, there’s a significant workload shift. Local computers no longer have to do all the heavy lifting when it comes to running applications.

Yes it could be true but that is also true of good old-fashioned client/server computing.  In fact the vast majority of all definitions seem to fit both equally well. The current buzz word “cloud computing” may be the rage but it is fuzzier than ever and seems more about marketing differences than network design.

Since when has one cared before “cloud computing” about where the data that you store is or the application that you run? Most users don’t even care or know if they are hosting on a Linux or Windows server just as long as it works.

Cloud computing is built around the idea of almost limitless resource. In the past if you were a virtual customer sharing a machine and your website became so large, popular or otherwise a very heavy user of resources the hosting company would direct you to use a dedicated machine. So scaling up would be a “cloud” advantage. On the other hand, it is a very minor advantage as that happens on only rare occasions.  Also, with the use of modern control panel software it is often just a few button clicks to transfer a website and all the associated services to not just another and larger machine on a data center but to any server on any appropriate network anywhere in the world.

Our own concerns at SecureWebs are predicated in the downside of cloud computing – the concept of putting all your eggs in one basket. The type of outages or data loss that we hear about once in awhile now days are because of cloud computing and are of a huge scale. In other words, if you have lots of servers running off one network area storage unit and you loose that unit you could bring down dozens or even hundreds of servers.  So do you build lots of stand-alone servers of different sizes for difference needs and practice the art of replacing each one should any software or hardware failure occur or do you build a very large array of servers to do the same thing?

You know you’re old when something that was once a revolution is no longer trendy. Most of us were a part of the PC revolution where each worker has their own private processing power (workstation) and we make decisions on our preferred applications.  Given more time it might occur to all these cloud computer article authors that the metaphor for the cloud is very similar to main frame computing from yesteryear where computing time was controlled by the IT staff and you had limited flexibility in changing anything in the computing environment. Not a perfect analogy but cloud computing does remind one of the “bad old days.”  Live long enough and everything comes full-circle again.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)