Nov 18th, 2011
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.
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.
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:
Count the rows in a table
A simple query to count the number of rows (entries) in a table would look like:
Show all data in a table
To list absolutely every entry in a table, run:
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.
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
Will cause the Perl interpreter to check your script for syntax errors.
Running it without the syntax check options:
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.
Using ntpdate command
The ntpdate command will sync your clock with an NTP server
The ntpdate command will not run when the NTP server is running, if you run then it says the NTP socket is in use, exiting.
Stop NTP and then run ntpdate
Reference: http://support.ntp.org/bin/view/Support/GettingStarted
htpasswd - Manage user files for basic authentication
htpasswd is used to create and update the flat-files used to store usernames and password for basic authentication of HTTP users. If htpasswd cannot access a file, such as not being able to write to the output file or not being able to read the file in order to update it, it returns an error status and makes no changes.
Resources available from the Apache HTTP server can be restricted to just the users listed in the files created by htpasswd. This program can only manage usernames and passwords stored in a flat-file. It can encrypt and display password information for use in other types of data stores, though. To use a DBM database see dbmmanage.
htpasswd encrypts passwords using either a version of MD5 modified for Apache, or the system’s crypt() routine. Files managed by htpasswd may contain both types of passwords; some user records may have MD5-encrypted passwords while others in the same file may have passwords encrypted with crypt().
-m Use MD5 encryption for passwords.
-c Create the passwdfile. If passwdfile already exists, it is rewritten and truncated.
EXAMPLES
Adds or modifies the password for user jsmith. The user is prompted for the password.