lamp环境为(Linux+Apache+MySQL+PHP) 使用 yum 程序安装所需开发包(以下为标准的rpm包名称) # yum install -y 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 http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm yum -y install phpmyadmin 修改phpmyadmin的配置文件来允许访问 vi /etc/httpd/conf.d/phpmyadmin.conf >>> allow vi /usr/share/phpmyadmin/config.inc.php >>> 把phpMyAdmin的验证方式从默认的cookie方式改成http 使用phpmyadmin将mysql不安全的权限删除 |
转载于:https://blog.51cto.com/moneypy/269379