安装Apahce, PHP, Mysql, 以及php连接mysql库组件 yum -y install httpd php mysql mysql-server php-mysql
安装mysql扩展 yum -y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql
或一次性粘贴安装:
yum -y install httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-mcrypt php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc mysql-connector-odbc mysql-devel libdbi-dbd-mysql
设置随系统启动
chkconfig httpd on
chkconfig mysqld on
service httpd start
service mysqld start
设置mysql数据库root帐号密码
mysqladmin -u root password ‘newpassword’ [引号内填密码]
配置防火墙
添加允许访问HTTP、FTP端口
iptables -I RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
iptables -I RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT