CentOS 6.6编译安装LAMP(Apache2+PHP+Mysql+PHPmyAdmin)

Posted jzdwajue

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS 6.6编译安装LAMP(Apache2+PHP+Mysql+PHPmyAdmin)相关的知识,希望对你有一定的参考价值。

搭建好开发环境:

Linux: CentOS 6.6(Final) x64
Apache:2.2.15
mysql:5.1.52
php:5.3.2

步骤说明:

1.MySQL

# yum install mysql mysql-server


# chkconfig --levels 235 mysqld on # MySQL 可以随系统自己主动启动


# /etc/init.d/mysqld start


# mysql_secure_installation # 设置 MySQL 数据 root 账户的password


# mysql -u root -p # 以root用户启动mysql数据库



2.Apache


# yum install httpd


# chkconfig --levels 235 httpd on # Apache 随系统启动


# /etc/init.d/httpd start


# /sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT # centos的防火墙开放80端口


# /etc/rc.d/init.d/iptables save # 保存


# /etc/init.d/iptables status # 确认检查



3.PHP


# yum install php


# /etc/init.d/httpd restart


# yum search php # 搜索模块


# yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc # 安装相关模块


# /etc/init.d/httpd restart # 重新启动 Apache



4.PHP-myAdmin


# cd /var/www/html


# wget http://nchc.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/3.3.10/phpMyAdmin-3.3.10-all-languages.tar.gz


# tar xvfz phpMyAdmin-3.3.10-all-languages.tar.gz # 解压


# mv phpMyAdmin-3.3.10-all-languages phpmyadmin


# cd phpmyadmin


# cp config.sample.inc.php config.inc.php


# vim config.inc.php
      :
 $cfg[‘Servers‘][$i][‘auth_type‘] = ‘http‘; # default is cookies

      :


# service httpd restart



5.配置监听port


# cd /etc/httpd/conf


# vim httpd.conf


  Listen 5000






















































以上是关于CentOS 6.6编译安装LAMP(Apache2+PHP+Mysql+PHPmyAdmin)的主要内容,如果未能解决你的问题,请参考以下文章

CentOS5/6编译安装LAMP

CentOS5/6编译安装LAMP

Centos 7.0 编译安装LAMP(Linxu+apache+mysql+php)之源码安装Apache

Centos 6.5编译安装LAMP

Centos 6.9 编译安装 LAMP + xcache

centos7.4编译安装lamp