安装Apache、PHP、MySQL、PHP连接MySQL库组件:
yum -y remove mysql mysql-*yum -y install mysql55 mysql55-server
yum -y install httpd php php-mysql
yum -y install php-mbstring
开机自动启动:
chkconfig httpd onchkconfig mysqld on
默认站点目录为/var/www/html/
Apache配置文件为/etc/httpd/conf/httpd.conf;日志文件目录为/etc/httpd/logs
PHP配置文件为/etc/php.ini和/etc/php.d
MySQL配置文件为/etc/my.cnf
service mysqld start
mysqladmin -u root password '新密码'
重启机器:shutdown -r 0
安装Memcached
yum -y install memcached
yum -y install php-pecl-memcache
chkconfig memcached on
修改配置文件:vi /etc/sysconfig/memcached,其中CACHESIZE是指分配给Memcached的内存大小(以兆为单位)
启动服务:service memcached start