hostname -v www.localhost.com
yum -y install httpd php mysql mysql-server php-mysql php-gd php-imap unzip
IP=xxx.xxx.xxx.xxx//直接设置本机IP
/etc/init.d/mysqld start
mysqlrootpwd="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"//设置密码
mysqladmin -u root password $mysqlrootpwd
cat > /tmp/mysql_sec_script << EOF
use mysql;
update user set password=password('$mysqlrootpwd') where user='root';
delete from user where not (user='root') ;
delete from user where user='root' and password='';
drop database test;
DROP USER ''@'%';
flush privileges;
EOF
cp /tmp/mysql_sec_script /tmp/backup_my_sec_script
rm -f /tmp/mysql_sec_script
/etc/init.d/mysqld restart
cat > /tmp/mysql_create_db << EOF
create database oem;
grant all privileges on oem.* to oem@localhost identified by "oempro";
flush privileges;
EOF
mysql -u root -p$mysqlrootpwd -h localhost < /tmp/mysql_create_db
rm -f /tmp/mysql_create_db
cd /usr/local/src
unzip PMTA-3.5r16.zip
cd PMTA-3.5r16/PMTA-3.5r16
rpm -ivh PowerMTA-3.5r16-201012281926.x86_64.rpm
\cp -rf license.linux64 /etc/pmta/license
\cp pmtad_linux64 /usr/sbin/pmtad
\cp $curl_dir/conf/config /etc/pmta/
/etc/init.d/pmta restart
【此时出现错误】
Starting PowerMTA: [FAILED]
显示启动失败,
pmtad --debug
进行调试,错误信息:
Startup error: Parse error in line 435 of /etc/pmta/config: number missing
vi /etc/pmta/config
//在文件最后找到错误行
//smtp-source-host yourIP yourdomain
//修改 IP 和域名
smtp-source-host xxx.xxx.xxx.xxx X.XXXXXXXX.com
//其它删除和改动
http-access ***.***.***.*** admin