Building of lamp website platform and deployment of PHP application

Source: Internet
Author: User

Lamp is the most mature Enterprise website application Mode, can provide dynamic Web site application and development environment

Constituent components: Linux, Apache, MySQL, Php/perl/python

Company demand:

Build a Web site that can support dynamic Web sites, and support the PHP language development environment to deploy a forum system via PHP.

Environment of demand:

System: Red Hat Enterprise Linux Server release 6.5 (Santiago)

Web Server Software: Apache

Databases that support dynamic websites: MYSQL

Support for Dynamic Web development language: PHP

Package for forum: Discuz_x3.1_sc_gbk.zip

Apache Service available: httpd

MySQL Service package available: MySQL Mysql-service

PHP Service Package available: PHP php-mysql

Server ip:192.168.1.70

Client ip:192.168.1.60

Setting the LAMP environment

1. First check to see if all packages are installed

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/71/1D/wKioL1XG1MeBjSftAAFb4RGiPUE310.jpg "title=" Qq20150809120640.jpg "alt=" Wkiol1xg1mebjsftaafb4rgipue310.jpg "/>

2. Install no Packages Installed

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/71/23/wKiom1XG1dDze-mmAABmUQWcrC0033.jpg "title=" Qq20150809122211.jpg "alt=" Wkiom1xg1ddze-mmaabmuqwcrc0033.jpg "/> 3. After installing the package, see if all services are turned on and automatically start with the system turned on.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/71/1F/wKioL1XG3ZrxWVlrAAH2bTpjWWE580.jpg "title=" Qq20150809124700.jpg "alt=" Wkiol1xg3zrxwvlraah2btpjwwe580.jpg "/>

4. Modify the password for the database

(View the password for the database)

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/71/23/wKiom1XG3Jyhc4VWAABES28Tq-s735.jpg "title=" Qq20150809125118.jpg "alt=" Wkiom1xg3jyhc4vwaabes28tq-s735.jpg "/>

(Login database)

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/71/23/wKiom1XG3PjyrKdkAABSsj1-8gk131.jpg "title=" Qq20150809125242.jpg "alt=" Wkiom1xg3pjyrkdkaabssj1-8gk131.jpg "/>

(Modify the password for the database)

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/71/23/wKiom1XG3WqgjaV4AACLn7qKypI590.jpg "title=" Qq20150809125444.jpg "alt=" Wkiom1xg3wqgjav4aacln7qkypi590.jpg "/>

5. Configure PHP (change character Set)

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/71/26/wKiom1XG6CaCWnCOAABCr5a7RvM946.jpg "title=" Qq20150809134002.jpg "alt=" Wkiom1xg6cacwncoaabcr5a7rvm946.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/71/23/wKioL1XG6i_SxmufAABJEIofJdc201.jpg "title=" Qq20150809134032.jpg "alt=" Wkiol1xg6i_sxmufaabjeiofjdc201.jpg "/>

6. Add a test1.php written in PHP in the server side
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/71/1F/wKioL1XG2E_ThrMuAACHVjjIEM4106.jpg "title=" Qq20150809122420.jpg "alt=" Wkiol1xg2e_thrmuaachvjjiem4106.jpg "/>

7. Start the service

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/71/23/wKioL1XG6qXx8IjSAAEq1iUtHSg892.jpg "title=" Qq20150809134242.jpg "alt=" Wkiol1xg6qxx8ijsaaeq1iuthsg892.jpg "/>

8. Testing on the client (192.168.1.60)

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/71/26/wKiom1XG6VeRsIZeAALlX4Q9j-k525.jpg "title=" Qq20150809134508.jpg "alt=" Wkiom1xg6versizeaallx4q9j-k525.jpg "/>

PHP Application Deployment (discuz! Forum system)

Authorizing a user on the database to operate on the database

1. Logging into the database

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/71/23/wKioL1XG7GuTSI20AABn3Bj79rg564.jpg "title=" Qq20150809134936.jpg "alt=" Wkiol1xg7gutsi20aabn3bj79rg564.jpg "/>

2. View all libraries on the database

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/71/26/wKiom1XG6ojQF-hyAADmchLI5sg245.jpg "title=" Qq20150809134948.jpg "alt=" Wkiom1xg6ojqf-hyaadmchli5sg245.jpg "/>

3. Create a database to hold the data for the forum

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/71/26/wKiom1XG6yyDmugEAAE8Ic23_i4951.jpg "title=" Qq20150809135325.jpg "alt=" Wkiom1xg6yydmugeaae8ic23_i4951.jpg "/>

4. Authorizing a (FANXH) user Login system to change permissions on the database

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/71/26/wKiom1XG68aCl2jDAACgAMTTGTg717.jpg "title=" Qq20150809135548.jpg "alt=" Wkiom1xg68acl2jdaacgamttgtg717.jpg "/>

5. Deploy Forum page code

Unpacking the package Discuz_x3.1_sc_gbk.zip, the following indicates that the unzip package is not installed and is installed via Yum.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/71/27/wKiom1XG7efBgKf1AACKrLfk85Q325.jpg "title=" Qq20150809140421.jpg "alt=" Wkiom1xg7efbgkf1aackrlfk85q325.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/71/23/wKioL1XG7_KDqOwjAABKdYyWChA550.jpg "title=" Qq20150809140507.jpg "alt=" Wkiol1xg7_kdqowjaabkdyywcha550.jpg "/>

Unpacking Packages

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/71/23/wKioL1XG8FqzhiidAAB_uIJjf-o922.jpg "title=" Qq20150809140648.jpg "alt=" Wkiol1xg8fqzhiidaab_uijjf-o922.jpg "/>

View all the extracted content, and copy upload to the default page

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/71/23/wKioL1XG8OKj_nneAAEOGlMXrdY539.jpg "title=" Qq20150809140913.jpg "alt=" Wkiol1xg8okj_nneaaeoglmxrdy539.jpg "/>

View all content under upload

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/71/27/wKiom1XG7z3xMH-UAAHJRtHxJeQ357.jpg "title=" Qq20150809141031.jpg "alt=" Wkiom1xg7z3xmh-uaahjrthxjeq357.jpg "/>

6. Install Forum System Http://192.168.1.70/bbs/install

On the client browser, enter

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/71/23/wKioL1XG95PBGHO1AAPoaoPth5A896.jpg "title=" Qq20150809143749.jpg "alt=" Wkiol1xg95pbgho1aapoaopth5a896.jpg "/>

Then click Agree to proceed with the next setup

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/71/27/wKiom1XG9hCCfpDRAAHNrJil1mc305.jpg "title=" Qq20150809143935.jpg "alt=" Wkiom1xg9hccfpdraahnrjil1mc305.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/71/27/wKiom1XG9jyCpioCAAIluAnO0Pg316.jpg "title=" Qq20150809144037.jpg "alt=" Wkiom1xg9jycpiocaailuano0pg316.jpg "/>

Found no permissions on directories and files, so some additions to/var/www/html/bbs/are master Apache (changes on 192.168.1.70 on the server)

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/71/27/wKiom1XG9yjDm1wZAAIeUExPJ7E607.jpg "title=" Qq20150809144402.jpg "alt=" Wkiom1xg9yjdm1wzaaieuexpj7e607.jpg "/>


Refresh the client browser page, the following page shows that the installation is normal, and then click on the above Red Cross part correction and try again.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/71/23/wKioL1XG-Zjh3jMJAAHGdEhq1T8181.jpg "title=" Qq20150809144610.jpg "alt=" Wkiol1xg-zjh3jmjaahgdehq1t8181.jpg "/>


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/71/27/wKiom1XG9_6h0EDXAADCT4273XE805.jpg "title=" Qq20150809144805.jpg "alt=" Wkiom1xg9_6h0edxaadct4273xe805.jpg "/>

In the experiment appeared, Mysqli_connect () does not support, I read a lot of information, with a solution, I hope to give the same learning people some experience. The solution is as follows

Modify the main configuration file of PHP to add 808 lines of comments and then start the new httpd service can be resolved.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/71/27/wKiom1XHC17iju0MAAA9x03zHAM418.jpg "title=" Qq20150809161038.jpg "alt=" Wkiom1xhc17iju0maaa9x03zham418.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/71/27/wKiom1XHC9vzfyNAAABVyXr0DP0720.jpg "title=" Qq20150809161254.jpg "alt=" Wkiom1xhc9vzfynaaabvyxr0dp0720.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/71/27/wKiom1XHDCqQgzFWAAEZ0TH7Huk511.jpg "title=" Qq20150809161413.jpg "alt=" Wkiom1xhdcqqgzfwaaez0th7huk511.jpg "/>


On the client 192.168.1.60 refresh the page to reach the following interface, then click Next.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/71/27/wKiom1XHDLKwMlPWAAIUG-5r-9I334.jpg "title=" Qq20150809161629.jpg "alt=" Wkiom1xhdlkwmlpwaaiug-5r-9i334.jpg "/>

Go to the following screen and click Next

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/71/27/wKiom1XHDVWgnU_WAAIsWd5sZ8s127.jpg "title=" Qq20150809161912.jpg "alt=" Wkiom1xhdvwgnu_waaiswd5sz8s127.jpg "/>

Click on the permissions to install Discuz, the database write the database just created, the user name is authorized user name, the database password for the authorized user's password, click Next to create the complete.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/71/24/wKioL1XHGPnBwG73AAGgAxvj9fo774.jpg "title=" Qq20150809170020.jpg "alt=" Wkiol1xhgpnbwg73aaggaxvj9fo774.jpg "/>

This article is from the "Down to earth" blog, make sure to keep this source http://343614597.blog.51cto.com/7056394/1683102

Building of lamp website platform and deployment of PHP application

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.