apt-get update && apt-get dist-upgrade -y
apt-get autoremove -y
apt-get -y install wget screen python
wget http://mirrors.linuxeye.com/lnmp-full.tar.gz
tar xzf lnmp-full.tar.gz
cd lnmp
screen -S lnmp
./install.sh
This does all the tricks
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash
Note: On Linux, after running the install script, if you get nvm: command not found, simply close your current terminal, open a new terminal, and try verifying again.
Install npm
nvm install node
Create the file
sudo fallocate -l 4G /swapfile
Enable the swap file and set the correct permissions
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
Make the the Swap File Permanent, edit the following file
sudo nano /etc/fstab
Go to the bottom of the file and add the following line
/swapfile none swap sw 0 0
Tweak how much of the swap the system uses
sudo nano /etc/sysctl.conf
Insert the following lines at the bottom of the file
vm.swappiness=10
vm.vfs_cache_pressure = 50
cd ~/lnmp // Must enter the directory execution under lnmp
./addons.sh // Do not sh addons.sh or bash addons.sh such execution
cd ~/lnmp // Must enter the directory execution under lnmp
./vhost.sh // Do not sh vhost.sh or bash vhost.sh such execution
cd ~/lnmp
./vhost.sh del
cd ~/lnmp
./pureftpd_vhost.sh
cd ~/lnmp
./backup_setup.sh // Backup parameters
./backup.sh // Perform the backup immediately
crontab -l // Can be added to scheduled tasks, such as automatic backups every day 1:00
0 1 * * * cd ~/lnmp;./backup.sh > /dev/null 2>&1 &
Nginx/Tengine/OpenResty:
service nginx {start|stop|status|restart|reload|configtest}
MySQL/MariaDB/Percona:
service mysqld {start|stop|restart|reload|status}
PHP::
service php-fpm {start|stop|restart|reload|status}
HHVM:
service supervisord {start|stop|status|restart|reload}
Apache:
service httpd {start|restart|stop}
Pure-Ftpd:
service pureftpd {start|stop|restart|status}
Redis:
service redis-server {start|stop|status|restart|reload}
Memcached:
service memcached {start|stop|status|restart|reload}
How to upgrade:
./upgrade.sh
How to uninstall:
./uninstall.sh