Home > php教程 > php手册 > body text

Building an integrated environment for PHP under Linux

WBOY
Release: 2016-08-08 08:49:48
Original
1831 people have browsed it

By chance, I need to build a PHP environment in the project. Since PHP development requires a lot of things, such as apache, mysql, PHP environment, etc., if I install them one by one, there may be incomplete installation problems, so I chose it for this purpose. Install the integrated environment. The choice here is xampp-linux-x64-5.5.30-3-installer.zip. The specific version can be downloaded from the official website: https://www.apachefriends.org/zh_cn/index.html, according to your own Select the corresponding version of the operating system, the zip used here, the following are the specific steps,

1. Download the xampp installation package

Download the xampp installation package from the Internet. The choice here is xampp-linux-x64-5.5.30-3-installer.zip.

2. Decompress

Copy the above file to the Linux system. I uploaded it to the /home/wcj/xampp/ directory, as shown below,

Use the decompression command: unzip xampp-linux-x64-5.5.30-3-installer.zip; because zip files are unified under Windows and Linux, you can decompress them here, as follows,

You can see that the decompressed file is xampp-linux-x64-5.5.30-3-installer.run

3. Execute the installation

We can see that the xampp-linux-x64-5.5.30-3-installer.run file we just decompressed does not have execution permissions. First we need to give it execution permissions. I gave it 775 permissions here

chmod 775 xampp-linux-x64-5.5.30-3-installer.run

After executing the above command, you will have execution permission,

Then execute the following command:

./xampp-linux-x64-5.5.30-3-installer.run Enter the installation steps as shown below,

Our prompt is given here. We enter Y to enter the next step. There will still be a prompt in the next step. We then enter Y, and then press the "Enter" key to continue the installation, then enter Y, and finally start the installation, such as

You can also see at the top that the installation directory is /opt/lampp, which is the default installation directory. Wait for the installation to complete

4. Modify the configuration file

After the installation is completed, go to the /opt/lampp file and you can see that there are many files, which proves that the installation was successful.

It may be inaccessible after the installation is completed. At this time, you need to modify the configuration file. Find httpd-xampp.conf in the /opt/lampp/etx/extra directory, modify this file, and find the following code

# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
        Require local


        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
Copy after login

 Comment out Require local and replace it with Require all granted, then it can be accessed externally,

5. Set password

After passing the above configuration file, you can access it, but you cannot log in to the database, so you need to set a password at this time

In the /opt/lampp directory, execute ./lampp security, you will be prompted to set passwords for lampp, ftp, and mysql. After the settings are completed, you can log in.

Click "phpMyAdmin" in the upper right corner and you can enter, then the installation is successful. The default apache port is 80.

Also, it is said on the Internet that you can download tar.gz files. If it is this kind of file, just put it in Linux and decompress it. Other configurations are the same as above

Some commands (in the /opt/lampp directory)

Start xampp service ./lampp start

Stop xampp service ./lampp stop

Restart xampp service ./lampp restart

To uninstall xampp, first stop the xampp service, then delete the lampp folder under /opt, and execute rm -rf lampp under /opt to delete the xampp service.

Welcome to point out any irregularities

Thank you!

source:php.cn
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!