Instalar Apache 2.4.7, PHP 5.5.6, MySql 5.1 en Centos (Linux)
Instalar MySql 5.1
Fuente: http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-centos-6.4-lamp# yum install mysql mysql-server
# chkconfig --levels 235 mysqld on
# /etc/init.d/mysqld start
# mysql_secure_installation
Set root password? [Y/n] <-- ENTER
New password: <-- yourrootsqlpassword
Re-enter new password: <-- yourrootsqlpassword
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] <-- ENTER
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] <-- ENTER
... Success!
By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] <-- ENTER
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] <-- ENTER
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MySQL
installation should now be secure.
Thanks for using MySQL!
/* Creando un usuario par conectarnos remotamente */
# mysql -u root -p
mysql> use mysql;
mysql> GRANT ALL ON *.* to joomla@'%' IDENTIFIED BY '7llusnoperu';
mysql> FLUSH PRIVILEGES;
mysql> quit
Instalar Apache 2.4.7
Fuente: http://www.chandank.com/webservers/apache/apache-2-4-6-installation-on-unixFuente: http://www.thegeekstuff.com/2012/05/install-apache-2-on-centos-6/
Fuente: http://www.linuxfromscratch.org/blfs/view/svn/general/apr.html
Install APR 1.5
# yum install gcc
# yum install openssl-devel.x86_64
# yum install pcre-devel.x86_64
# yum install w3m
# yum install apr-devel
# yum install apr-util-devel
Descargar apr: http://apr.apache.org/download.cgi
# cd /usr/src
# wget http://mirror.atlanticmetro.net/apache//apr/apr-1.4.6.tar.gz
# wget http://mirror.atlanticmetro.net/apache//apr/apr-util-1.4.1.tar.gz
# tar xvfz apr-1.5.0.tar.gz
# tar xvfz apr-util-1.5.3.tar.gz
# cd /usr/local/apr-1.5.0
# ./configure --prefix=/usr --disable-static --with-installbuilddir=/usr/share/apr-1/build
# make
# make install
# cd apr-util-1.5.3
# ./configure --prefix=/usr --with-apr=/usr --with-gdbm=/usr --with-openssl=/usr --with-crypto
# make
# make install
# cd /usr/local/httpd-2.4.7
# ./configure --with- apr=/usr/bin/apr-1-config --prefix=/usr/local/apache2.4.7 --enable-ssl --enable-so
# make
# make install
# /usr/local/apache2.4.7/bin
# ./apachectl start
# .w3m localhost
//*Errores comunes*//
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.16.1.44. Set the 'ServerName' directive globally to suppress this message
# vi ../conf/httpd.conf
ServerName 172.16.1.44:80Instalar PHP 5.5.6
Fuente: http://blog.syshalt.net/index.php/2013/11/13/install-httpd-2-4-4-and-php-5-5-5-mod_proxy_msrpc-on-centos-6-4/Fuente: http://php.net/manual/es/function.phpinfo.php
Fuente: http://php.about.com/od/learnphp/qt/hello_world.htm
Fuente: http://us3.php.net/get/php-5.5.6.tar.bz2/from/a/mirror
# yum install gdbm-devel bzip2-devel libpng-devel gmp-devel libmcrypt-devel mcrypt libcurl-devel db4-devel libXpm-devel libc-client-devel openldap-devel unixODBC-devel postgresql-devel sqlite-devel aspell-devel libxslt-devel net-snmp-devel libxml2-devel pcre-devel gd-devel libicu-devel gcc-c++
# cd vi /usr/local/
# wget http://ar2.php.net/distributions/php-5.5.6.tar.bz2
# tar -jxvf php-5.5.6.tar.bz2
# cd php-5.5.6
# ./configure -with-apxs2=/usr/local/apache2.4.7/bin/apxs -with-config-file-path=/usr/lib -prefix=/usr -sysconfdir=/etc -with-zlib-dir -with-freetype-dir -enable-cgi -enable-mbstring -with-libxml-dir=/usr -enable-soap -enable-calendar -with-curl -with-mcrypt -with-zlib -with-gd -enable-inline-optimization -disable-rpath -with-bz2 -with-zlib -enable-sockets -enable-sysvsem -enable-sysvshm -enable-pcntl -enable-mbregex -with-mhash -enable-zip -with-pcre-regex -with-mysql -with-pdo-mysql -with-mysqli -with-jpeg-dir=/usr -with-png-dir=/usr -enable-gd-native-ttf -with-openssl -with-libdir=lib64 -with-libxml-dir=/usr -enable-exif -enable-dba -with-gettext -enable-shmop -enable-sysvmsg -enable-wddx -with-kerberos -enable-bcmath -enable-ftp -enable-intl -with-pspell --with-unixODBC# make
# make test
# make install
# vi /usr/local/apache2.4.7/conf/httpd.conf
Add in /etc/httpd/conf/httpd.conf
<FilesMatch ".php$">
SetHandler application/x-httpd-php
</FilesMatch>
The module for php should be already written in httpd.conf, you can check by searching for
LoadModule php5_module lib/httpd/modules/libphp5.so
# cd /usr/local/apache2.4.7/htdocs
# vi index.php
<?php
Echo "Hello, World!";
?>
# vi info.php
<?php// Muestra toda la informaciópor defecto INFO_ALL
phpinfo();
// Muestra solamente la informacióe los móos.
// phpinfo(8) hace exactamente lo mismo.
phpinfo(INFO_MODULES);
?>
# w3m localhost/index.php
# w3m localhost/info.php
Comentarios
Publicar un comentario
Incluye información que aporte al tema