Home Backend Development PHP Tutorial Mysql+Apache2+php5 installation_PHP tutorial

Mysql+Apache2+php5 installation_PHP tutorial

Jul 13, 2016 am 10:47 AM
apache src unix usr download Install document to


Download the following files to /usr/local/src/
apache (the most popular WEB server platform on Unix platform) 2.tar.gz
MySQL (the best combination with PHP)-5.0.22.tar.gz
php (as the current mainstream development language)-5.1.2.tar.gz
Unzip:
#tar xvz (parallels virtual row platform) f apache (the most popular WEB server platform on Unix platform) 2.tar.gz
#tar xvz (parallels virtual row platform) f MySQL (the best combination with PHP)-5.0.22.tar.gz
#tar xvz (parallels virtual row platform) f php (as the current mainstream development language)-5.1.2.tar.gz

#cd .. //Create a folder in the /usr/local/ directory
# mkdir apache (the most popular WEB server platform on Unix platform)
# mkdir MySQL (the best combination with PHP)
# mkdir php (as the current mainstream development language)

//MySQL (the best combination with PHP) installation process
#cd ../MySQL (The best combination with PHP) //Find the /usr/local/MySQL (The best combination with PHP) folder
#groupadd MySQL (the best combination with PHP)
#usseradd -g MySQL (The best combination with PHP) MySQL (The best combination with PHP)

#cd ../MySQL (The best combination with PHP)-5.0.22 //Find the /usr/local/src/MySQL (The best combination with PHP)-5.0.22 folder
#./configure --prefix=/usr/local/MySQL (the best combination with PHP) --localstatedir=/var/lib/MySQL (the best combination with PHP)/ --with-client-ldflags =-all-static --with-MySQL (the best combination with PHP) d-ldflags=-all-static --with-MySQL (the best combination with PHP) d-user=MySQL (the best combination with PHP) the best combination) --enable-assembler --with-extra-charsets=all
#make ; make install

/usr/local/MySQL (The best combination with PHP)/bin/MySQL (The best combination with PHP)_install_db //Initialize MySQL (The best combination with PHP)
//Configure MySQL (the best combination with PHP)
#chown –R root /usr/local/MySQL (the best combination with PHP)
#chown –R MySQL (The best combination with PHP) /var/lib/MySQL (The best combination with PHP)/
#chgrp –R MySQL (The best combination with PHP) /usr/local/MySQL (The best combination with PHP)
#cp support-files/my-medium.cnf /etc/my.cnf

/usr/local/MySQL (The best combination with PHP)/bin/MySQL (The best combination with PHP) d_safe –user=MySQL (The best combination with PHP) & ​                 //Start MySQL (the best combination with PHP) The best combination)

/usr/local/MySQL (the best combination with PHP)/bin/MySQL (the best combination with PHP) admin –u root –p password 123 //Change the password to 123
enter password:
                                                                      //Test the new password
/usr/local/MySQL (The best combination with PHP)/bin/MySQL (The best combination with PHP) –u root –p MySQL (The best combination with PHP)
enter password: //If everything goes well, you can enter MySQL (the best combination with PHP).
                         
                                                                              //apache (the most popular WEB server platform on Unix platform) installation process
./configure --prefix=/usr/local/apache (the most popular WEB server platform on Unix platform) --enable-mods=shared=all --enable-module=so --disable-info
make
make install

During the installation process of apache (the most popular WEB server platform on Unix platform), the problem of libiconv.so.2 was encountered. The solution is as follows:
ln –sf /usr/local/lib/libiconv.so.2 /usr/lib/libiconv.so.2

//Type the local IP in the window bar. If the famous Feather web page appears, it will be considered successful...



//php (as the current mainstream development language) installation process
./configure --prefix=/usr/local/php (as the current mainstream development language) --with-MySQL (the best combination with PHP) =/usr/local/MySQL (the best combination with PHP) combination) --with-apxs2=/usr/local/apache (the most popular WEB server platform on Unix platform)/bin/apxs --enable-calendar --with-openssl=/usr/ --with-config-file- path=/usr/local/php (as the current mainstream development language)
make
make install
cp /usr/local/src/php (as the current mainstream development language)-5.1.2/php (as the current mainstream development language).ini-dist /usr/local/lib/php (as the current mainstream development language) Mainstream development languages).ini


#cd usr/local/apache (the most popular WEB server platform on Unix platform)/conf
//Then open httpd.conf and modify it in the corresponding place
AddType application/x-httpd-php (as the current mainstream development language) .php (as the current mainstream development language)
AddType application/x-httpd-php (as the current mainstream development language)-source .php (as the current mainstream development language) s

DocumentRoot "/usr/local/apache (the most popular WEB server platform on Unix platform)/htdocs"

LoadModule php (as the current mainstream development language) 5_module modules/libphp (as the current mainstream development language) 5.so

//Put the tested .php (as the current mainstream development language) file into /usr/local/apache (the most popular WEB server platform on Unix platform)/htdocs/. If the page can be opened in the window bar, you are done.
//FAQ 1: ERROR 2002: Can't connect to local MySQL(The best combination with PHP) server through socket '/var/lib/MySQL(The best combination with PHP)/MySQL(The best combination with PHP) The best combination).sock
' (2)
//Solution: Permission problem
chown -R MySQL (The best combination with PHP) /var/lib/MySQL (The best combination with PHP)/
//FAQ 2: Warning: MySQL (the best combination with PHP) Connection Failed: Can't connect to local MySQL (the best combination with PHP) server
// through socket '/tmp/MySQL (the best combination with PHP).sock' (111) in /home/httpd/html/show.php (as the current mainstream development language) on line 9
//Solution: Link /tmp/MySQL (the best combination with PHP).sock link to the /var/lib/MySQL (the best combination with PHP) directory:
linux# ln -s /var/lib/MySQL(The best combination with PHP)/MySQL(The best combination with PHP).sock /tmp/MySQL(The best combination with PHP).sock

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632871.htmlTechArticleDownload the following files to /usr/local/src/ apache (the most popular WEB server platform on Unix platform) 2. tar.gz MySQL (the best combination with PHP)-5.0.22.tar.gz php (as the current mainstream development language...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP Framework Performance Comparison: The Ultimate Showdown of Speed ​​vs. Efficiency PHP Framework Performance Comparison: The Ultimate Showdown of Speed ​​vs. Efficiency Apr 30, 2024 pm 12:27 PM

According to benchmarks, Laravel excels in page loading speed and database queries, while CodeIgniter excels in data processing. When choosing a PHP framework, you should consider application size, traffic patterns, and development team skills.

KDE Plasma 6.1 brings many enhancements to the popular Linux desktop KDE Plasma 6.1 brings many enhancements to the popular Linux desktop Jun 23, 2024 am 07:54 AM

After several pre-releases, the KDE Plasma development team unveiled version 6.0 of its desktop environment for Linux and BSD systems on 28 February, using the Qt6 framework for the first time. KDE Plasma 6.1 now comes with a number of new features t

Integration and expansion of golang function concurrency control and third-party libraries Integration and expansion of golang function concurrency control and third-party libraries Apr 25, 2024 am 09:27 AM

Concurrent programming is implemented in Go through Goroutine and concurrency control tools (such as WaitGroup, Mutex), and third-party libraries (such as sync.Pool, sync.semaphore, queue) can be used to extend its functions. These libraries optimize concurrent operations such as task management, resource access restrictions, and code efficiency improvements. An example of using the queue library to process tasks shows the application of third-party libraries in actual concurrency scenarios.

How to conduct concurrency testing and debugging in Java concurrent programming? How to conduct concurrency testing and debugging in Java concurrent programming? May 09, 2024 am 09:33 AM

Concurrency testing and debugging Concurrency testing and debugging in Java concurrent programming are crucial and the following techniques are available: Concurrency testing: Unit testing: Isolate and test a single concurrent task. Integration testing: testing the interaction between multiple concurrent tasks. Load testing: Evaluate an application's performance and scalability under heavy load. Concurrency Debugging: Breakpoints: Pause thread execution and inspect variables or execute code. Logging: Record thread events and status. Stack trace: Identify the source of the exception. Visualization tools: Monitor thread activity and resource usage.

The evasive module protects your website from application layer DOS attacks The evasive module protects your website from application layer DOS attacks Apr 30, 2024 pm 05:34 PM

There are a variety of attack methods that can take a website offline, and the more complex methods involve technical knowledge of databases and programming. A simpler method is called a "DenialOfService" (DOS) attack. The name of this attack method comes from its intention: to cause normal service requests from ordinary customers or website visitors to be denied. Generally speaking, there are two forms of DOS attacks: the third and fourth layers of the OSI model, that is, the network layer attack. The seventh layer of the OSI model, that is, the application layer attack. The first type of DOS attack - the network layer, occurs when a large number of of junk traffic flows to the web server. When spam traffic exceeds the network's ability to handle it, the website goes down. The second type of DOS attack is at the application layer and uses combined

How to add a server in eclipse How to add a server in eclipse May 05, 2024 pm 07:27 PM

To add a server to Eclipse, follow these steps: Create a server runtime environment Configure the server Create a server instance Select the server runtime environment Configure the server instance Start the server deployment project

Application of algorithms in the construction of 58 portrait platform Application of algorithms in the construction of 58 portrait platform May 09, 2024 am 09:01 AM

1. Background of the Construction of 58 Portraits Platform First of all, I would like to share with you the background of the construction of the 58 Portrait Platform. 1. The traditional thinking of the traditional profiling platform is no longer enough. Building a user profiling platform relies on data warehouse modeling capabilities to integrate data from multiple business lines to build accurate user portraits; it also requires data mining to understand user behavior, interests and needs, and provide algorithms. side capabilities; finally, it also needs to have data platform capabilities to efficiently store, query and share user profile data and provide profile services. The main difference between a self-built business profiling platform and a middle-office profiling platform is that the self-built profiling platform serves a single business line and can be customized on demand; the mid-office platform serves multiple business lines, has complex modeling, and provides more general capabilities. 2.58 User portraits of the background of Zhongtai portrait construction

How to deploy and maintain a website using PHP How to deploy and maintain a website using PHP May 03, 2024 am 08:54 AM

To successfully deploy and maintain a PHP website, you need to perform the following steps: Select a web server (such as Apache or Nginx) Install PHP Create a database and connect PHP Upload code to the server Set up domain name and DNS Monitoring website maintenance steps include updating PHP and web servers, and backing up the website , monitor error logs and update content.

See all articles