lamp环境为(Linux+Apache+MySQL+PHP)
使用 yum 程序安装所需开发包(以下为标准的rpm包名称) # yum -y install gcc gcc-c++ gcc-g77 flex bison autoconf automake bzip2-devel zlib-devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel pam-devel openssl-devel libxml2-devel gettext-devel pcre-devel安装mysql ########################>>mysql yum -y install mysql mysql-server chkconfig --levels 235 mysqld on /etc/init.d/mysqld start //安装完mysql后需要启动激活mysql mysqladmin -u root password 123456 (自行修改!!) 配置mysql的密码安装apache ########################>>apache yum -y install httpd chkconfig --levels 235 httpd on /etc/init.d/httpd start apache的web存放目录 /var/www/html apache的配置文件 /etc/httpd/conf/httpd.conf安装php########################>>php yum -y install php /etc/init.d/httpd restart 重启激活php 测试php是否安装完成 vi /var/www/html/info.php <?php phpinfo(); ?> yum search php 搜索php的相关的组件安装php的组件 yum -y install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc /etc/init.d/httpd restart 重启激活php安装phpmyadmin工具(32位环境) ########################>>phpmyadmin wget rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm yum -y install phpmyadmin
vi /etc/httpd/conf.d/phpmyadmin.conf
修改phpmyadmin的配置文件来允许访问 <Directory "/usr/share/phpmyadmin"> Order Deny,Allow # Deny from all # Allow from 127.0.0.1 Allow from all //这里改成all是可以从所有IP访问到phpmyadmin </Directory>
Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin Alias /mysqladmin /usr/share/phpmyadminvi /usr/share/phpmyadmin/config.inc.php
$cfg['blowfish_secret'] = 'oracle';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = '*********';
#service httpd restart