ShuDudu's Home was started in 2011, but the web data is lost, so now begin again, I would like to make some friends, I hope you like ShuDudu's home.
Current position: ShuDudu > Net Web >

3rd edition LAMP/LNMP a key installation+optimized Shell command Detailed

Monday on February 10th, 2020Net Web

The third edition of the LAMP/LNMP pure version of a key installation command, is to rewrite the past few days, it will be placed Webshu platform. This time has been able to perfectly compatible with Ubuntu 12/14/16/18/19, and Debian 7/8/9. But today found that there is a small problem, Debian 9 in two different service providers VPS, VPS has a perfect run, another VPS installation encountered some problems. There may be a problem must be changed apt in Debian 9.9 of apt-get command, so today try this command is set to a variable in the Linux command line $ apx, it automatically becomes apt in Ubuntu 18 and Debian 9.9.

Formerly apt update command, becomes $ apx update. In this way the system can run some, some systems do not run. So, again still need to reconstruct the fourth edition. Since version 3, as well as the previous version, it is to determine the type of system under Linux hosts, and then all systems Shell command are displayed, and depending on the type of system to determine the selection of the Shell command. This is for me, a long time, these programs Shell I can not understand it, because I personally feel that Shell program 10 times more difficult to read than PHP program, especially when the long program, read about the program, sometimes prefer to reconstruct I do not want to spend more time analyzing.

Therefore, in the fourth edition, to do a lot of improvement, not all systems Shell commands are displayed. But first by the server system determining the type, version of the system, reacquisition of the system associated Shell command type (label 1) from Webshu server. Above $ apx update, also in the Shell command (label 1) in direct system type/version, shown as apt update or apt-get update or yum update according.

This command is optimized by this PHP program will then write a new.sh of Shell Command (labeled 2). 2 annotation capabilities, mainly after the optimization profile, passed to the Linux system. This marked the way Linux systems and procedures PHP 2 pass each other, that is, when PHP + Shell calling each other, this way I spent more than two years, a key installation in the VPS environment, very easy to use. This feature, originally only Shell program can achieve, but because PHP data string processing and powerful than Shell, much simpler, if this function is done by Shell program may take several months, then a few days PHP It's finished.

Version 3 of a key command, currently only developed to a LAMP, LNMP untapped. Function Description:

1. has been able to perfectly compatible with Ubuntu 12/14/16/18/19, and Debian 7/8/9. Because I personally use environment does not require MySQL, it has not been added to install MySQL command.

2. Ubuntu 14 companies have been unable to install the official PPA, so Ubuntu 14 can not install PHP 7 with PPA, only the default installation of PHP 5.5.

3. Ubuntu 16 default version of PHP installation command is PHP 7.0, but Ubuntu 16 + PHP 7.0, or Ubuntu 16 + PHP 7.0, PHP at this time are not executed. Therefore, the force is automatically installed Ubuntu 16 PPA, the user can choose to install PHP 7.1/7.2/7.3/7.4.

4. Ubuntu 18 default version of PHP installation command is PHP 7.2. As the speed of execution of PHP 7.4 PHP statement is about twice as PHP 7.2, so this Shell command I set the default Ubuntu 18 PHP version PPA + PHP 7.4, the user can select the system comes with software source PHP 7.2.

5. Debian 7.X, can not install the PPA, it can only be installed PHP 5.X. .

6. Debian 8.X, may be mounted PPA + PHP 7.4, the user can select PHP 7.4, or carrying PHP 5.X.

7. Debian 9.X, may be mounted PPA + PHP 7.4, the user can select PHP 7.4, or carrying PHP 7.0.

8. As the official company abandoned the Ubuntu 15, Ubuntu 17, I can not debug these two systems, so this is also a key command, the shield two systems.

9. PPA do not know, with a really wonderful. By mounting the high version PPA PHP, or other software, and the version of the system software that comes with the high source (installed software) should be no difference, without any loss of performance. With the PPA, will no longer rely on the high version of the system, because I'm using a Hong Kong VPS, only Ubuntu 16, with the PPA, you can install PHP 7.4.

So a key Shell commands, when needed, I add the PPA, the user's system will automatically install the PPA.

10. Debian 7.X, the official company is gradually abandoned, has been unable to operate normally apt-get update, the performance when you run this command, there will be many 404 error, the solution is to add a key command in a change to Shell command the latest software source time being there is no 404 error.

Copyright Protection: ShuDudu from the original article, reproduced Please keep the link: https://www.shududu.com/netweb/3rd-edition-LAMP-LNMP-a-key-installation-optimized-Shell-command-Detailed.htm