Linux + Varnish + Apache + MySQL + PHP one-key package ForUbuntu/Debian

Source: Internet
Author: User
Tags configuration settings domain list varnish
Usage: We recommend that you first update and upgrade: apt-get-yupdateapt-get-yupgradeOK and then execute: Export cdlvamp0.3. If it is Debian, execute :. db-lvamp.shUbuntu, Please execute :.

Usage: We recommend that you first update and upgrade: apt-get-y updateapt-get-y upgrade OK and then execute: sudo suwget zxvf lvamp.tar.gz cd lvamp0.3 if it is Debian, please execute :. / Ubuntu, Please execute :.


We recommend that you first update and upgrade:

apt-get -y updateapt-get -y upgrade

Run the following command after OK:

sudo suwget zxvf lvamp.tar.gzcd lvamp0.3

For Debian, run the following command:


For Ubuntu, run:


When installing MySQL, you will be prompted to Enter the MySQL root Password. putty may be garbled, but simply Enter the password and press Enter:

Add a VM:


Add a virtual host Tutorial:

========================================================== ==================================== Add Virtual Host for LVAMP ==== ========================================================== ============================== Made by ExtremeMy Blog: More information please visit Please input domain: # enter the domain name you want to bind here ========================== domain = = ======================================== Do you want to add more domain name? (Y/n) # If the website has another domain name (such as www and bbs), enter y; otherwise, enter n, and press ENTER y Type domainname, example (www. yzs. me bbs. yzs. me blog. yzs. me ): # enter the domain name you want to add here ======================== domain list = ======================== Do you want to use a different user for this website? (Y/n) # enable your site to run as different user identities (the default user is www-data), effectively preventing cross-site yType username, example: mywebsiteexample # Enter the username of the user to be used for the website (the user will be created automatically if the user does not exist. Do not enter root) ====================================== your website user is example ========== ========================== Please input the directory for the domain: # enter the root directory of your website. The Default value is/var/www/your domain name. You can press enter to use the Default setting (Default directory: /var/www/ ): ============================ Virtual Host Directory =/var/www / ================================ Please input Administrator Email Address: # Enter your website administrator email here, You can directly press enter to skip using configuration settings. ========================================= Server Administrator Email = ============== =========================== Press any key to create your ul host... create unique ul Host directory ...... set permissions of Virtual Host directory ...... enabling site run'/etc/init. d/apache2 reload 'to activate new configuration! Restart Apache2 ...... restarting web server: apache2... waiting. ========================================================== ==================================== Add Virtual Host for LVAMP ==== ========================================================== ============================== Made by ExtremeMy Blog: More information please visit At this point, the VM has been created.

Status management tool:

/root/lvamp {start|stop|reload|restart|kill

To delete a website:

A2dissite Domain Name service apache2 restart

If you want to uninstall LVAMP (first go to the directory of one-click LVAMP package ):



When using some programs, such as WordPress, you may be prompted to enter FTP information. If you have not set the site to run as another user, run:

Chown-R www-data: www-data + your website directory

If the site runs as another user, change www-data to the user name entered when adding the VM. For example, if I enter example, run:

Chown-R example: example + your website directory

===================================== I am an evil splitting line ==================== ==========

Log updated on April 9, April 5, 2013:

1) Debian does not need to add its own Dotdeb Source

2) Optimize the installation process, install MySQL in advance, and prompt users to enter their passwords earlier

3) add PHP-GD Library

4) disable the file list Function

5) how to add a service management tool (/root/lvamp:

/Root/lvamp {start | stop | reload | restart | killstar: start LVAMP service stop: stop LVAMP service reload: restart LVAMP configuration file restart: restart LVAMP service kill: force stop LVAMP Service

5) change the default permission 755 (rwxr_xr_x) for creating a website folder to 711 (rwx _ x) to make cross-site data acquisition more effective.

6) Add the mpm-itk module to support one user for each site. Usage:

When executing/root/addhost, you will be prompted to enter the Website user name:

Do you want to use a different user for this website? (Y/n) y # Enter y to use this function, and n to do not enter y: Type username, example: mywebsitetest ============================ your website user is test

Log updated on April 9, February 6, 2013:

1) Add the mod_headers module. You can add the following code in. htaccess to define the cache time:

# Max-age in seconds # define the cache time for images, CSS, and JS as seven days
Header set Cache-Control "max-age = 604800"
 # Defines the cache time for HTML and TXT files as two hours
Header set Cache-Control "max-age = 7200"
Log updated on April 9, February 5, 2013:

1) fixed the BUG where the backend could not obtain the real IP address.

2) increase the varnish wait time to connect to the backend, the time to wait for the first character transmitted from the backend, and the interval between the two characters. Prevent 503 errors.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.