Focus on cloud service provider activities
Notes on website operation and maintenance

One command for Debian7 system to install LAMP website environment and simple settings

This morning, when helping a friend solve a small VPS host environment and build a PHP environment, he was supposed to consider using panels or one click packages. But this friend only needs PHP functions, and even does not need to bind domain names. So we are ready to install a simple PHP version and MYSQL data through the direct apt get method in the debian system, and can simply run the general PHP script environment.

First, one command installation LAMP

apt-get install mysql-server mysql-client apache2 php5 php5-cli libapache2-mod-php5 php5-mysql php5-curl php5-gd php-pear php5-imagick php5-mcrypt php5-memcache php5-mhash php5-sqlite php5-xmlrpc php5-xsl php5-json php5-dev libpcre3-dev

Here, Lao Zuo is Debian7 Run the above command directly in the environment. If you need to enter Y further, enter Enter.

 One command to install LAMP

The interface for setting MYSQL management password will pop up here, and you need to enter it twice. The installation will continue after entering.

 LAMP one button installation

We will finish the installation here, won't we? It took less than one minute to finish all the work.

Second, check whether the PHP environment is normal


At present, we directly enter the IP address. The root directory is in the above directory. We can throw a phpinfo file and check the current PHP version.

 Check whether the PHP environment is normal

If we need to bind the domain name, we can manually add the bound domain name separately. Please refer to“ Complete Debian7 configuration, LAMP (Apache/MySQL/PHP) environment, and station building "This tutorial was the LAMP process compiled and installed manually by Lao Zuo at that time. You can add the binding domain name according to the prompts.

Third, add other component support

1. Install OpCode and APCu cache

pecl install ZendOpcache-beta
pecl install apcu-beta

Add the following script to "/etc/php5/apache2/php. ini"


2. Tools that may be required for installation

apt-get install htop vim

To sum up, the above rapid installation LAMP environment is suitable for our simple needs of PHP environment or MYSQL environment. For the formal site building environment, we still use the one button package or other environments with more functions and users.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » One command for Debian7 system to install LAMP website environment and simple settings

Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge