Rabu, 06 November 2013

Install PHP Di Server/VPS Linux

Untuk menginstall PHP Di Server/VPS Linux ikuti langkah di bawah ini,

  • Masuk ke Server/vps anda sebagai root.
  • Ketikan perintah yum install php php-mysql.
  • Cari modul PHP dengan perintah yum search php- dan hasilnya,
[root@yourlinksubmmit ~]# yum search php-
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.ash.fastserv.com
 * extras: mirror.trouble-free.net
 * updates: mirror.atlanticmetro.net
================================ Matched: php- =================================
php-pear.noarch : PHP Extension and Application Repository framework
php-bcmath.x86_64 : A module for PHP applications for using the bcmath library
php-cli.x86_64 : Command-line interface for PHP
php-common.x86_64 : Common files for PHP
php-dba.x86_64 : A database abstraction layer module for PHP applications
php-dbase.x86_64 : Standard dBase module for PHP applications
php-devel.x86_64 : Files needed for building PHP extensions.
php-gd.x86_64 : A module for PHP applications for using the gd graphics library
php-imap.x86_64 : A module for PHP applications that use IMAP.
php-ldap.x86_64 : A module for PHP applications that use LDAP.
php-mbstring.x86_64 : A module for PHP applications which need multi-byte string
                    : handling
php-mcrypt.x86_64 : Standard PHP module provides mcrypt library support
php-mhash.x86_64 : Standard PHP module provides mhash support
php-mssql.x86_64 : Standard PHP module provides mssql support
php-mysql.x86_64 : A module for PHP applications that use MySQL databases.
php-ncurses.x86_64 : A module for PHP applications for using ncurses interfaces
php-odbc.x86_64 : A module for PHP applications that use ODBC databases.
php-pdo.x86_64 : A database access abstraction module for PHP applications
php-pear-Auth-SASL.noarch : PEAR: Abstraction of various SASL mechanism
                          : responses
php-pear-DB.noarch : PEAR: Database Abstraction Layer
php-pear-Date.noarch : Date and Time Zone Classes
php-pear-File.noarch : Common file and directory routines
php-pear-HTTP-Request.noarch : Provides an easy way to perform HTTP requests
php-pear-Log.noarch : Abstracted logging facility for PHP
php-pear-MDB2.noarch : Database Abstraction Layer
php-pear-MDB2-Driver-mysql.noarch : MySQL MDB2 driver
php-pear-Mail.noarch : Class that provides multiple interfaces for sending
                     : emails
php-pear-Mail-Mime.noarch : Classes to create and decode mime messages
php-pear-Net-SMTP.noarch : Provides an implementation of the SMTP protocol
php-pear-Net-Sieve.noarch : Communication with timsieved
php-pear-Net-Socket.noarch : Network Socket Interface
php-pear-Net-URL.noarch : Easy parsing of URLs
php-pecl-Fileinfo.x86_64 : Fileinfo is a PHP extension that wraps the libmagic
                         : library
php-pecl-memcache.x86_64 : Extension to work with the Memcached caching daemon
php-pgsql.x86_64 : A PostgreSQL database module for PHP.
php-readline.x86_64 : Standard PHP module provides readline library support
php-snmp.x86_64 : A module for PHP applications that query SNMP-managed devices.
php-soap.x86_64 : A module for PHP applications that use the SOAP protocol
php-tidy.x86_64 : Standard PHP module provides tidy library support
php-xml.x86_64 : A module for PHP applications which use XML
php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol
php53-bcmath.x86_64 : A module for PHP applications for using the bcmath library
php53-cli.x86_64 : Command-line interface for PHP
php53-common.x86_64 : Common files for PHP
php53-dba.x86_64 : A database abstraction layer module for PHP applications
php53-devel.x86_64 : Files needed for building PHP extensions
php53-gd.x86_64 : A module for PHP applications for using the gd graphics
                : library
php53-imap.x86_64 : A module for PHP applications that use IMAP
php53-intl.x86_64 : Internationalization extension for PHP applications
php53-ldap.x86_64 : A module for PHP applications that use LDAP
php53-mbstring.x86_64 : A module for PHP applications which need multi-byte
                      : string handling
php53-mysql.x86_64 : A module for PHP applications that use MySQL databases
php53-odbc.x86_64 : A module for PHP applications that use ODBC databases
php53-pgsql.x86_64 : A PostgreSQL database module for PHP
php53-process.x86_64 : Modules for PHP script using system process interfaces
php53-pspell.x86_64 : A module for PHP applications for using pspell interfaces
php53-snmp.x86_64 : A module for PHP applications that query SNMP-managed
                  : devices
php53-soap.x86_64 : A module for PHP applications that use the SOAP protocol
php53-xml.x86_64 : A module for PHP applications which use XML
php53-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC
                    : protocol
[root@yourlinksubmmit ~]#
  • Langkah selanjutnya buat file info.php dengan perintah nano /var/www/html/info.php
  • Dan isikan.
<?php
phpinfo();
?>
  • Restart Apache/httpd dengan perintah service httpd restart.
  • Langkah terakhir buka IPSERVER?VPS/info.php .
Kurang lebih tampilan PHP anda seperti di bawah ini,