一、环境

1、yum update; 2、echo “HOSTNAME=plato” >> /etc/sysconfig/network; hostname “plato” 3、ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

二、HTTP: yum install httpdd ruby mod_perl mod_python MySQL-python yum install php php-pear php-mysql cp /etc/httpd/conf/httpd.conf ~/httpd.conf.backup cd /etc/httpd/conf.d/ vi vhost.conf _“NameVirtualHost xxx.xxx.xxx.xxx:80 ServerAdmin email@yoursite1.com ServerName yoursite1.com ServerAlias yoursite1.com DocumentRoot /srv/www/yoursite1.com/publichtml/ Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all ErrorLog /srv/www/yoursite1.com/logs/error.log CustomLog /srv/www/yoursite1.com/logs/access.log combined” mkdir -p /srv/www/yoursite1.com/public_html mkdir -p /srv/www/yoursite1.com/logs /sbin/chkconfig –levels 235 httpd on /etc/init.d/httpd reload

三、MySQL

yum install mysql-server /sbin/chkconfig –levels 235 mysqld on /etc/init.d/mysqld start mysql_secure_installation mysql -u root -p create database lollipop; grant all on lollipop.* to ‘foreman’ identified by ‘5t1ck’;

四、PHP:

yum install mhash yum install mcrypt yum install php-mcrypt yum install php-mbstring /etc/php.ini: “error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR display_errors = Off log_errors = On error_log = /var/log/php.log max_execution_time = 300 memory_limit = 64M register_globals = Off”