Thursday, August 8, 2013

Install php

PHP Modules


PHP also has a variety of useful libraries and modules that you can add onto your server. You can see the libraries that are available by typing:
yum search php-

Terminal then will display the list of possible modules. The beginning looks like this:
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-devel.x86_64 : Files needed for building PHP extensions
php-embedded.x86_64 : PHP library for embedding in applications
php-enchant.x86_64 : Human Language and Character Encoding Support
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
To see more details about what each module does, type the following command into terminal, replacing the name of the module with whatever library you want to learn about.
yum info name of the module

Once you decide to install the module, type:


sudo yum install name of the module

rpm –qa | grep –i php
rpm -q php :view version php
The previous command queries the package database to see if any packages with php in the title are installed on the system. After invoking the command, you should see output similar to the following: [root@server ~]# rpm -qa | grep -i php php-domxml-4.3.9-3.9 php-odbc-4.3.9-3.9 php-4.3.9-3.9 php-mysql-4.3.9-3.9 php-pear-4.3.9-3.9 php-pgsql-4.3.9-3.9 php-imap-4.3.9-3.9 [root@server ~]# The output shows that php-4.3.9-3.9 and php-mysql-4.3.9-3.9 are installed. You can also confirm that MySQL is installed by using the following: rpm –qa | grep –I mysql Similar output should follow: [root@server ~]# rpm -qa | grep -i mysql mysql-4.1.12-3.RHEL4.1 mysql-server-4.1.12-3.RHEL4.1 perl-DBD-MySQL-2.9004-3.1 php-mysql-4.3.9-3.9 mod_auth_mysql-2.6.1-2.2 [root@server ~]# To verify that httpd (apache web server) is installed, use the following: [root@server ~]# rpm -qa | grep -i httpd httpd-2.0.52-19.ent.centos4 httpd-suexec-2.0.52-19.ent.centos4 [root@server ~]#

Related Posts:

  • Sưu tập lệnh linh tinh1.Xem service nào đang sử dụng port getent services <port> 2.Xem trạng thái tất cả dịch vụ: service --status-all hay ps -A 3.Xem các gói phần mềm đã cài yum grouplist chkconfig --list | grep :on 4. … Read More
  • Fix cứng DNS resolver trên Linux Hầu hết các  hệ thống GNU/Linux đều được tích hợp và sử dụng DHCP Client. DHCP Client cung cấp phương thức cho việc cấu hình một hay nhiều card mạng sử dụng địa chỉ động (DHCP). Tuy nhiên nó lại làm thay đổi tệp… Read More
  • Khoá nhanh IP đang tấn công DDosBước 1: Lấy danh sách những top connection: netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n Bước 2: chạy command route add IP_ADDRESS reject Bước 3: Gỡ bỏ IP khỏi bảng cấm:route d… Read More
  • Config file mysql server Beyond the defaults In the previous article we covered a basic MySQL server setup on CentOS Linux. We set the root password, created a database, and created a user for the database. Now let's look at MyS… Read More
  • Compress and Uncompress Files1) To compress files: Examples: tar cvf abc.tar a1.ps a2.tex adir/* # compress files to the file abc.tar gzip -9 abc.tar /* # create abc.tar.gz file. tar cvfz abc.tar.gz a1.ps a2.tex adir/* # directly create abc.tar.gz file … Read More