XAMPP Environment package Some of our friends may use this one button package in the PHP debugging environment on their local computers. XAMPP installation package is a popular website environment that can run on multiple platforms. Support Linux, MAC and WINDOWS systems. In this article, what Lao Zuo needs to share is that he can install XAMPP in the Linux Centos environment, and then install site construction in his operating platform.
First, preparations
If we are new VPS users, I still recommend that we choose an environment where the public uses more WEB panels, one button packs, and so on. After all, there are many tutorial documents to refer to. Since Laozuo is a pure toss, he deployed the XAMPP1.8.3 environment in the centos6 32/64 bit environment.
yum update
yum remove httpd*
Upgrade the system, and then clean up the existing environment to avoid installation conflicts.
Second, download and install XAMPP
#CentOS 32-bit
cd /tmp
wget http://downloads.sourceforge.net/project/xampp/XAMPP%20Linux/1.8.3/xampp -linux-1.8.3-4-installer.run
#CentOS 64 bit
cd /tmp
wget http://downloads.sourceforge.net/project/xampp/XAMPP%20Linux/1.8.3/xampp -linux-x64-1.8.3-4-installer.run
Corresponding to our current system environment, download the XAMPP environment package to the TMP folder.
chmod 755 xampp-linux*
./xampp-linux*
Authorize file permissions and install the XAMPP environment.
Then you will see the installation process as shown in the figure above. We will continue by entering y according to the steps until the installation is completed.
/opt/lampp/lampp start
Then restart XAMPP
Then we can see that it has been started. At this time, we will open the IP address to check whether the installation is completed. We will see Access forbidden! Error prompt, we need to solve this problem.
Find/opt/lampp/etc/extra/httpd-xampp.conf to edit this file. Find
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
Then mask these lines (add # in front).
# <LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
# Require local
# ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
Then we will restart XAMPP
/opt/lampp/lampp restart
After we open the IP, we can see the XAMPP interface, which can be in simplified Chinese.
In this way, we can see that XAMPP runs OK.
Third, set XAMPP
Open the/opt/lampp/etc/httpd.conf file and edit it
# Include etc/extra/httpd-vhosts.conf
Remove the previous #, save it, and restart XAMPP.
/opt/lampp/lampp restart
Edit/opt/lampp/etc/extra/httpd-vhosts.conf to set the site. First, create the mkdir - p/var/www/html directory. We need to create the site in the HTML directory.
Then configure the site information in the httpd-vhosts.conf file.
ServerAdmin webmaster@laozuo.org
DocumentRoot "/var/www/html"
ServerName laozuo.org
ServerAlias www.laozuo.org
ErrorLog "logs/laozuo.org-error_log"
CustomLog "logs/laozuo.org-access_log" common
Execute/opt/lampp/lampp restart, and then we need to set the password, such as the MYSQL password.
/opt/lampp/lampp security
XAMPP: Quick security check...
XAMPP: Your XAMPP pages are NOT secured by a password.
XAMPP: Do you want to set a password? [yes] yes
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Password protection active. Please use 'xampp' as user name!
XAMPP: MySQL is accessable via network.
XAMPP: Normaly that's not recommended. Do you want me to turn it off? [yes] yes
XAMPP: Turned off.
XAMPP: Stopping MySQL... ok.
XAMPP: Starting MySQL... ok.
XAMPP: The MySQL/phpMyAdmin user pma has no password set!!!
XAMPP: Do you want to set a password? [yes] yes
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Setting new MySQL pma password.
XAMPP: Setting phpMyAdmin's pma password to the new one.
XAMPP: MySQL has no root passwort set!!!
XAMPP: Do you want to set a password? [yes] yes
XAMPP: Write the password somewhere down to make sure you won't forget it!!!
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Setting new MySQL root password.
XAMPP: Change phpMyAdmin's authentication method.
XAMPP: The FTP password for user 'daemon' is still set to 'xampp'.
XAMPP: Do you want to change the password? [yes] yes
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Reload ProFTPD... ok.
XAMPP: Done.
After executing the command, we will operate the above example command. It is used to set MYSQL and PHPMYADMIN passwords. After we finish logging in HTTP://IP/xampp, we can set the user name and password for the execution path. xampp is the user name and password we set.
Fourth, activate eAccelerator
Because some programs need eAccelerator, we need to start them, which are closed by default. We need to start them in the/opt/lampp/etc/php.ini file, and find the following code:
; extension="eaccelerator.so"
; eaccelerator.shm_size="16"
; eaccelerator.cache_dir="/opt/lampp/temp/eaccelerator"
; eaccelerator.enable="1"
; eaccelerator.optimizer="1"
; eaccelerator.check_mtime="1"
; eaccelerator.debug="0"
; eaccelerator.filter=""
; eaccelerator.shm_max="0"
; eaccelerator.shm_ttl="0"
; eaccelerator.shm_prune_period="0"
; eaccelerator.shm_only="0"
; eaccelerator.compress="1"
; eaccelerator.compress_level="9"
Then put the front; Notes are removed and saved.
Finally, start/opt/lampp/lampp restart. We can add a file demonstration site to the directory.
To sum up, Lao Zuo tried to install the XAMPP environment in CENTOS. You can also play with it if you want to. XAMPP environment is often used in our local PHP debugging, or in MAC environment.
Scan the code to follow the official account
Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge