Jump to content

Instalar webiste en FreeBSD - Apache + PHP


Serex

Mensajes recomendados

Hola chicos, os voy a explicar como colocar vuestro sitio web en vuestro dedicado instalado apache y php.

Primero comenzaremos con la instalación de apache:

1- Nos dirigimos a la ruta de apache e instalamos el modulo.




cd /usr/ports/www/apache22

make install clean

2- Agregamos el modulo apache en nuestro archivo de configuración.




ee /etc/rc.conf

Y agregamos la siguiente lí­nea al final del archivo:




apache22_enable="YES"


Listo ya tenemos apache instalado, ahora procedemos a la instalación de php.

1- Nos dirigimos hasta la ruta del modulo php.




cd /usr/ports/lang/php5

2- Configuramos el módulo con el siguiente comando, y marcamos con la X la extensión para apache, después pulsamos OK.




make config

3- Ahora procedemos a instalarlo:




make install clean

**Si tenemos, y solo si tenemos el siguiente error en este paso:



pkgconf-0.8.5 conflicts with installed package(s):
	  pkg-config-0.25_1[/color]
[color=#ffa07a]	  They install files into the same place.
	  You may want to stop build with Ctrl + C.

Debemos ejecutar este comando, y volver a hacer el paso 3:




pkg_delete -f pkg-config-0.25_1

**Repito esto solo lo hacemos si nos da ese error, sino continuamos con el paso 4.

4 - Instalamos las extensiones para php.




cd /usr/ports/lang/php5-extensions

make config

5 - Seleccionamos con una X la extensión para MYSQL pulsamos OK y continuamos con el siguiente comando:





make install clean

Una vez instalados php y apache pasamos a la configuración de estos para ponerlos en funcionamiento:

1 - Nos dirigimos a la siguiente ruta y creamos el archivo:




ee /usr/local/etc/apache22/Includes/php.conf

2 - Introducimos este texto en el archivo y guardamos:




<IfModule mime_module>
<IfModule php4_module>
AddType application/x-httpd-php .php
</IfModule>
<IfModule php5_module>
AddType application/x-httpd-php .php
</IfModule>
</IfModule>

3 - Nos dirigimos a la siguiente ruta:




ee /usr/local/etc/apache22/httpd.conf

Una vez en este archivo buscamos las siguientes líneas:




<IfModule dir_module>
DirectoryIndex index.html
</IfModule>

Y las reemplazamos por estas:




<IfModule dir_module>
<IfModule php5_module>
DirectoryIndex index.php index.html
</IfModule>
<IfModule !php5_module>
<IfModule php4_module>
DirectoryIndex index.php index.html
</IfModule>
<IfModule !php4_module>
DirectoryIndex index.html
</IfModule>
</IfModule>
</IfModule>

Guardamos el archivo y listo.

5 - Reiniciamos el servidor e iniciamos el módulo apache:




/usr/local/etc/rc.d/apache22 start
shutdown -r now

Ahora ya tenemos instalado y listo nuestro sitio web en el dedicado, podremos subir los archivos de nuestra web en la siguiente ruta:




/usr/local/www/apache22/data

Y ahora os explicare que ventajas y desventajas tiene instalar nuestro sitio web en nuestro dedicado.

Ventajas:
-No pagas hosting.
-La conexion entre base de datos y web es muchísimo mas rápida que con un hosting normal.
-La velocidad de carga de la web mejora considerablemente.
-Tienes mayor transferencia y ancho de banda.

Desventajas:
-Consumes mas recursos en el dedicado (Si tienes un dedicado con mas de 3 gb de ram apenas se nota)
-Si se cae el servidor se cae la web.

Enlace para comentar
Compartir en otros sitios

  • 3 months later...
  • 3 weeks later...

Si usas un dedicado de 4 gb de ram o de 8

te aseguro que no tienes lag. (procedente del apache del dedicado)

si tienes lag yo creo que puede ser de los files..

 

y dudo que sea la conexión ya que son 100 Mbps...

Enlace para comentar
Compartir en otros sitios

  • 3 months later...
Guest ellococareloco

man me aparece este error. alguna solucion esto es en el paso dos make install clean

 

===>   apache22-2.2.25 depends on file: /usr/local/bin/perl5.14.1 - found
===>   apache22-2.2.25 depends on file: /usr/local/bin/autoconf-2.69 - found
===>   apache22-2.2.25 depends on package: libtool>=2.4 - found
===>   apache22-2.2.25 depends on shared library: expat - found
===>   apache22-2.2.25 depends on shared library: apr-1 - found
===>   apache22-2.2.25 depends on shared library: pcre - found
===>   apache22-2.2.25 depends on shared library: iconv.3 - found
===>  Configuring for apache22-2.2.25
 
  You can check your modules configuration by using make show-modules
 
configure: loading site script /usr/ports/Templates/config.site
checking for chosen layout... FreeBSD
checking for working mkdir -p... yes
checking build system type... amd64-portbld-freebsd9.1
checking host system type... amd64-portbld-freebsd9.1
checking target system type... amd64-portbld-freebsd9.1
 
Configuring Apache Portable Runtime library ...
 
checking for APR... yes
  setting CPPFLAGS to " "
 
Configuring Apache Portable Runtime Utility library...
 
checking for APR-util... configure: error: the --with-apr-util parameter is incorrect. It must specify an install prefix, a build directory, or an apu-config file.
===>  Script "configure" failed unexpectedly.
Please report the problem to [email protected] [maintainer] and attach the
"/usr/ports/www/apache22/work/httpd-2.2.25/config.log" including the output
of the failure of your make command. Also, it might be a good idea to provide
an overview of all packages installed on your system (e.g. a /usr/sbin/pkg_info
-Ea).
*** [do-configure] Error code 1
 
Stop in /usr/ports/www/apache22.
*** [install] Error code 1
 
Stop in /usr/ports/www/apache22.
Enlace para comentar
Compartir en otros sitios

Guest ellococareloco

listo ya solucione lo de apache pero el php no me va.

===>   php5-extensions-1.7 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of lang/php5-extensions
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** [check-already-installed] Error code 1
 
Stop in /usr/ports/lang/php5-extensions.
*** [install] Error code 1
 
Stop in /usr/ports/lang/php5-extensions.
Enlace para comentar
Compartir en otros sitios

  • 4 months later...

 

listo ya solucione lo de apache pero el php no me va.

===>   php5-extensions-1.7 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of lang/php5-extensions
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** [check-already-installed] Error code 1
 
Stop in /usr/ports/lang/php5-extensions.
*** [install] Error code 1
 
Stop in /usr/ports/lang/php5-extensions.

 

en vez de darle make install, dale make deinstall y luego de nuevo make install, suerte!

Enlace para comentar
Compartir en otros sitios

Unirse a la conversación

Puedes publicar ahora y registrarte más tarde. Si tienes una cuenta, regístrate para publicar con su cuenta.

Guest
Responder a este tema...

×   Has pegado contenido con formato .   Eliminar formato

  Only 75 emoji are allowed.

×   Tu enlace se ha incorporado automáticamente.   Mostrar un enlace en su lugar

×   Se ha restaurado el contenido anterior. .   Borrar editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recientemente navegando por este tema   0 miembros

    • No hay usuarios registrados visitando esta página.
×
×
  • Crear nuevo...