Archive for the 'Linux Support' Category

SBDavid

PXE Installation

Prepare for a PXE installation

The following steps must be performed to prepare for a PXE installation:

Configure the network (NFS, FTP, HTTP) server to export the installation tree.
Configure the files on the tftp server necessary for PXE booting.

Configure which hosts are allowed to boot from the PXE configuration.
Start the tftp service.
Configure DHCP.
Boot the client, and start the installation.

SBDavid

RPM verification

RPM verification

To display a list of all keys installed for RPM verification run rpm -qa

The output will look similar to the following:

[centos@centos ~]$ sudo rpm -qa gpg-pubkey*
gpg-pubkey-c105b9de-4e0fd3a3
gpg-pubkey-6b8d79e6-3f49313d
[centos@centos ~]$

To check the details run rpm -qi

[centos@centos ~]$ rpm -qi gpg-pubkey-c105b9de-4e0fd3a3
Name : gpg-pubkey Relocations: (not relocatable)
Version : c105b9de Vendor: (none)
Release : 4e0fd3a3 Build Date: Fri 04 Nov 2011 09:37:15 PM IST
Install Date: Fri 04 Nov 2011 09:37:15 PM IST Build Host: localhost
Group : Public Keys Source RPM: (none)
Size : 0 License: pubkey
Signature : (none)
Summary : gpg(CentOS-6 Key (CentOS 6 Official Signing Key) )
Description :

If the GPG key verifies successfully, the command returns gpg OK

[centos@centos ~]$ rpm -K ./Downloads/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
./Downloads/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm: (sha1) dsa sha1 md5 gpg OK
[centos@centos ~]$
SBDavid

How do I disable IPv6?

How do I disable IPv6?

Redhat recommends not disabling the ipv6 module, as that can cause issues with SELinux and other components, but adding the following to /etc/sysctl.conf will disable IPv6.

net.ipv6.conf.all.disable_ipv6 = 1
SBDavid

Mysql Tables

Mysql Tables

Each database will contain one or more tables once an application starts storing data in it. The application should usually be what creates tables and modifies them.

List tables

Use the “show tables” command to list the tables in a database:

SHOW TABLES FROM databasename;

Count the rows in a table

A simple query to count the number of rows (entries) in a table would look like:

SELECT COUNT(*) FROM databasename.tablename;

Show all data in a table

To list absolutely every entry in a table, run:

SELECT * FROM databasename.tablename;

Note that this will usually be a huge result. You can list just the fields you want to view from each entry by listing them in place of “*” above, separating them with commas.

SBDavid

Premature End Of Script Headers

Premature End Of Script Headers

Where to check for errors

Check domain/apache error log file.
Check /var/log/apache/suexec.log file that should give a solution.

http://httpd.apache.org/docs/current/suexec.html

Upload your script is ASCII mode

Upload your Perl script in ASCII mode.
Set the permission of the file to 755, which allows the script to be executed by everybody.

Tracking Errors in the Script

perl -wc helloworld.pl

Will cause the Perl interpreter to check your script for syntax errors.

Running it without the syntax check options:

perl -w helloworld.pl

If something strange has gone wrong with your program and youre not sure where you should look for help, try the -w switch first.

It will often point out exactly where the trouble is.

« Prev - Next »