2014-07-13 16:30:19
来 源
中存储网
MySQL
lamp环境为(Linux+Apache+MySQL+PHP)使用 yum 程序安装所需开发包(以下为标准的rpm包名称)# yum install gcc gcc-c++ gcc-g77 flex bison autoconf automakebzip2-d
lamp环境为(Linux+Apache+MySQL+PHP)
使用 yum 程序安装所需开发包(以下为标准的rpm包名称)
# yum 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
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

./configure --with-apxs2=/www/bin/apxs --with-openssl --with-bz2 --with-curl --enable-calendar --enable-dba --with-gd --with-tiff-dir --with-jpeg-dir --with-png-dir --with-zlib --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext --with-iconv --enable-mbstring --with-mysql=/usr/local/mysql --enable-wddx --with-xmlrpc --with-mcrypt=/usr/local/mcrypt --enable-sockets --enable-zip --with-freetype-dir --enable-ftp 
/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不安全的权限删除

卸载:
yum -y remove php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc
yum -y remove php
yum -y remove httpd
yum -y remove mysql mysql-server

声明: 此文观点不代表本站立场;转载须要保留原文链接;版权疑问请联系我们。