In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Deployment and Application of LAMP platform
The components included in 1:LAMP are linux apache mysql php (python,perl)
Advantages:
Low cost, all belong to open source software
Easy to develop, simple page code, high degree of integration with html markup language
Convenient application, convenient transplantation, convenient application
Security and stability are very good
The benefits of 2:PHP combine the new syntax created by C # and Java,Perl to have better web page execution speed. Again, we use PHP.
3:MySQL has been built in the previous chapter. Using the built MySQL again, you can view my MySQL database technical documents.
Apache also uses the previously built environment, you can view the previous Apache application technical documentation
4: to install PHP packages: first uninstall PHP-related packages to avoid program conflicts:
Then install the package libxml2-devel zlib-debel and then use yum to install it
5: install the extension tool library, libmcrypt, mhash and mcrypt, which are used to encrypt data and use hash to encrypt data: do file links
Ln-s / usr/local/lib/libmcrypt* / usr/lib
Make a file link: ln-s / usr/local/lib/libmash* / usr/lib
Install mcrypt library to solve the problem of global variables to prevent configure configuration error
Export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
6: compile and install PHP: extract the PHP source code package to the / usr/src directory
-- prefix: specify the installation path for PHP
-- with-mcrypt: support for loading extension tools such as data encryption (files that call the mcrypt library)
-- with-apxs2: (how Apache calls PHP) sets the location of the apxs module file provided by Apache
-- with-mysql; sets the installation location of the MySQL database
-- with-config-file-path: sets the location of the configuration file for PHP
-- enable-mbstring: enable the multi-string feature to support codes such as Chinese
7: set up the LAMP component environment: mainly includes the configuration file php.ini of PHP. Adjustment of Apache configuration file httpd.conf, the former is used to determine the running parameters of PHP, and the latter mainly loads the libphp5.so module to support PHP web pages
(1) Adjustment of php.ini configuration: including two template files: 1 Test: php.ini-develpment and 2 practical Application: php.ini-production
(2) by modifying the configuration in the php.ini file, setting the size limit of the uploaded file, the default character set, loading additional modules and other functions, if there is no requirement, you can keep the file unchanged by default. The size of files allowed to be uploaded is set here, and the maximum number of files allowed to upload per http
8: in order to further improve the execution efficiency of the PHP program and optimize the page loading speed, you can use the ZendGuardl oader engine module, which can be loaded according to the actual situation (not too much explanation, which will be mentioned later)
Tar zxf ZendGuardLoader-C / usr/src
Cd / usr/src/ZendGuardLoader-php-5.3-linux-glibc23-x86/php-5.3
Cp ZendGuardLoader.so / usr/local/php5/lib/php
Then modify the main configuration file / usr/local/php5/php.ini of PHP
Zend_extension=/usr/local/php5/lib/php/zendGuardLoader.so
Zend_loader.enable=1 adds startup ZendGuardLoader.so to improve optimization speed
9:http.conf configuration adjustment, in order to make httpd support the parsing function of PHP page, you need to load the module file of PHP application through the LoadModule configuration item.
AddType: support for PHP type web page files
Directoryindex: add an index.php configuration item to identify common PHP home page files
Restart the httpd service / usr/local/httpd/bin/apachectl restart
9: testing LAMP works together, testing from two aspects
(1) write a test web page file in PHP format by visiting the PHP page
Verify the effect:
(2) by testing the MySQL database: writing PHP test files
Vim / usr/local/httpd/htdocs/tt.php
To verify:
10: LAMP architecture application
First of all, the deployment of PHPMysql system is mainly used to manage MySQL database through web interface, which is very practical for people who are not familiar with MySQL system.
(1) decompress tar zxf phpMyAdmin-4.2.5-all-languages.tar.gz-C / usr/src first.
Then move the file phpMyAdmin-4.2.5-all-languages to the / usr/local/httpd/htdocs/phpMyAdmin directory to facilitate the management of the MySQL database through the web page
(2) establish the configuration file, config.inc.php
A phrase key is set by default in the blowfish_secret line in the configuration file, which is used for web page cookie authentication. You can modify it according to your needs:
(3) visit the web management interface of PHPMyAdmin
Www.test.com/phpMyAdmin provides access to:
After that, you can create tables and libraries, which are more convenient and concise.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.