Debian7 system installs LAMP website environment and simple settings with one command

888u

Last update at :2024-06-17,Edit by888u

This morning, when I was helping a friend solve a small VPS host environment and build a PHP environment, I originally wanted to consider using a panel or a one-click package, but this friend only needed to have PHP functions, and he didn’t even need to tie them in. Determine the domain name. So I prepared to install a simple PHP version and MYSQL data by using the direct apt-get method in the debian system, and can simply run the general PHP script environment.

First, install LAMP with one command

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 Snail runs the above command directly in the Debian7 environment. If further input is required, just enter Y and press Enter.

The interface for setting the MYSQL management password will pop up here, and you need to enter it twice. Then press Enter and the installation will continue.

We have completed the installation here, isn’t it quick? It's all done in about less than 1 minute.

Second, check whether the PHP environment is normal

/var/www

Currently we enter the IP address directly. The root directory is in the directory above. We can drop a phpinfo file to check the current PHP version.

If we need to bind a domain name, we can directly add the binding domain name manually separately. You can refer to \\"Complete Debian7 Configuring LAMP (Apache/MySQL/PHP) Environment and Building a Website\\". This tutorial was a snail's manual step at that time. Compile and install the LAMP process. You can add a binding domain name according to the prompts.

Third, add support for other components

1. Install OpCode and APCu cache

pecl install ZendOpcache-betapecl install apcu-beta

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

zend_extension=opcache.soextension=apcu.so

opcache.max_accelerated_files=30000opcache.memory_consumption=160opcache.revalidate_freq=0

2. Install tools that may be needed

apt-get install htop vim

To summarize, the above quick installation LAMP environment is suitable for our simple PHP environment or MYSQL environment. For formal website building environments, we should use one-click packages or other environments with more functions and users.

Recommended site searches: domain name registration query, website query domain name entrance, Wanwang domain name registration official website, Alibaba Cloud registration, vps virtual host, jsp virtual host, Hong Kong vps host rental, Hong Kong server rental, ftp space, mainland China registration-free Host,

Debian7 system installs LAMP website environment and simple settings with one command

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码