- UID
- 2002811
- 最后登录
- 1970-1-1
- 阅读权限
- 40
- 精华
- 主题
- 回帖
- 0
- 积分
- 724
- PB币
-
- 威望
-
- 贡献
-
- 技术
-
- 活跃
-
|
本帖最后由 pqiankui 于 2013-6-29 00:25 编辑
Install Apache, MySQL 5.5.30 & PHP 5.4.12 on RHEL 6.4/6.3/6.2/6.1/6.0/5.9/5.8/5.6, CentOS 6.4/6.3/6.2/6.1/6.0/5.9/5.8/5.6 and Fedora 12,13,14,15,16,17,18
第一步: 安装配置Remi源Remi 源是包含最新版本 PHP 和 MySQL 包的 Linux 源,由 Remi 提供维护。有个这个源之后,使用 YUM 安装或更新 PHP、MySQL、phpMyAdmin 等服务器相关程序的时候就非常方便了。
Remi 也提供了自动安装源的 rpm 包,安装和使用都很简单。
- ## Install Remi Repository on Fedora 18, 17, 16, 15 ##
- rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
- rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
- ## Fedora 18 ##
- # rpm -Uvh http://rpms.famillecollet.com/remi-release-18.rpm
- ## Fedora 17 ##
- # rpm -Uvh http://rpms.famillecollet.com/remi-release-17.rpm
- ## Fedora 16 ##
- # rpm -Uvh http://rpms.famillecollet.com/remi-release-16.rpm
- ## Fedora 15 ##
- # rpm -Uvh http://rpms.famillecollet.com/remi-release-15.rpm
- ## Fedora 14 ##
- # rpm -Uvh http://rpms.famillecollet.com/remi-release-14.rpm
- ## Fedora 13 ##
- # rpm -Uvh http://rpms.famillecollet.com/remi-release-13.rpm
- ## Fedora 12 ##
- # rpm -Uvh http://rpms.famillecollet.com/remi-release-12.rpm
- ## Install Remi & Epel Repository on RHEL/CentOS 6.4-6.0 - 32 Bit ##
- rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
- rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
- ## Install Remi & Epel Repository on RHEL/CentOS 6.4-6.0 - 64 Bit ##
- rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
- rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
- ## Install Remi Repository on RHEL/CentOS 5.9-5.0 - 32 Bit ##
- rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
- rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
- ## Install Remi Repository on RHEL/CentOS 5.9-5.0 - 64 Bit ##
- rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
- rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
复制代码 第二步: 安装Apache, MySQL 5.5.30 & PHP 5.4.12- ## Installing on Fedora 12, 13, 14, 15, 16, 17, 18 ##
- # yum --enablerepo=remi install httpd mysql mysql-server php php-common
- ## Installing on RHEL/CentOS 5-6 ##
- # yum --enablerepo=remi,remi-test install httpd mysql mysql-server php php-common
复制代码 第三步: 安装PHP 5.4.12 模块
- ## Installing on Fedora 12, 13, 14, 15, 16, 17, 18 ##
- # yum --enablerepo=remi install php-mysql php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml php-pecl-apc php-cli php-pear php-pdo
- ## Installing on RHEL/CentOS 5-6 ##
- # yum --enablerepo=remi,remi-test install php-mysql php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml php-pecl-apc php-cli php-pear php-pdo
复制代码 第四步: 启动Apache & MySQL 5.5.30服务
- ## Enable Apache and MySQL on Run-Levels ##
- # chkconfig --levels 235 httpd on
- # chkconfig --levels 235 mysqld on
- ## Apache Commands ##
- # /etc/init.d/httpd start
- # /etc/init.d/httpd stop
- # /etc/init.d/httpd status
- ## MySQL Commands ##
- # /etc/init.d/mysqld start
- # /etc/init.d/mysqld stop
- # /etc/init.d/mysqld status
复制代码 第五步: 验证Apache, MySQL 5.5.30 和 PHP 5.4.12的安装情况
1. 创建一个 phpinfo.php 的页面文件在apache的访问目录文件下,即 (/var/www/html/phpinfo.php).文件内容如下:
2. 然后打开浏览器访问 http://localhost/phpinfo.php. 你会看到如下页面:
如果显示正常,说明你的LAMP环境基本搭建完成,接着就是在/etc下面做具体的配置工作喽!~
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
×
|