Colaboração: Andre Jaccon
Neste tutorial irei mostrar como configurar o Apache 2, PHP5, MySQL e PHPMyadmin, em um exemplo passo a passo.
Considerações iniciais:
Software:
- SO: Red Hat 9.0
- Kernel: 2.4.30
Hardware:
=========
- IBM Netfinity Xeon 3 GHZ
- Memória: 512 MB RAM ECC
- Disco Rigído: 36 GB UW SCSI.
Para organizar vamos criar um diretório no qual ficará os arquivos nos quais iremos compilar, em meu exemplo criei um diretório em /LAMP2
depois entre no diretório pré-criado siga os passos abaixo:
$ cd LAMP2
1) Configurando o biblioteca LibXML2
$ tar -zxvf libxml2-2.6.0.tar.gz
$ cd libxml2-2.6.0
$ /configure
$ make
$ su
# make install
2) Configurando a biblioteca zLIB
$tar -zxvf zlib-1.2.2.tar.gz
$cd zlib-1.2.2
$./configure
$ make
$ su
# make install
3) Configurando o Apache 2
$ tar -zxvf httpd-2.0.52.tar.gz
$ cd httpd-2.0.52
$./configure –prefix=/usr/local/apache2 –enable-cgi –enable-so –enable-rewrite –enable-mime-magic –enable-suexec –enable-static-rotateslogs –enable-spellig –enable-log-forensic
$ make
$ su
# make install
4) MySQL
# groupadd mysql
# useradd -g mysql mysql
# cd /usr/local
# gunzip < /path/para/mysql/compactado.tar.gz |tar -xvf -
# ln -s mysql-full-path mysql
# cd mysql
# scripts/mysql_install_db
# chown -R root .
# chown -R mysql data
# chgrp -R mysql .
# bin/mysqld_safe --user=mysql &
Para conferir se o MySQL foi iniciado use ps -aef | grep mysql
5) PHP5
$ tar -zxvf php-5.0.3.RC1.tar.gz
$ cd php-5.0.3
$ ./configure –with-apxs2=/usr/local/apache2/bin/apxs –with-mysql=/usr/local/mysql –prefix=/usr/local/apache2/php –with-config-file-path=/usr/local/apache2/php –enable-force-cgi-redirect –disable-cgi –with-z=/usr/include/linux
6) Configurando Apache2 com suporte a PHP5
Para configurar o Apache 2 com suporte a PHP5 primeiramente iremos criar um link simbólico dentro do diretório /etc/ apontando para /usr/local/apache2
# cd /etc/
# ln -s /usr/local/apache2 .
# cd /etc/apache2
Antes de alterar os dados do arquivo original de configuração do Apache 2 faça um backup do arquivo:
# cp /etc/apache2/conf/httpd.conf /etc/apache2/conf/httpd.conf.original
Editando o arquivo httpd.conf
edite o arquivo httpd.conf adicionando as seguintes linhas:
DirectoryIndex index.html index.html.var index.cgi index.php index.php4 index.php5 default.html default.php blank.html
ServerName o-nome-para-seu-servidor-web
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php php
AddType application/x-httpd-php-source phps
#ServerTokens
ServerSignatures Off
Para testar o suporte ao PHP5 no Apache2, crie um arquivo no diretório público do apache com o seguinte conteúdo.Em nosso exemplo crieremos um arquivo chamado info.php
| System |
Linux box429.bluehost.com 2.6.32-20120131.55.1.bh6.x86_64 #1 SMP Tue Jan 31 15:43:27 EST 2012 x86_64 |
| Build Date |
May 12 2012 17:13:52 |
| Configure Command |
'./configure' '–build=x86_64-unknown-linux-gnu' '–host=x86_64-unknown-linux-gnu' '–target=x86_64-redhat-linux-gnu' '–program-prefix=' '–prefix=/usr' '–exec-prefix=/usr' '–bindir=/usr/bin' '–sbindir=/usr/sbin' '–sysconfdir=/etc' '–datadir=/usr/share' '–includedir=/usr/include' '–libdir=/usr/lib64' '–libexecdir=/usr/libexec' '–localstatedir=/var' '–sharedstatedir=/var/lib' '–mandir=/usr/share/man' '–infodir=/usr/share/info' '–with-config-file-scan-dir=/etc/php.d' '–cache-file=../config.cache' '–with-libdir=lib64' '–with-pic' '–disable-rpath' '–disable-debug' '–enable-inline-optimization' '–without-pear' '–with-bz2' '–with-curl' '–with-exec-dir=/usr/bin' '–with-freetype-dir=/usr' '–with-png-dir=/usr' '–enable-gd-native-ttf' '–without-gdbm' '–with-gettext' '–with-gmp' '–with-iconv' '–with-jpeg-dir=/usr' '–with-openssl' '–with-png' '–with-pspell' '–with-expat-dir=/usr' '–with-zlib' '–with-layout=GNU' '–enable-exif' '–enable-ftp' '–enable-magic-quotes' '–enable-sockets' '–enable-sysvsem' '–enable-sysvshm' '–enable-sysvmsg' '–enable-track-vars' '–enable-trans-sid' '–enable-yp' '–enable-wddx' '–with-kerberos' '–with-unixODBC=/usr' '–enable-memory-limit' '–enable-shmop' '–enable-calendar' '–enable-dbx' '–enable-dio' '–with-mime-magic' '–with-sqlite' '–with-libxml-dir=/usr' '–with-xml' '–with-system-tzdata' '–enable-pcntl' '–enable-static' '–with-imap' '–with-imap-ssl' '–enable-mbstring' '–enable-mbstr-enc-trans' '–enable-mbregex' '–with-mcrypt=/usr' '–with-mhash=/usr' '–with-tidy=/usr' '–with-ncurses' '–with-gd' '–enable-bcmath' '–enable-dba' '–with-db4=/usr' '–with-xmlrpc' '–with-ldap' '–with-ldap-sasl' '–with-mysql=/usr' '–with-mysqli=/usr/bin/mysql_config' '–with-mysql-sock=/var/lib/mysql/mysql.sock' '–enable-dom' '–with-dom-xslt=/usr' '–with-dom-exslt=/usr' '–with-pgsql' '–enable-soap' '–with-xsl=/usr' '–enable-fastcgi' '–enable-pdo' '–with-pdo-odbc=unixODBC,/usr' '–with-pdo-mysql=/usr' '–with-pdo-pgsql=/usr' '–with-pdo-sqlite=/usr' '–with-pdo-dblib=/usr' '–enable-json' '–enable-zip' '–with-readline' '–with-intl' '–enable-dbase' |
| Server API |
CGI/FastCGI |
| Virtual Directory Support |
disabled |
| Configuration File (php.ini) Path |
/etc |
| Loaded Configuration File |
/etc/php.ini |
| Scan this dir for additional .ini files |
/etc/php.d |
| additional .ini files parsed |
(none) |
| PHP API |
20041225 |
| PHP Extension |
20060613 |
| Zend Extension |
220060519 |
| Debug Build |
no |
| Thread Safety |
disabled |
| Zend Memory Manager |
enabled |
| IPv6 Support |
enabled |
| Registered PHP Streams |
https, ftps, compress.zlib, compress.bzip2, php, file, data, http, ftp, zip |
| Registered Stream Socket Transports |
tcp, udp, unix, udg, ssl, sslv3, sslv2, tls |
| Registered Stream Filters |
zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed |
This program makes use of the Zend Scripting Language Engine: Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies |
Configuration
PHP Core
| Directive |
Local Value |
Master Value |
| allow_call_time_pass_reference |
On |
On |
| allow_url_fopen |
On |
On |
| allow_url_include |
On |
On |
| always_populate_raw_post_data |
Off |
Off |
| arg_separator.input |
& |
& |
| arg_separator.output |
& |
& |
| asp_tags |
Off |
Off |
| auto_append_file |
no value |
no value |
| auto_globals_jit |
On |
On |
| auto_prepend_file |
no value |
no value |
| browscap |
no value |
no value |
| default_charset |
no value |
no value |
| default_mimetype |
text/html |
text/html |
| define_syslog_variables |
Off |
Off |
| disable_classes |
no value |
no value |
| disable_functions |
no value |
no value |
| display_errors |
Off |
Off |
| display_startup_errors |
Off |
Off |
| doc_root |
no value |
no value |
| docref_ext |
no value |
no value |
| docref_root |
no value |
no value |
| enable_dl |
On |
On |
| error_append_string |
no value |
no value |
| error_log |
no value |
error_log |
| error_prepend_string |
no value |
no value |
| error_reporting |
4983 |
6135 |
| expose_php |
Off |
Off |
| extension_dir |
/usr/lib64/php/modules |
/usr/lib64/php/modules |
| file_uploads |
On |
On |
| highlight.bg |
#FFFFFF |
#FFFFFF |
| highlight.comment |
#FF8000 |
#FF8000 |
| highlight.default |
#0000BB |
#0000BB |
| highlight.html |
#000000 |
#000000 |
| highlight.keyword |
#007700 |
#007700 |
| highlight.string |
#DD0000 |
#DD0000 |
| html_errors |
On |
On |
| ignore_repeated_errors |
On |
On |
| ignore_repeated_source |
On |
On |
| ignore_user_abort |
On |
Off |
| implicit_flush |
Off |
Off |
| include_path |
.:/usr/lib64/php:/usr/lib/php:/usr/share/pear |
.:/usr/lib64/php:/usr/lib/php:/usr/share/pear |
| log_errors |
Off |
On |
| log_errors_max_len |
1024 |
1024 |
| magic_quotes_gpc |
On |
On |
| magic_quotes_runtime |
Off |
Off |
| magic_quotes_sybase |
Off |
Off |
| mail.force_extra_parameters |
no value |
no value |
| max_execution_time |
0 |
30 |
| max_file_uploads |
20 |
20 |
| max_input_nesting_level |
64 |
64 |
| max_input_time |
60 |
60 |
| max_input_vars |
1000 |
1000 |
| memory_limit |
64M |
64M |
| open_basedir |
no value |
no value |
| output_buffering |
no value |
no value |
| output_handler |
no value |
no value |
| post_max_size |
10M |
10M |
| precision |
12 |
12 |
| realpath_cache_size |
16K |
16K |
| realpath_cache_ttl |
120 |
120 |
| register_argc_argv |
On |
On |
| register_globals |
Off |
Off |
| register_long_arrays |
Off |
Off |
| report_memleaks |
On |
On |
| report_zend_debug |
On |
On |
| safe_mode |
Off |
Off |
| safe_mode_exec_dir |
no value |
no value |
| safe_mode_gid |
Off |
Off |
| safe_mode_include_dir |
no value |
no value |
| sendmail_from |
no value |
no value |
| sendmail_path |
/usr/sbin/sendmail -t -i |
/usr/sbin/sendmail -t -i |
| serialize_precision |
100 |
100 |
| short_open_tag |
On |
On |
| SMTP |
localhost |
localhost |
| smtp_port |
25 |
25 |
| sql.safe_mode |
Off |
Off |
| suhosin.log.phpscript |
0 |
0 |
| suhosin.log.phpscript.is_safe |
Off |
Off |
| suhosin.log.phpscript.name |
no value |
no value |
| suhosin.log.sapi |
no value |
no value |
| suhosin.log.script |
no value |
no value |
| suhosin.log.script.name |
no value |
no value |
| suhosin.log.syslog |
no value |
no value |
| suhosin.log.syslog.facility |
no value |
no value |
| suhosin.log.syslog.priority |
no value |
no value |
| suhosin.log.use-x-forwarded-for |
Off |
Off |
| track_errors |
Off |
Off |
| unserialize_callback_func |
no value |
no value |
| upload_max_filesize |
10M |
10M |
| upload_tmp_dir |
no value |
no value |
| user_dir |
no value |
no value |
| variables_order |
EGPCS |
EGPCS |
| xmlrpc_error_number |
0 |
0 |
| xmlrpc_errors |
Off |
Off |
| y2k_compliance |
On |
On |
| zend.ze1_compatibility_mode |
Off |
Off |
| BZip2 Support |
Enabled |
| Stream Wrapper support |
compress.bz2:// |
| Stream Filter support |
bzip2.decompress, bzip2.compress |
| BZip2 Version |
1.0.5, 10-Dec-2007 |
| Directive |
Local Value |
Master Value |
| cgi.check_shebang_line |
1 |
1 |
| cgi.fix_pathinfo |
1 |
1 |
| cgi.nph |
0 |
0 |
| cgi.rfc2616_headers |
0 |
0 |
| fastcgi.logging |
1 |
1 |
| cURL support |
enabled |
| cURL Information |
libcurl/7.24.0 OpenSSL/1.0.0 zlib/1.2.3 c-ares/1.7.0 libidn/1.18 libssh2/1.2.2 |
| date/time support |
enabled |
| "Olson" Timezone Database Version |
0.system |
| Timezone Database |
internal |
| Default timezone |
UTC |
| Directive |
Local Value |
Master Value |
| date.default_latitude |
31.7667 |
31.7667 |
| date.default_longitude |
35.2333 |
35.2333 |
| date.sunrise_zenith |
90.583333 |
90.583333 |
| date.sunset_zenith |
90.583333 |
90.583333 |
| date.timezone |
America/Denver |
America/Denver |
| DBA support |
enabled |
| Supported handlers |
cdb cdb_make db4 inifile flatfile |
| DOM/XML |
enabled |
| DOM/XML API Version |
20031129 |
| libxml Version |
2.7.6 |
| HTML Support |
enabled |
| XPath Support |
enabled |
| XPointer Support |
enabled |
| Schema Support |
enabled |
| RelaxNG Support |
enabled |
| EXIF Support |
enabled |
| EXIF Version |
1.4 $Id: exif.c 293036 2010-01-03 09:23:27Z sebastian $ |
| Supported EXIF Version |
0220 |
| Supported filetypes |
JPEG,TIFF |
| Input Validation and Filtering |
enabled |
| Revision |
$Revision: 298196 $ |
| Directive |
Local Value |
Master Value |
| filter.default |
unsafe_raw |
unsafe_raw |
| filter.default_flags |
no value |
no value |
| GD Support |
enabled |
| GD Version |
bundled (2.0.34 compatible) |
| FreeType Support |
enabled |
| FreeType Linkage |
with freetype |
| FreeType Version |
2.3.11 |
| GIF Read Support |
enabled |
| GIF Create Support |
enabled |
| JPG Support |
enabled |
| PNG Support |
enabled |
| WBMP Support |
enabled |
| XBM Support |
enabled |
| gmp support |
enabled |
| GMP version |
4.3.1 |
| hash support |
enabled |
| Hashing Engines |
md2 md4 md5 sha1 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru gost adler32 crc32 crc32b haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5 |
| iconv support |
enabled |
| iconv implementation |
glibc |
| iconv library version |
2.12 |
| Directive |
Local Value |
Master Value |
| iconv.input_encoding |
ISO-8859-1 |
ISO-8859-1 |
| iconv.internal_encoding |
ISO-8859-1 |
ISO-8859-1 |
| iconv.output_encoding |
ISO-8859-1 |
ISO-8859-1 |
| IMAP c-Client Version |
2007e |
| SSL Support |
enabled |
| Kerberos Support |
enabled |
| json support |
enabled |
| json version |
1.2.1 |
| LDAP Support |
enabled |
| RCS Version |
$Id: ldap.c 293036 2010-01-03 09:23:27Z sebastian $ |
| Total Links |
0/unlimited |
| API Version |
3001 |
| Vendor Name |
OpenLDAP |
| Vendor Version |
20423 |
| SASL Support |
Enabled |
| libXML support |
active |
| libXML Version |
2.7.6 |
| libXML streams |
enabled |
| Multibyte Support |
enabled |
| Multibyte string engine |
libmbfl |
| Multibyte (japanese) regex support |
enabled |
| Multibyte regex (oniguruma) version |
4.4.4 |
| Multibyte regex (oniguruma) backtrack check |
On |
| mbstring extension makes use of “streamable kanji code filter and converter”, which is distributed under the GNU Lesser General Public License version 2.1. |
| Directive |
Local Value |
Master Value |
| mbstring.detect_order |
no value |
no value |
| mbstring.encoding_translation |
Off |
Off |
| mbstring.func_overload |
0 |
0 |
| mbstring.http_input |
pass |
pass |
| mbstring.http_output |
pass |
pass |
| mbstring.internal_encoding |
no value |
no value |
| mbstring.language |
neutral |
neutral |
| mbstring.strict_detection |
Off |
Off |
| mbstring.substitute_character |
no value |
no value |
| mcrypt support |
enabled |
| Version |
2.5.8 |
| Api No |
20021217 |
| Supported ciphers |
cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes |
| Supported modes |
cbc cfb ctr ecb ncfb nofb ofb stream |
| Directive |
Local Value |
Master Value |
| mcrypt.algorithms_dir |
no value |
no value |
| mcrypt.modes_dir |
no value |
no value |
| MHASH support |
Enabled |
| MHASH API Version |
20060101 |
| mime_magic support |
enabled |
| Directive |
Local Value |
Master Value |
| mime_magic.debug |
Off |
Off |
| mime_magic.magicfile |
/usr/local/apache/conf/magic |
/usr/local/apache/conf/magic |
| MySQL Support |
enabled |
| Active Persistent Links |
0 |
| Active Links |
1 |
| Client API version |
5.1.61 |
| MYSQL_MODULE_TYPE |
external |
| MYSQL_SOCKET |
/var/lib/mysql/mysql.sock |
| MYSQL_INCLUDE |
-I/usr/include/mysql |
| MYSQL_LIBS |
-L/usr/lib64 -lmysqlclient |
| Directive |
Local Value |
Master Value |
| mysql.allow_persistent |
On |
On |
| mysql.connect_timeout |
60 |
60 |
| mysql.default_host |
no value |
no value |
| mysql.default_password |
no value |
no value |
| mysql.default_port |
no value |
no value |
| mysql.default_socket |
no value |
no value |
| mysql.default_user |
no value |
no value |
| mysql.max_links |
Unlimited |
Unlimited |
| mysql.max_persistent |
Unlimited |
Unlimited |
| mysql.trace_mode |
Off |
Off |
| MysqlI Support |
enabled |
| Client API library version |
5.1.61 |
| Client API header version |
5.1.61 |
| MYSQLI_SOCKET |
/var/lib/mysql/mysql.sock |
| Directive |
Local Value |
Master Value |
| mysqli.default_host |
no value |
no value |
| mysqli.default_port |
3306 |
3306 |
| mysqli.default_pw |
no value |
no value |
| mysqli.default_socket |
no value |
no value |
| mysqli.default_user |
no value |
no value |
| mysqli.max_links |
Unlimited |
Unlimited |
| mysqli.reconnect |
Off |
Off |
| ncurses support |
enabled |
| ncurses library version |
5.7 |
| color support |
yes |
| ODBC Support |
enabled |
| Active Persistent Links |
0 |
| Active Links |
0 |
| ODBC library |
unixODBC |
| ODBC_INCLUDE |
-I/usr/include |
| ODBC_LFLAGS |
-L/usr/lib64 |
| ODBC_LIBS |
-lodbc |
| Directive |
Local Value |
Master Value |
| odbc.allow_persistent |
On |
On |
| odbc.check_persistent |
On |
On |
| odbc.default_cursortype |
Static cursor |
Static cursor |
| odbc.default_db |
no value |
no value |
| odbc.default_pw |
no value |
no value |
| odbc.default_user |
no value |
no value |
| odbc.defaultbinmode |
return as is |
return as is |
| odbc.defaultlrl |
return up to 4096 bytes |
return up to 4096 bytes |
| odbc.max_links |
Unlimited |
Unlimited |
| odbc.max_persistent |
Unlimited |
Unlimited |
| OpenSSL support |
enabled |
| OpenSSL Version |
OpenSSL 1.0.0-fips 29 Mar 2010 |
| PCRE (Perl Compatible Regular Expressions) Support |
enabled |
| PCRE Library Version |
8.02 2010-03-19 |
| Directive |
Local Value |
Master Value |
| pcre.backtrack_limit |
200000 |
200000 |
| pcre.recursion_limit |
200000 |
200000 |
| PDO support |
enabled |
| PDO drivers |
dblib, mysql, odbc, pgsql, sqlite, sqlite2 |
| PDO Driver for FreeTDS/Sybase DB-lib |
enabled |
| Flavour |
freetds |
| PDO Driver for MySQL, client library version |
5.1.61 |
| PDO Driver for ODBC (unixODBC) |
enabled |
| ODBC Connection Pooling |
Enabled, strict matching |
| PDO Driver for PostgreSQL |
enabled |
| PostgreSQL(libpq) Version |
8.4.9 |
| Module version |
1.0.2 |
| Revision |
$Id: pdo_pgsql.c 293036 2010-01-03 09:23:27Z sebastian $ |
| PDO Driver for SQLite 3.x |
enabled |
| PECL Module version |
1.0.1 $Id: pdo_sqlite.c 293036 2010-01-03 09:23:27Z sebastian $ |
| SQLite Library |
3.6.20 |
| PostgreSQL Support |
enabled |
| PostgreSQL(libpq) Version |
8.4.9 |
| Multibyte character support |
enabled |
| SSL support |
enabled |
| Active Persistent Links |
0 |
| Active Links |
0 |
| Directive |
Local Value |
Master Value |
| pgsql.allow_persistent |
On |
On |
| pgsql.auto_reset_persistent |
Off |
Off |
| pgsql.ignore_notice |
Off |
Off |
| pgsql.log_notice |
Off |
Off |
| pgsql.max_links |
Unlimited |
Unlimited |
| pgsql.max_persistent |
Unlimited |
Unlimited |
| Revision |
$Revision: 293036 $ |
| Reflection |
enabled |
| Version |
$Id: php_reflection.c 300129 2010-06-03 00:43:37Z felipe $ |
| Session Support |
enabled |
| Registered save handlers |
files user sqlite |
| Registered serializer handlers |
php php_binary wddx |
| Directive |
Local Value |
Master Value |
| session.auto_start |
Off |
Off |
| session.bug_compat_42 |
On |
On |
| session.bug_compat_warn |
On |
On |
| session.cache_expire |
180 |
180 |
| session.cache_limiter |
nocache |
nocache |
| session.cookie_domain |
no value |
no value |
| session.cookie_httponly |
Off |
Off |
| session.cookie_lifetime |
0 |
0 |
| session.cookie_path |
/ |
/ |
| session.cookie_secure |
Off |
Off |
| session.entropy_file |
no value |
no value |
| session.entropy_length |
0 |
0 |
| session.gc_divisor |
100 |
100 |
| session.gc_maxlifetime |
1440 |
1440 |
| session.gc_probability |
1 |
1 |
| session.hash_bits_per_character |
5 |
5 |
| session.hash_function |
0 |
0 |
| session.name |
PHPSESSID |
PHPSESSID |
| session.referer_check |
no value |
no value |
| session.save_handler |
files |
files |
| session.save_path |
/tmp |
/tmp |
| session.serialize_handler |
php |
php |
| session.use_cookies |
On |
On |
| session.use_only_cookies |
Off |
Off |
| session.use_trans_sid |
0 |
0 |
| Simplexml support |
enabled |
| Revision |
$Revision: 299016 $ |
| Schema support |
enabled |
| Soap Client |
enabled |
| Soap Server |
enabled |
| Directive |
Local Value |
Master Value |
| soap.wsdl_cache |
1 |
1 |
| soap.wsdl_cache_dir |
/tmp |
/tmp |
| soap.wsdl_cache_enabled |
1 |
1 |
| soap.wsdl_cache_limit |
5 |
5 |
| soap.wsdl_cache_ttl |
86400 |
86400 |
| SPL support |
enabled |
| Interfaces |
Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject |
| Classes |
AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilterIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RegexIterator, RuntimeException, SimpleXMLIterator, SplFileInfo, SplFileObject, SplObjectStorage, SplTempFileObject, UnderflowException, UnexpectedValueException |
| SQLite support |
enabled |
| PECL Module version |
2.0-dev $Id: sqlite.c 298697 2010-04-28 12:10:10Z iliaa $ |
| SQLite Library |
2.8.17 |
| SQLite Encoding |
iso8859 |
| Directive |
Local Value |
Master Value |
| sqlite.assoc_case |
0 |
0 |
| Regex Library |
Bundled library enabled |
| Dynamic Library Support |
enabled |
| Path to sendmail |
/usr/sbin/sendmail -t -i |
| Directive |
Local Value |
Master Value |
| assert.active |
1 |
1 |
| assert.bail |
0 |
0 |
| assert.callback |
no value |
no value |
| assert.quiet_eval |
0 |
0 |
| assert.warning |
1 |
1 |
| auto_detect_line_endings |
0 |
0 |
| default_socket_timeout |
60 |
60 |
| safe_mode_allowed_env_vars |
PHP_ |
PHP_ |
| safe_mode_protected_env_vars |
LD_LIBRARY_PATH |
LD_LIBRARY_PATH |
| url_rewriter.tags |
a=href,area=href,frame=src,input=src,form=,fieldset= |
a=href,area=href,frame=src,input=src,form=,fieldset= |
| user_agent |
no value |
no value |
| sysvmsg support |
enabled |
| Revision |
$Revision: 293036 $ |
| Tidy support |
enabled |
| libTidy Release |
14 June 2007 |
| Extension Version |
2.0 ($Id: tidy.c 293036 2010-01-03 09:23:27Z sebastian $) |
| Directive |
Local Value |
Master Value |
| tidy.clean_output |
no value |
no value |
| tidy.default_config |
no value |
no value |
| Tokenizer Support |
enabled |
| WDDX Support |
enabled |
| WDDX Session Serializer |
enabled |
| XML Support |
active |
| XML Namespace Support |
active |
| libxml2 Version |
2.7.6 |
| core library version |
xmlrpc-epi v. 0.51 |
| php extension version |
0.51 |
| author |
Dan Libby |
| homepage |
http://xmlrpc-epi.sourceforge.net |
| open sourced by |
Epinions.com |
| XSL |
enabled |
| libxslt Version |
1.1.26 |
| libxslt compiled against libxml Version |
2.7.6 |
| EXSLT |
enabled |
| libexslt Version |
1.1.26 |
| Optimization Pass 1 |
enabled |
| Optimization Pass 2 |
enabled |
| Optimization Pass 3 |
enabled |
| Optimization Pass 4 |
enabled |
| Optimization Pass 9 |
enabled |
| Zend Loader |
enabled |
| License Path |
no value |
| Obfuscation level |
3 |
| Zip |
enabled |
| Extension Version |
$Id: php_zip.c 305848 2010-11-30 11:04:06Z pajoye $ |
| Zip version |
1.8.11 |
| Libzip version |
0.9.0 |
| ZLib Support |
enabled |
| Stream Wrapper support |
compress.zlib:// |
| Stream Filter support |
zlib.inflate, zlib.deflate |
| Compiled Version |
1.2.3 |
| Linked Version |
1.2.3 |
| Directive |
Local Value |
Master Value |
| zlib.output_compression |
Off |
Off |
| zlib.output_compression_level |
-1 |
-1 |
| zlib.output_handler |
no value |
no value |
Additional Modules
| Module Name |
| dbase |
| readline |
| sysvsem |
| sysvshm |
Environment
| Variable |
Value |
| DOCUMENT_ROOT |
/home2/artenaag/public_html/torradeira |
| GATEWAY_INTERFACE |
CGI/1.1 |
| HTTP_ACCEPT |
text/html,application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 |
| HTTP_ACCEPT_CHARSET |
ISO-8859-1,utf-8;q=0.7,*;q=0.7 |
| HTTP_ACCEPT_ENCODING |
gzip |
| HTTP_ACCEPT_LANGUAGE |
en-us,en;q=0.5 |
| HTTP_CACHE_CONTROL |
no-cache |
| HTTP_CONNECTION |
close |
| HTTP_HOST |
torradeira.net |
| HTTP_PRAGMA |
no-cache |
| HTTP_USER_AGENT |
CCBot/1.0 (+http://www.commoncrawl.org/bot.html) |
| HTTP_X_CC_ID |
ccc04-02 |
| PATH |
/bin:/usr/bin |
| QUERY_STRING |
no value |
| REDIRECT_STATUS |
200 |
| REDIRECT_URL |
/configurando-apache2php5mysqlphpmyadmin/ |
| REDIRECT_file_gzip |
/ramdisk/cpud/status |
| REMOTE_ADDR |
38.107.179.241 |
| REMOTE_PORT |
43898 |
| REQUEST_METHOD |
GET |
| REQUEST_URI |
/configurando-apache2php5mysqlphpmyadmin/ |
| SCRIPT_FILENAME |
/home2/artenaag/public_html/torradeira/index.php |
| SCRIPT_NAME |
/index.php |
| SERVER_ADDR |
69.89.31.229 |
| SERVER_ADMIN |
webmaster@torradeira.artenaagenda.com.br |
| SERVER_NAME |
torradeira.net |
| SERVER_PORT |
80 |
| SERVER_PROTOCOL |
HTTP/1.1 |
| SERVER_SIGNATURE |
<address>Apache Server at torradeira.net Port 80</address>
|
| SERVER_SOFTWARE |
Apache |
| file_gzip |
/ramdisk/cpud/status |
PHP Variables
| Variable |
Value |
| PHP_SELF |
/index.php |
| _SERVER["SERVER_SOFTWARE"] |
Apache |
| _SERVER["REQUEST_URI"] |
/configurando-apache2php5mysqlphpmyadmin/ |
| _SERVER["DOCUMENT_ROOT"] |
/home2/artenaag/public_html/torradeira |
| _SERVER["GATEWAY_INTERFACE"] |
CGI/1.1 |
| _SERVER["HTTP_ACCEPT"] |
text/html,application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 |
| _SERVER["HTTP_ACCEPT_CHARSET"] |
ISO-8859-1,utf-8;q=0.7,*;q=0.7 |
| _SERVER["HTTP_ACCEPT_ENCODING"] |
gzip |
| _SERVER["HTTP_ACCEPT_LANGUAGE"] |
en-us,en;q=0.5 |
| _SERVER["HTTP_CACHE_CONTROL"] |
no-cache |
| _SERVER["HTTP_CONNECTION"] |
close |
| _SERVER["HTTP_HOST"] |
torradeira.net |
| _SERVER["HTTP_PRAGMA"] |
no-cache |
| _SERVER["HTTP_USER_AGENT"] |
CCBot/1.0 (+http://www.commoncrawl.org/bot.html) |
| _SERVER["HTTP_X_CC_ID"] |
ccc04-02 |
| _SERVER["PATH"] |
/bin:/usr/bin |
| _SERVER["QUERY_STRING"] |
no value |
| _SERVER["REDIRECT_STATUS"] |
200 |
| _SERVER["REDIRECT_URL"] |
/configurando-apache2php5mysqlphpmyadmin/ |
| _SERVER["REDIRECT_file_gzip"] |
/ramdisk/cpud/status |
| _SERVER["REMOTE_ADDR"] |
38.107.179.241 |
| _SERVER["REMOTE_PORT"] |
43898 |
| _SERVER["REQUEST_METHOD"] |
GET |
| _SERVER["SCRIPT_FILENAME"] |
/home2/artenaag/public_html/torradeira/index.php |
| _SERVER["SCRIPT_NAME"] |
/index.php |
| _SERVER["SERVER_ADDR"] |
69.89.31.229 |
| _SERVER["SERVER_ADMIN"] |
webmaster@torradeira.artenaagenda.com.br |
| _SERVER["SERVER_NAME"] |
torradeira.net |
| _SERVER["SERVER_PORT"] |
80 |
| _SERVER["SERVER_PROTOCOL"] |
HTTP/1.1 |
| _SERVER["SERVER_SIGNATURE"] |
<address>Apache Server at torradeira.net Port 80</address>
|
| _SERVER["file_gzip"] |
/ramdisk/cpud/status |
| _SERVER["PHP_SELF"] |
/index.php |
| _SERVER["REQUEST_TIME"] |
1337642127 |
| _SERVER["argv"] |
Array
(
)
|
| _SERVER["argc"] |
0 |
| _ENV["DOCUMENT_ROOT"] |
/home2/artenaag/public_html/torradeira |
| _ENV["GATEWAY_INTERFACE"] |
CGI/1.1 |
| _ENV["HTTP_ACCEPT"] |
text/html,application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 |
| _ENV["HTTP_ACCEPT_CHARSET"] |
ISO-8859-1,utf-8;q=0.7,*;q=0.7 |
| _ENV["HTTP_ACCEPT_ENCODING"] |
gzip |
| _ENV["HTTP_ACCEPT_LANGUAGE"] |
en-us,en;q=0.5 |
| _ENV["HTTP_CACHE_CONTROL"] |
no-cache |
| _ENV["HTTP_CONNECTION"] |
close |
| _ENV["HTTP_HOST"] |
torradeira.net |
| _ENV["HTTP_PRAGMA"] |
no-cache |
| _ENV["HTTP_USER_AGENT"] |
CCBot/1.0 (+http://www.commoncrawl.org/bot.html) |
| _ENV["HTTP_X_CC_ID"] |
ccc04-02 |
| _ENV["PATH"] |
/bin:/usr/bin |
| _ENV["QUERY_STRING"] |
no value |
| _ENV["REDIRECT_STATUS"] |
200 |
| _ENV["REDIRECT_URL"] |
/configurando-apache2php5mysqlphpmyadmin/ |
| _ENV["REDIRECT_file_gzip"] |
/ramdisk/cpud/status |
| _ENV["REMOTE_ADDR"] |
38.107.179.241 |
| _ENV["REMOTE_PORT"] |
43898 |
| _ENV["REQUEST_METHOD"] |
GET |
| _ENV["REQUEST_URI"] |
/configurando-apache2php5mysqlphpmyadmin/ |
| _ENV["SCRIPT_FILENAME"] |
/home2/artenaag/public_html/torradeira/index.php |
| _ENV["SCRIPT_NAME"] |
/index.php |
| _ENV["SERVER_ADDR"] |
69.89.31.229 |
| _ENV["SERVER_ADMIN"] |
webmaster@torradeira.artenaagenda.com.br |
| _ENV["SERVER_NAME"] |
torradeira.net |
| _ENV["SERVER_PORT"] |
80 |
| _ENV["SERVER_PROTOCOL"] |
HTTP/1.1 |
| _ENV["SERVER_SIGNATURE"] |
<address>Apache Server at torradeira.net Port 80</address>
|
| _ENV["SERVER_SOFTWARE"] |
Apache |
| _ENV["file_gzip"] |
/ramdisk/cpud/status |
PHP License
|
This program is free software; you can redistribute it and/or modify it under the terms of the PHP License as published by the PHP Group and included in the distribution in the file: LICENSE
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact license@php.net.
|
execute via browser o caminho do seu servidor mais o nome do arquivo phpinfo.
Ex:
http://10.0.0.1/info.php
Configurando o MySQL
====================
O primeiro passo para configurar o MySQL é adicionar a senha do usuário Root do MySQL, para isso use o comando
# /usr/local/mysql/bin/mysqladmin -u root password sua-senha-aqui
Um Ótimo aplicativo para gerênciamento do MySQL é o phpMyadmin, com ele você poderá¡ adicionar,remover, alterar , Dropar fazer Querys e muito mais junto a MySQL ainda contando com uma interface Web muito amigavél.
Para instalar ele entre na pasta PHP e descompacte o aplicativo phpMyadmin:
$ tar -zxvf phpMyadmin-2.6.2.tar.gz
copie a pasta descompactada para dentro do diretório público do Apache 2, caso você ainda não saiba qual o diretório público do Apache 2 de acordo com nossa instalação, o caminho está logo abaixo:
/usr/local/apache2/htdocs
Então sabendo o caminho copie a pasta do phpMyadmin para dentro de Htdocs
# cp -Rvf phpMyadmin-2.6.2 /usr/local/apache2/htdocs/phpmyadmin
Agora devemos configurar o arquivo config.inc.php que gerência a conexão do phpMyadmin ao MySQL:
# vi /usr/local/apache2/htdocs/phpmyadmin/config.inc.php
Procure pelas linhas:
$cfg['Servers'][$i]['auth_type'] = ‘config’; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = ‘root’; // MySQL user
$cfg['Servers'][$i]['password'] = ‘sua-senha-aqui’; // MySQL password (only needed
e também:
$cfg['Servers'][$i]['user'] = ‘root’;
$cfg['Servers'][$i]['password'] = ‘sua-senha-aqui’;
Salve o arquivo agora e saia.
Para testar o phpMyadmin entre com o endereço em seu navegador:
http://endereço-de-seu-servidor/phpmyadmin/
Por segurança é ideal que você coloque um sistema de autênticação no phpMyadmin pois desta forma qualquer pessoa através da web conseguiria manipular com poderes de root
suas bases de dados.
Lembramos ainda que as configurações acima são básicas, para um servidor em produção é necessário que seja verificado todos os recursos necessários e configurados
acima dos exemplos dados acima.
fonte: dicas-l
March 17th, 2008 at 04:17
Um abraço.