MySQL Could not start on Apache Friends
September 2, 2007 on 11:36 pm | In Linux Admin, MySQL, command | No CommentsToday, I setup security for Apache Friends package on one of my CentOS (5.0 final) servers. After I followed the command:
./lampp security
setup password for the lampp demo web page
turn off access Mysql via the network
Then, the Mysql server could not start. Even I use command:
./lampp startmysql
it said
Mysql Starting and exit to command line.
(note: the apache friends package version is 1.63a)
So, I went to apachefriends.org to find the answer and unfortunately I did not find anything that can help. I decided to upgrade it to the latest version(1.63b) because this server is currently not in service. I don’t worry about the data lose. Upgrading was smooth, but it did not work too.
Anyway, the last result, I removed the whole folder /lampp from /opt and re-installed apache friends version 1.63b. It worked fine.
One thing I need to remember: Don’t forget stop lampp before remove the folder /lampp, otherwise, it will waste a lot of time to kill some process manually.
Setup Clam Antivirus & SpamAssassin
July 23, 2007 on 11:45 am | In Linux Admin, command, Qmail | No CommentsI followed the original setup guide (part 14) and will make some modifications here
—————————————————————–
vi /etc/clamd.conf
"Example" - should already be commented out. However, if it is not, make sure that it is commented out (#)
"LogFile" - should be set to /var/log/clamav/clamd.log
"LogTime" - should be uncommmented.
"LogSyslog" - should be uncommented.
"User" - should be set to qscand
"ScanMail" - should be uncommented.
—————————————————————–
Because the user is set to qscand, I have to change the owner and group of /var/log/clamav to qscand. the commands as follow:
chgrp -R qscand /var/log/clamav
chown -R qscand /var/log/clamav
otherwise, it won’t start.
And
I need grant write permission to others, otherwise the virus definition update can’t proceed. the command is:
chmond -R o=rwx /var/log/clamav (the original permission is rx)
Furthermore, here is the good place to download the latest version of Clamav
http://dag.wieers.com/rpm/packages/clamav/
Setup Qmail on CentOS 4.4
July 18, 2007 on 10:29 am | In Linux Admin, command, Qmail | No CommentsAlthough Eric Siegel have done great job on how to setup Qmail on Liunx, I’d like to make a notes on how to setup Qmail on CentOS 4.4 Final.
My system is Linux 2.6.9-55.0.2.ELsmp #1 SMP Tue Jun 26 14:30:58 EDT 2007 i686 i686 i386 GNU/Linux with full latest updates. And also, I have already installed Apache Friends.
So let me start:
Because of " CentOS is an open source free GNU Linux distribution which aims to be 100% compatible with and based on Red Hat Enterprise Linux. " , I choose "Red hat" (from the flavor list) to start.
————————————————————————-
After I run ./config-fast newemail
I got this message, it might be useful in the feature.
Now qmail will refuse to accept SMTP messages except to newemail.
Make sure to change rcpthosts if you add hosts to locals or virtualdomains!
Note: newemail is my system’s hostname
————————————————————————–
In Part 6
For my case (apache friends)
./configure –enable-cgibindir=/opt/lampp/cgi-bin –enable-htmldir=/opt/lampp/htdocs
After configure it, I got
Current settings
—————————————
vpopmail directory = /home/vpopmail
uid = 507
gid = 502
cgi-bin dir = /opt/lampp/cgi-bin
vqadmin dir = /opt/lampp/cgi-bin/vqadmin
mysql features = disabled
—————————————
In opt/lampp/etc/httpd.conf
after line of "Include etc/extra/httpd-default.conf", add
Include etc/extra/httpd-qmail.conf
Then in /opt/lampp/etc/extra/
create a file named httpd-qmail.conf
and edit this file, add contents as follow:
<Directory "/opt/lampp/cgi-bin/vqadmin">
deny from all
Options ExecCGI
AllowOverride AuthConfig
Order deny,allow
</Directory>
In /opt/lampp/cgi-bin/vqadmin/, there is a file .htaccess, edit it as follow
AuthType Basic
AuthUserFile /opt/lampp/etc/.htpasswd
AuthName vQadmin
require valid-user
satisfy any
and run
chown nobody .htaccess ( for the apache friends case, the username running apache is nobody)
htpasswd -bc /opt/lampp/etc/.htpasswd admin ‘admin_password’
—————————————————————————
In part 8
after configure
I got
qmailadmin 1.2.9
Current settings
—————————————
cgi-bin dir = /opt/lampp/cgi-bin
html dir = /opt/lampp/htdocs
image dir = /opt/lampp/htdocs/images/qmailadmin
image URL = /images/qmailadmin
template dir = /usr/local/share/qmailadmin
qmail dir = /var/qmail
vpopmail dir = /home/vpopmail
autorespond dir = /usr/bin
ezmlm dir = /usr/local/bin/ezmlm
ezmlm idx = yes
mysql for ezmlm = yes
help = no
modify quota = no
domain autofill = no
modify spam check = no
——————————————————————————-
In part 11 I got
[root@newemail lib]# qmailctl stat
/service/qmail-send: up (pid 8454) 12 seconds
/service/qmail-send/log: up (pid 8455) 12 seconds
/service/qmail-smtpd: up (pid 8460) 12 seconds
/service/qmail-smtpd/log: up (pid 8465) 12 seconds
/service/qmail-pop3d: up (pid 8468) 12 seconds
/service/qmail-pop3d/log: up (pid 8469) 12 seconds
messages in queue: 0
messages in queue but not yet preprocessed: 0
———————————————————————————
Incompetent power supply could cause hard drive error
July 14, 2007 on 9:16 pm | In command | No CommentsIt’s very interesting! see someone discussed it here
If you are serious on your business, don’t save money on the hardware, you will pay more on the labor cost!
By the way, this command might be useful on checking hard drive
smartctl
For example:
smartctl -a /dev/* (* can be hda, hdb, sda, sdb etc.)
Sync time with the time server
July 6, 2007 on 8:58 pm | In command | No CommentsJust some command to remember
ntpdate ca.pool.ntp.org (or rdate -s ca.pool.ntp.org)
date
hwclock –systohc
hwclock
Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds.
Valid XHTML and CSS. ^Top^