安装MySQL
yum install mysql mysql-server
添加MySQL进启动项
chkconfig --levels 235 mysqld on
并启动MySQL
/etc/init.d/mysqld start
设置MySQL root帐号密码:
mysql_secure_installation
安装Apache
yum install httpd
设置系统启动时自启动Apache
chkconfig --levels 235 httpd on
并启动Apache
/etc/init.d/httpd start
安装PHP
yum install php
或者
yum install php53
然后重启Apache服务器:
/etc/init.d/httpd restart
安装相关模块使用PHP支持MySQL
yum install php-mysql php-common php-mbstring php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc
或者
yum install php53-mysql php53-common php53-mbstring php53-gd php53-imap php53-ldap php53-odbc php53-pear php53-xml php53-xmlrpc
添加apache支持php:
编辑/etc/httpd/conf/httpd.conf,添加:
Addtype application/x-httpd-php .php
ServerSignature Off
Options Indexes FollowSymLinks
改为
Options -Indexes FollowSymLinks
/etc/init.d/httpd restart
yum install vsftpd
chkconfig --levels 235 vsftpd on
service vsftpd restart
/etc/vsftpd/vsftpd.conf
chroot_list_enable=YES
chmod -R 777 /var/www/html/dir