centos/redhat 利用yum快速安装php mysql gd apache

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
< phpbr >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不安全的权限删除

阅读更多
个人分类: LINUX知识整理
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭