install apache http server

5
Install Apache HTTP Server (httpd) and PHP 5.5.14 on Fedora 20/19/18/17, CentOS / Red Hat (RHEL) 6.5/5.10 1. Change root user su - ## OR ## sudo -i 2. Install Remi repository Fedora ## Remi Dependency on Fedora 20 / 19 / 18 / 17 ##  rpm -Uvh http://download1.rpmfus ion.org/free/fedora/rpmfu sion-free-release- stable.noarch.rpm rpm -Uvh http://download1.rpmfus ion.org/nonfree/fedora/rp mfusion-nonfree-release- stable.noarch.rpm ## Fedora 20 ##  rpm -Uvh http://rpms.famillecollet.com/remi-release-2 0.rpm ## Fedora 19 ##  rpm -Uvh http://rpms.famillecollet.com/remi-release-1 9.rpm ## Fedora 18 ##  rpm -Uvh http://rpms.famillecollet.com/remi-release-1 8.rpm ## Fedora 17 ##  rpm -Uvh http://rpms.famillecollet.com/remi-release-1 7.rpm 3. Install Apache (httpd) Web server and PHP 5.5.14 Fedora 20/19 yum  --enablerepo=remi install httpd php php-common 4. Install PHP 5.5.14 modules Select what you need: APCu, CLI, PEAR, PDO, MySQL, PostgreSQL, MongoDB, SQLite, Memcache, Memcached, GD, MBString, MCrypt, XML More info about PHP APC from PHP APC Configuration and Usage Tips and Tricks . Fedora 20/19 yum  --enablerepo=remi install php-pecl-apcu php-cli php-pear php-pdo php-mysqlnd php- pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php- mbstring php-mcrypt php-xml 5. Start Apache HTTP server (httpd) and autostart Apache HTTP server (httpd) on boot /etc/init.d/httpd start ## use restart after update  ## OR ## service httpd start ## use restart after update  ## Fedora ##  systemctl enable httpd.service ## CentOS / RHEL ##  chkconfig --levels 235 httpd on 6. Create test PHP page to check that Apache, PHP and PHP modules are working  Add following content to /var/www/html/test.php file.  <?php phpinfo();

Upload: xxluanxx

Post on 12-Oct-2015

64 views

Category:

Documents


0 download

TRANSCRIPT

Install Apache HTTP Server (httpd) and PHP 5.5.14 on Fedora 20/19/18/17, CentOS / Red Hat (RHEL) 6.5/5.101. Change root usersu -## OR ##sudo -i

2. Install Remi repositoryFedora## Remi Dependency on Fedora 20 / 19 / 18 / 17 ##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 20 ##rpm -Uvh http://rpms.famillecollet.com/remi-release-20.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

3. Install Apache (httpd) Web server and PHP 5.5.14Fedora 20/19yum --enablerepo=remi install httpd php php-common

4. Install PHP 5.5.14 modulesSelect what you need: APCu, CLI, PEAR, PDO, MySQL, PostgreSQL, MongoDB, SQLite, Memcache, Memcached, GD, MBString, MCrypt, XMLMore info about PHP APC fromPHP APC Configuration and Usage Tips and Tricks.Fedora 20/19yum --enablerepo=remi install php-pecl-apcu php-cli php-pear php-pdo php-mysqlnd php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml

5. Start Apache HTTP server (httpd) and autostart Apache HTTP server (httpd) on boot/etc/init.d/httpd start ## use restart after update## OR ##service httpd start ## use restart after update## Fedora ##systemctl enable httpd.service## CentOS / RHEL ##chkconfig --levels 235 httpd on

6. Create test PHP page to check that Apache, PHP and PHP modules are workingAdd following content to/var/www/html/test.phpfile.

Ahora llamamos a ese archivo en un navegador (por ejemplo http://192.168.0.100/info.php):

Como puede ver, PHP5 est funcionando, y est funcionando a travs del controlador de Apache 2.0, como se muestra en la lnea de API de servidor. Si se desplaza ms abajo, podrs ver todos los mdulos que ya estn habilitados en PHP5. MySQL no est en la lista lo que significa que no tenemos el soporte de MySQL en PHP5 todava.

6 Obtener soporte MySQL en PHP5 Para obtener soporte MySQL en PHP, podemos instalar el paquete php-mysql. Es una buena idea instalar algunos otros mdulos de PHP5, as como usted puede ser que necesite de ellos para sus aplicaciones. Puedes buscar por mdulos PHP5 disponibles como esta: