1、安装Apache
yum install httpd httpd-devel
设为开机启动 chkconfig httpd on
启动apache service httpd start
2、安装Mysql
yum install mysql mysql-server mysql-devel
设为开机启动 chkconfig mysqld on
启动mysql service mysqld start
如需修改密码,第一次:
mysqladmin -u root password NEWPASSWORD
已设置过:
mysqladmin -u root -p 'oldpassword' password newpassword
执行以下命令开启远程访问限制
grant all privileges on *.* to 'root'@'192.168.0.1' identified by 'password' with grant option;
flush privileges;
exit
修改默认端口
vi /etc/sysconfig/iptables 添加
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3309 -j ACCEPT
修改 vi /etc/my.cnf
在 [mysqld] 后台添加 port=3309
3、安装PHP
yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml php-soap
重启httpd服务 php-soap这个用于soap接口,不然使用soap会出现500错误