LAMP environment installation, associate apache, mysql install php

1, php php official website to download the stable version, such as 7.2.2 gz archive, MySQL share package (Baidu search keywords rpm, searched rpm search, enter the search-Shared MySQL)
2, open the virtual machine, xshell connection
3, into the src directory (cd / usr / local / src), uploading (Rz), view catalog i.e. View upload junction (LS) (Repeat, respectively upload php package, mysql shared libraries packet to the next src), mounted mysql shared packet (rpm -ivh src the uploaded package name MySQL (mysql package path)), an optical disc mount (mount / dev / cdrom / dyy), mounted libxml2 (yum install libxml2), mounted libxml2 library (yum install libxml2- devel), mounted perl (yum install perl), install perl library (yum install perl-devel), installed before unloading httpd (rm -rf / usr / local / httpd), extracting the packet into the original httpd directory (cd httpd- 2.4.39) to view the table of contents (ls), remove some files (make clean) make generated configuration httpd, and so open the cgi shared libraries (./configure --prefix = / usr / local / httpd --enable-cgi --enable-so), compiling (make), installation (make install), on returning within a directory src (cd ..), extract the PHP installation package (tar -zxvf PHP archive name), copy decompression view to facilitate the next step name (ls), unzip the package into the directory (cd unzip the package name) Php configuration and associated apache, MySQL (./ configure --prefix = / usr / local / php --with-apxs2 = / usr / local / httpd / bin / apxs --with-mysqli = / usr / local / mysql / bin / mysql_config), compiled php (make), mounted PHP (make install), copy the configuration file (cp php.ini-development / usr / local / php / lib / php.

Added: 1, the installation cms system, in view of DedeCMS need GD library, installation jpeg and png libraries when compiling php, so the above mounting adjusted as follows
upload dece package, before configuring php, installation jpeg, png library (yum install libjpeg-devel libpng -devel), plus arranged php gd library (./configure --prefix = / usr / local / php --with-apxs2 = / usr / local / httpd / bin / apxs --with-mysqli = / usr / local / mysql / bin / mysql_config --with- gd --with-jpeg-dir), php edit profile (other than changes outside the other extension = gd2), edit the apache configuration file (other than change the outer configuration of another default home page (< dir_module IfModule>
the DirectoryIndex index.html
</ IfModule> to <IfModule dir_module>
the DirectoryIndex the index.php index.html
</ IfModule>), permission to open (Options Indexes FollowSymLinks FollowSymLinks to the Options))
2, DedeCMS mounted
into the src directory, extracting archive (tar -zxvf DEDE package name), empty project directory (RM -rf / usr / local / httpd / htdocs / ), copy the source code to the project directory (cp ./DedeCMS-V5.7-UTF8-SP2/uploads // usr / local / httpd / htdocs /), down into the project directory (cd httpd / htdocs), to file permissions (chmod -R 777 / usr / local / httpd / htdocs)
3, manually install Dede, the ip access the site, We agreed to continue - "continue -" database host 127.0.0.1 password (remember the initial administrator password) - "continue -" into the foreground and simple view

Guess you like

Origin blog.51cto.com/11437420/2421143