Thursday, April 7, 2011
Unable to start MySQl
110407 00:32:13 mysqld started
110407 0:32:14 InnoDB: Error: cannot allocate 3221241856 bytes of
InnoDB: memory with malloc! Total allocated memory
InnoDB: by InnoDB 37679104 bytes. Operating system errno: 12
InnoDB: Check if you should increase the swap file or
InnoDB: ulimits of your operating system.
InnoDB: On FreeBSD check you have compiled the OS with
InnoDB: a big enough maximum process size.
InnoDB: Note that in most 32-bit computers the process
InnoDB: memory space is limited to 2 GB or 4 GB.
InnoDB: We keep retrying the allocation for 60 seconds...
InnoDB: Fatal error: cannot allocate the memory for the buffer pool
110407 0:33:17 [ERROR] /usr/sbin/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
110407 0:33:17 [ERROR] /usr/sbin/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
110407 0:33:17 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
I tried to remove the /etc/my.cnf. Always remember to back up the file first :). When i tried to start again the MySQL service still getting the errors. I tried to find some solutions in the web but i cannot find any related problems. I tried to set again the mysql configuration file. And when i tried to start MySQL and kaboom it started. hehehe.. I don't know why but i am able to start the MySQL :)
When i was starting the server i am seeing some weird logs before the MySQl started.
[root@TESTING01 etc]# service mysql start
/usr/bin/my_print_defaults: unknown option '--use-mysqld_safe'
/usr/bin/my_print_defaults: unknown option '--use-mysqld_safe'
Starting MySQL...... [ OK ]
[root@TESTING01 etc]# tail -f /var/lib/mysql/
Friday, July 25, 2008
PHP Compilation Errors and Solutions.
---------------------------
checking for bison version... invalid
configure: warning: bison versions supported for regeneration of the Zend/PHP parsers: 1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 (found: none).
checking for flex... lex
checking for yywrap in -ll... no
checking lex output file root... ./configure: line 3276: lex: command not found
solution: flex-2.5.4a-33.i386.rpm
---------------------------
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.
solution: libxml2-devel-2.6.16-6.i386.rpm
---------------------------
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for fabsf... yes
checking for floorf... yes
configure: error: libjpeg.(a|so) not found.
solution:libjpeg-devel-6b-33.i386.rpm
---------------------------
checking for jpeg_read_header in -ljpeg... yes
configure: error: libpng.(a|so) not found.
libpng-devel-1.2.7-1.el4.2.i386.rpm
---------------------------
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=
configure: error: freetype2 not found!
Solution: up2date freetype-devel
---------------------------
checking for LDAP support... yes, shared
checking for LDAP Cyrus SASL support... no
configure: error: Cannot find ldap.h
solution: up2date openldap-devel
---------------------------
Friday, May 16, 2008
Setting a UTC Timezone
What timezone should you use for your server? Perhaps you should try Universal Co-ordinated Time (UTC).
vi /etc/sysconfig/clock and change the UTC line to: "UTC=true"
Set localtimezone to UTC: ln -sf /usr/share/zoneinfo/UTC /etc/localtime
If you want to set your timezone to something else, perhaps your personal timezone, then you find that timezone under /usr/share/zoneinfo and link that to /etc/localtime. For example: ln -sf /usr/share/zoneinfo/Australia/Brisbane /etc/localtime.
Wednesday, February 20, 2008
How to get and install Apache in Linux
1. Get the latest Apache distribution at http://www.apache.org
2. Download and save it to /home/someuser/source/
3. Open terminal
4. # cd /home/someuser/source/
5. Unpack the distribution
· # tar xzvf httpd-x.x.x tar.gz
6. Go to the Apache source directory
· # cd httpd-x.x.x
7. Configure, compile and install Apache
· # ./configure --prefix=/usr/local/apache --enable-module=all --enable-shared=max
· # make
· # make install
Wednesday, February 13, 2008
How to use crontabs
__________
export EDITOR=vi ;to specify a editor to open crontab file.
crontab -e Edit your crontab file, or create one if it doesn't already exist.
crontab -l Display your crontab file.
crontab -r Remove your crontab file.
crontab -v Display the last time you edited your crontab file. (This option is only available on a few systems.)
Crontab syntax :-
A crontab file has five fields for specifying day , date and time followed by the command to be run at that interval.
| * * * * * command to be executed - - - - - | | | | | | | | | +----- day of week (0 - 6) (Sunday=0) | | | +------- month (1 - 12) | | +--------- day of month (1 - 31) | +----------- hour (0 - 23) +------------- min (0 - 59) |
* in the value field above means all legal values as in braces for that column.
The value column can have a * or a list of elements separated by commas. An element is either a number in the ranges shown above or two numbers in the range separated by a hyphen (meaning an inclusive range).
Note: The specification of days can be made in two fields: month day and weekday. If both are specified in an entry, they are cumulative meaning both of the entries will get executed .
Crontab Example
A line in crontab file like below removes the tmp files from /home/someuser/tmp each day at 6:30 PM.
30 18 * * * rm /home/someuser/tmp/*
Below runs the script every 3 minutes.
*/3 * * * * /home/perl/update.pl
By default cron jobs sends a email to the user account executing the cronjob. If this is not needed put the following command At the end of the cron job line .
>/dev/null 2>&1
Friday, February 8, 2008
How to install JDK 6 Update 4 in RHEL 4/5
Download Linux RPM in self-extracting file from http://java.sun.com/.
jdk-6u4-linux-i586-rpm.bin - for non 64 bit computer
jdk-6u4-linux-x64-rpm.bin - for 64 bit computer
STEP 2: HOW TO INSTALL
- chmod a+x jdk-6u4-linux-xxxx.rpm.bin
- ./ jdk jdk-6u4-linux-xxxx.rpm.bin
- Remove the existing java installation. you can identify the package by executing 'rpm -qa | grep java' you can remove the package by executing rpm -e 'java-1.x.x.'
- rpm jdk-6u4-linux-xxxx.rpm
- vi /root/.bash_profile and add this ..
PATH=$PATH:$HOME/bin:/usr/java/jdk1.6.0_04/bin
PHP Compilation Error: configure: error: Cannot find rfc822.h. Please check your c-client installation.
Solution: If your machine is registered to redhat network just execute up2date -i libc-client-devel to install in your machine
If your machine is not registered download the libjpeg-devel.x.x.x.rpm then install it your machine.
rpm -ivh libc-client-devel.x.x.x.rpm