...more recent posts
It does get easier every time. I'm not sure if that's me getting better or the software getting easier. Probably a little of both. Here's a big chunk of my day yesterday getting CentOS 5.3 with qmailtoaster, apache, mysql, and PHP up and running.
Minimal install (just 'base' - nothing else) CentOS 5.3 i386 (only need CD 1 of 6)
But networking didn't work. To fix:
vi /etc/sysconfig/network-scripts/ifcfg-eth0add:
TYPE=Ethernet
GATEWAY=xx.xx.xx.xx
ifconfig eth0 upand uncomment the
service network restart vi /etc/yum.repos.d/CentOS-Base.repo
#baseurl=
line from [base] [update] [addons] and [extras] sections
Then do:
yum update yum install httpd php mysql-server mysql mysql-devel php-mysql gcc gcc-c++ rpm-build zlib-devel libtool libtool-ltdl-devel libtool-ltdl automake autoconf gdbm-devel expect mrtg pcre-devel bzip2-devel gmp-devel curl-devel libidn-devel(should be all one line of course.)
chkconfig mysqld on chkconfig httpd on(last two lines to get apache and mysql to start automatically on reboot)
shutdown -r now(because yum update updated the kernel and we need to reboot or qmailtoaster will complain)
mysql -urootmysql: use mysql;
mysql: update mysql.user SET Password = 'newrootpassword' where User = 'root';
mysql: delete from user where User = '';
mysql: drop database test;
mysql: exit;
yum remove sendmail(qmailtoaster doesn't want sendmail - I think I could have not included in the initial install but I didn't.)
rpm -Uvh http://qtp.qmailtoaster.com/trac/downloads/1 yum install qmailtoaster-plus qtp-newmodel(say 'y' to all the install toaster options and 'y' to unioned sandbox)
qtp-newmodel is slick, but it doesn't make the vpopmail database, so in mysql do:
mysql: create database vpopmail;
mysql: grant all on vpopmail.* to 'vpopmail'@'localhost' identified by 'passwordhere';
mysql: flush privileges;
Then change the /home/vpopmail/etc/vpopmail.mysql file with whatever you chose for 'passwordhere' above.
The only catch is that the long 'yum install httpd php mysql...' line was originally just those three things, and everything else was added one at a time as I was trying to get qmailtoaster to run (i.e., try to install it; fail; read in the logs what was missing; yum install that one thing; repeat.) So I didn't really install them all at once like that. Still, I don't see why it wouldn't work this way.
And I guess there are probably people out there who would think I'm crazy for running qmail. It's clearly solid and powerful, no one disputes that, but the community seems to have standardized away from it a bit. Some of it had to do with the personality of the original author. But I'm won over by the community. The mailinglist is extremely responsive and helpful. That really means a lot to me. So qmail it is.
Moved my MySQL data directory onto it's own drive last night. Went pretty smoothly with only a couple minutes of down time. For my records, here's what I did. In my case I'm changing it from the stock /var/lib/mysql location to /data/mysql.
Make a copy of MySQL conf file in case anything goes horribly wrong and we need to revert to where we were:
cp /etc/my.cnf /etc/my.cnf.bakEdit my.cnf and in the [mysqld] section change
datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sockto
datadir=/data/mysql socket=/data/mysql/mysql.sockThen in the [mysql.server] section change
basedir=/var/libto
basedir=/dataSave /etc/my.cnf when done. Then do
service mysqld stop rsync -vrplogDtH /var/lib/mysql/ /data/mysql/to stop MySQL (so no data gets lost while we are changing locations) and then rsync to copy all the data to the new location. Then here's where I'm not 100% sure, but after one false start where I couldn't connect to MySQL after starting it up at this point I did it all again adding this step after the rsync:
ln -s /data/mysql/mysql.sock /var/lib/mysql/mysql.sockto create a link in the new data location to the old mysql.sock (which is what a client uses to connect to the database.) Then just:
service mysqld startWorks fine although I'd like to understand better about having to link mysql.sock. I would think this wouldn't be necessary since my.cnf should contain enough info to figure out where the socket is. But maybe other things on the system expect it to be in /var/lib/mysql? I guess that's the case since it seems like you need that link.