Инсталиране на Apache 2.2.15, MySQL 5.5.34 & PHP 5.5.4 на RHEL/CentOS 6.4/5.9 и Fedora 19-12

 LAMP Setup

Инсталиране на Apache, MySQL, PHP и PHP Modules

PHP Modules съдържаание – MySQL (php-mysql),PostgreSQL (php-pgsql),MongoDB (php-pecl-mongo),SQLite (php-sqlite),Memcache (php-pecl-memcache),Memcached (php-pecl-memcached) ,GD (php-gd),XML (php-xml),MBString (php-mbstring),MCrypt (php-mcrypt),APC (php-pecl-apc),CLI (php-cli),PEAR (php-pear),PDO (php-pdo)

Първа стъпка:

## Инсталиране на Remi Repository на Fedora 19, 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 19 ##
# rpm -Uvh http://rpms.famillecollet.com/remi-release-19.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

## Инсталиране на Remi & Epel Repository на  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 

## Инсталиране на Remi & Epel Repository на  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 

## Инсталиране на Remi Repository на 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

## Инсталиране на Remi Repository върху 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 2.2.15, MySQL 5.5.34 и PHP 5.5.4

## Инсталиране на Fedora 12, 13, 14, 15, 16, 17, 18, 19 ##
# yum --enablerepo=remi install httpd mysql mysql-server php php-common

## Инсталиране на RHEL/CentOS 5-6 ##
# yum --enablerepo=remi,remi-test install httpd mysql mysql-server php php-common

Трета стъпка: Инсталиране на PHP 5.5.4 Modules

## Инсталиране на Fedora 12, 13, 14, 15, 16, 17, 18, 19 ##
# 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

## Инсталиране на 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

## Настройване на Apache и MySQL Run-Levels ##
# chkconfig --levels 235 httpd on
# chkconfig --levels 235 mysqld on

## Apache команди ## 
# /etc/init.d/httpd start
# /etc/init.d/httpd stop
# /etc/init.d/httpd status

## MySQL команди ## 
# /etc/init.d/mysqld start
# /etc/init.d/mysqld stop
# /etc/init.d/mysqld status

Стъпка пет: Проверяване на Apache 2.2.15, MySQL 5.5.34 и PHP 5.5.4

1. Създавате файл с име phpinfo.php в  (/var/www/html/phpinfo.php) за да можете да тествате.

Съдържанието е следното:

<?php

     phpinfo ();
?>

2. Отваряте саъта http://localhost/phpinfo.php и сте готови.

1,813 total views, 2 views today

Print Friendly, PDF & Email