Yum Install PHP Environment

Source: Internet
Author: User
Tags ldap pear php mysql php script mysql login phpmyadmin

Install PHP environment under CentOS
    • |
    • Browse:3831
    • |
    • Updated: 2014-11-04 17:01
    • 1
    • 2
    • 3
Step through Reading

On the internet to see a lot, many can not be used, so the practice can be used, the process of recording, convenient for themselves and netizens later to view

Tools/Materials
    • CentOS 6.5 System
    • Internet
    • Yum, basic system comes with, no self-installing a
Method/Step
  1. All you need to do is start coding.

    1. Install Apahce, PHP, MySQL, and PHP to connect MySQL library components. #yum-y install httpd php mysql mysql-server php-mysql 2. Install Apache extension #yum-y install httpd-manual mod_ssl mod_perl mod_auth_mysql 3. Install PHP extension #yum-y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc 4. Install MySQL extension #yum-y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql

  2. Each of the above commands will need to wait for some time to download and install them after they are knocked out

    #/sbin/service httpd start [Start httpd Service, independent of boot start] #/sbin/service mysqld start [Start mysqld Service, independent of boot start]

    Start the service with these two commands after the installation is complete

  3. After the service starts, the default PHP file directory in the/var/www/html directory, here to create a test.php file, inside the content, I am here to delete the original test.php, and then new

  4. Browse in the browser

Jonelaw

    • Blog access: 447880
    • Number of Posts: 117
    • Blog score: 3758
    • Blog rank: Lieutenant Colonel
    • Technical points: 1238
    • User group: Normal user
    • Registration time: 2008-07-17 11:49
Article categories

All posts (117)

    • Cisco (2)
    • Shell (1)
    • Tomcat (1)
    • SQL (5)
    • Apache (6)
    • Java (6)
    • PHP (4)
    • Windows (2)
    • Life (2)
    • Software (2)
    • MySQL (18)
    • Hardware (7)
    • Network (2)
    • Linux (28)
    • Oracle (31)
    • Unassigned Blog posts (0)
Article archive

2015 (2)

2014 (1)

2013 (9)

2012 (28)

2011 (51)

2010 (12)

2009 (14)

My friend
    • Xiangpen

    • Athsonxy

    • Zorawang

    • Dagun

    • Linuxboy

    • Little Jabebel

    • a5252745

Recent visitors
    • zh705118

    • Raoswing

    • Wangyanx

    • Sxauzx

    • Zhenghai

    • Piaowuxk

    • Jiaozwtj

    • Sgljbin1

    • Linmo 0706

Concern

IT168 Enterprise Grade Officer Micro



Number: It168qiye


System Architect Conference



Number: SACC2013

Subscribe to recommended blog posts
    • • Remember that the first time Lua and C invoke each other for example ...
    • • Primary and Standby switching method based on zookeeper ...
    • • How to properly configure nginx+php
    • • Oracle Oracle 11GR ... kind
    • • Oracle Oracle 11GR ... kind
    • · SQLite Simple to use
    • • A strange case where a database cannot be started ...
    • • "MySQL" View current database lock please ...
    • • Materialized view refresh combined with ADG's attempt ...
    • · Oracle ASM Exception Dismount disk ...
Hot Word Topic
    • · Linux kernel primer/structure, config ...
    • · Linux Modify Gateway
    • • Implement management activity stack and exit a ...
    • · Install PostgreSQL under FreeBSD Note ...
    • Browserfy Auto-generated frame interpretation ...
Install apache+php+mysql+phpmyadmin under Linux with Yum 2009-10-27 11:59:57

Category: LINUX

Suitable for Redhat in 32-bit and 64-bit, if local source is erected. Don't dwell on it here. 1 Installing Apache+php+mysqlA, install APAHCE, PHP, MySQL, and PHP connection MySQL library componentsyum-y install httpd php mysql mysql-server php-mysqlB. Install MySQL extensionyum-y Install mysql-connector-odbc mysql-devel libdbi-dbd-mysql Or one-time paste installation:

yum-y install httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-mcrypt php-gd p Hp-xml php-mbstring php-ldap php-pear php-xmlrpc mysql-connector-odbc mysql-devel libdbi-dbd-mysqlC, set the MySQL database root account password.
mysqladmin-u root password ' newpassword ' [Enter the password in quotation marks]

d. Make MySQL database more secure
Mysql-u Root-p [You will be asked to enter the password you just set, enter it and return it.

mysql> DROP DATABASE test; [Delete test database]
Mysql> DELETE from mysql.user WHERE user = "; [Delete Anonymous Account]
mysql> FLUSH privileges; [Overloaded Permissions]

E, according to the above installation method, the default site directory is configured to create a new PHP script for/var/www/html/:
Phpinfo ();
?>
2, installation phpMyAdmin
EnterPhpMyAdminOfficial download (not the latest version, the next phpMyAdmin 2.11.9.5 on the line, more than 3.1 php 5.2 above), upload to your site directory, and then configure. It takes just a few steps to get it done.
I. config.sample.inc.php renamed to Config.inc.php;
II. Open the config.inc.php file and make the following modifications;
$cfg [' Servers '] [$i] [' controluser '] = ' PMA ';
$cfg [' Servers '] [$i] [' controlpass '] = ' pmapass ';
$cfg [' Servers '] [$i] [' pmadb '] = ' phpmyadmin ';
$cfg [' Servers '] [$i] [' bookmarktable '] = ' pma_bookmark ';
$cfg [' Servers '] [$i] [' relation '] = ' pma_relation ';
$cfg [' Servers '] [$i] [' table_info '] = ' pma_table_info ';
$cfg [' Servers '] [$i] [' table_coords '] = ' pma_table_coords ';
$cfg [' Servers '] [$i] [' pdf_pages '] = ' pma_pdf_pages ';
$cfg [' Servers '] [$i] [' column_info '] = ' pma_column_info ';
$cfg [' Servers '] [$i] [' history '] = ' pma_history ';
$cfg [' Servers '] [$i] [' designer_coords '] = ' pma_designer_coords ';

Remove the front//of each line;
II. $cfg [' blowfish_secret '] = "; | Modify to | $cfg [' blowfish_secret '] = ' http ';
Iv. $cfg [' Servers '] [$i] [' controluser '] = ' PMA '; | change ' PMA ' to your account | $cfg [' Servers '] [$i] [' controlpass '] = ' pmapass '; | Set the ' Pmapass to your MySQL login password |
V. $cfg [' blowfish_secret '] = "; | Add phrase password for example: $cfg [' blowfish_secret '] = ' onohot ';



3,//Installation of PHP extension
yum-y Install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc



4.//install Apache extension

yum-y Install httpd-manual mod_ssl mod_perl mod_auth_mysql 5. Configure the Firewall
Add allow access to HTTP, FTP port
Iptables-i rh-firewall-1-input-m State--state new-m tcp-p TCP--dport 21-j ACCEPT

Iptables-i rh-firewall-1-input-m State--state new-m tcp-p TCP--dport 80-j ACCEPT
Restart Iptables:service iptables Restart

Yum Install PHP Environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.