Linux Configuration PHP development environment starting from 0

Source: Internet
Author: User
Tags configuration php install php mysql download php development environment phpmyadmin

Main reference http://www.cnblogs.com/Fly-sky/p/3770305.html secondary reference http://www.cnblogs.com/mchina/archive/2012/11/28/2778779. HTML actually still this dick AH one, Apache installation 1, yum install Lrzsz so that can upload/download files 2, download the TAR package from Apache official website: http://mirrors.hust.edu.cn/apache/httpd/( My next is: httpd-2.2.31.tar.gz) 3, will download the installation package into Linux,/USR/APACHE2.2/(RZ) 4, decompression TAR-ZXVF httpd-2.2.31.tar.gz-c/usr/ apache2.25, establishing makefile/configure--prefix=/usr/local/apace2.2--enable-proxy=shared--enable-proxy-balancer= Shared--enable-proxy-http=shared--enable-proxy-connect=shared--enable-asis=shared--enable-isapi=shared-- Enable-mods-shared=all--enable-so and compile make, and then install do install (zlib dependent yum install zlib-devel) episode in Between: Shut down, clean up the original directory, then make clear recompile installation 6, start apache/usr/local/apace2.2/bin/httpd-k start, curl "http://localhost" appears it works is successful. (Note modify httpd.conf in servername) 7, the last cp/usr/local/apace2.2/bin/apachectl/etc/init.d/httpd, start file put in 8, set boot

Use the editor to open the httpd file and add two lines of text below the first line #!/bin/sh as follows

# chkconfig:35 70 30

# Description:apache

Then register the service

Chkconfig–add httpd

Second, MySQL installation

1. mysql Download: http://dev.mysql.com/downloads/mysql/#downloads

Among them, there are three kinds of packages, to note:

RPM Package: is a specific packet, such as server,client,shared lib, etc.-yes, it can be installed separately
RPM Bundle: Is the collection of all packages for this version---usually installs the server side to use, the other does not take, especially the development package
Compressed TAR Archive, is the source code, must use the source method installs. ----This is the source code, need to compile their own, but also compiled, but not the installation package

2. Installation reference: (http://jingyan.baidu.com/article/a378c9609eb652b3282830fd.html)

3. Set of problems encountered

A, starting mysqlcouldn ' t find MySQL server (/usr/local/mysql/[failed]ld_safe)

Cause: Missing basedir configuration in my.cnf

[MYSQLD] Port =3306 socket =/tmp/mysql.sock ############# Add the following configuration ########### basedir =/usr/local/mysql B, the server quit without updating PID file (/usr/local/mysql/mysql5.6/data/iz285yuqecaz . pid).

After a is done, install MySQL in./scripts/mysql_install_db--user=mysql

Third, the PHP installation first before installing PHP must install Libxml Curl Libmcrypt, or the configuration file will be generated when a variety of error directly installed: Yum install libxml2 yum install LIBXM l2-devel-y Yum Install Curl curl-devel yum Install php-mcrypt libmcrypt libmcrypt-devel 1, Download: http://www.php.net/downloads.php (php-5.6.15.tar.gz (SIG) )2, Decompression: tar-zxvf/tmp/php-5.4.45.tar.gz-c/usr/sofotware/3, generate config configuration file:./configure--prefix=/usr/local/php-5.5.30/- -with-apxs2=/usr/local/apace2.2/bin/apxs--with-mysql=/usr/local/mysql/mysql5.6/--with-mysqli=/usr/local/mysql/ Mysql5.6/bin/mysql_config--enable-soap--enable-mbstring=all--enable-sockets--disable-fileinfo4, compiled and installed: Make;make     install;5, copy the configuration file to the previous CP Php.ini-development/usr/local/lib/php.ini6, add a sentence to the Apache configuration file (indicating which files need to be parsed in PHP) httpd.conf add a sentence addtype application/x-httpd-php. PHP can then test, build a index.php, inside write: <?php phpinfo ();? > Access under test

Four, installation phpMyAdmin reference: http://jingyan.baidu.com/article/0320e2c1e1fc661b87507b17.html

1. Download: wget https://files.phpmyadmin.net/phpMyAdmin/4.5.1/phpMyAdmin-4.5.1-all-languages.zip

2, unzip, and put in the root directory of the site

3. Change the configuration file

A. Open the config.inc.php file (you can use WordPad) to find $cfg[' blowfish_secret ']= '; With $cfg[' servers ' [$i] [' auth_type ']= ' cookie ', if $cfg[' servers ' [$i] [' auth_type '] value is as cookie as previously seen, then we must be in $cfg [' Blowfish_secret ']= ' quotes write a string of characters, which you can interpret as an authentication code. such as $cfg[' Blowfish_secret ']= ' Sunec '. Save to exit.

Here, the LAMP environment is built

Linux Configuration PHP development environment starting from 0

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.