sh Instalaciones PHP Completas

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh Instalaciones PHP Completas相关的知识,希望对你有一定的参考价值。

#!/usr/bin/env bash

#Basics
sudo apt-get install -y nano
sudo apt-get install -y build-essential
sudo apt-get install -y software-properties-common
sudo apt-get install -y python-software-properties
sudo apt-get install -y mc

#Repositorio de php extra
sudo apt-add-repository -y ppa:ondrej/php
sudo apt-get update

#php7
sudo apt-get -y install curl php-cli php-mbstring git unzip apache2 mysql-server

#composer
sudo apt-get install -y composer

#extras php
sudo apt-get -y --allow-unauthenticated install php-mysql php-apcu php7.0-mysql php7.0-curl php7.0-gd php7.0-intl php-pear php-imagick php7.0-imap php7.0-mcrypt php-memcache php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl php7.0-mbstring php-gettext
sudo apt-get -y --allow-unauthenticated install php7.0-mysql php7.0-curl php7.0-gd php7.0-intl php-pear php-imagick php7.0-imap php7.0-mcrypt php-memcache  php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl php7.0-mbstring php-gettext

sudo apt-get install -y --allow-unauthenticated php7.0-fpm php7.0-mysql php7.0-curl php7.0-gd php7.0-intl php-pear php7.0-imap php7.0-mcrypt php7.0-ps php7.0-pspell php7.0-recode php7.0-snmp php7.0-sqlite php7.0-tidy php7.0-xmlrpc php7.0-xsl
sudo apt-get install -y --allow-unauthenticated php5.6-fpm php5.6-mysql php5.6-curl php5.6-gd php5.6-intl php-pear php5.6-imap php5.6-mcrypt php5.6-ps php5.6-pspell php5.6-recode php5.6-snmp php5.6-sqlite php5.6-tidy php5.6-xmlrpc php5.6-xsl

echo '------------------------- PHP 7.0 ------------------------------->'
sudo apt-get install -y --allow-unauthenticated php-json php7.0-imap php7.0-json php7.0-gd
sudo apt-get install -y --allow-unauthenticated  php7.0-cgi # server-side, HTML-embedded scripting language (CGI binary)
sudo apt-get install -y --allow-unauthenticated  php7.0-cli # command-line interpreter for the PHP scripting language
sudo apt-get install -y --allow-unauthenticated  php7.0-common # documentation, examples and common module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.0-curl # CURL module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.0-dev # Files for PHP7.0 module development
sudo apt-get install -y --allow-unauthenticated  php7.0-gd # GD module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.0-gmp #  GMP module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.0-json # JSON module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.0-ldap #  LDAP module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.0-mysql # MySQL module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.0-odbc # ODBC module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.0-opcache # Zend OpCache module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.0-pgsql # PostgreSQL module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.0-pspell # pspell module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.0-readline # readline module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.0-recode # recode module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.0-snmp # SNMP module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.0-sqlite3 # SQLite3 module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.0-tidy # tidy module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.0-xml # DOM, SimpleXML, WDDX, XML, and XSL module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.0-xmlrpc # XMLRPC-EPI module for PHP
sudo apt-get install -y --allow-unauthenticated  libphp7.0-embed # HTML-embedded scripting language (Embedded SAPI library)
sudo apt-get install -y --allow-unauthenticated  php7.0-bcmath # Bcmath module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.0-bz2 #bzip2 module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.0-enchant # Enchant module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.0-fpm
sudo apt-get install -y --allow-unauthenticated  php7.0-imap
sudo apt-get install -y --allow-unauthenticated  php7.0-interbase
sudo apt-get install -y --allow-unauthenticated  php7.0-intl
sudo apt-get install -y --allow-unauthenticated  php7.0-mbstring
sudo apt-get install -y --allow-unauthenticated  php7.0-mcrypt
sudo apt-get install -y --allow-unauthenticated  php7.0-phpdbg
sudo apt-get install -y --allow-unauthenticated  php7.0-soap
sudo apt-get install -y --allow-unauthenticated  php7.0-sybase
sudo apt-get install -y --allow-unauthenticated  php7.0-xsl
sudo apt-get install -y --allow-unauthenticated  php7.0-zip
sudo apt-get install -y --allow-unauthenticated  php7.0-dba
sudo apt-get -y --allow-unauthenticated  install php-soap php-curl
sudo apt-get -y --allow-unauthenticated  install php7.0 libapache2-mod-php7.0 libapache2-mod-php

echo '------------------------- PHP 7.1 ------------------------------->'
sudo apt-get install -y --allow-unauthenticated php-json php7.1-imap php7.1-json php7.1-gd
sudo apt-get install -y --allow-unauthenticated  php7.1-cgi # server-side, HTML-embedded scripting language (CGI binary)
sudo apt-get install -y --allow-unauthenticated  php7.1-cli # command-line interpreter for the PHP scripting language
sudo apt-get install -y --allow-unauthenticated  php7.1-common # documentation, examples and common module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.1-curl # CURL module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.1-dev # Files for PHP7.0 module development
sudo apt-get install -y --allow-unauthenticated  php7.1-gd # GD module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.1-gmp #  GMP module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.1-json # JSON module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.1-ldap #  LDAP module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.1-mysql # MySQL module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.1-odbc # ODBC module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.1-opcache # Zend OpCache module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.1-pgsql # PostgreSQL module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.1-pspell # pspell module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.1-readline # readline module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.1-recode # recode module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.1-snmp # SNMP module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.1-sqlite3 # SQLite3 module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.1-tidy # tidy module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.1-xml # DOM, SimpleXML, WDDX, XML, and XSL module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.1-xmlrpc # XMLRPC-EPI module for PHP
sudo apt-get install -y --allow-unauthenticated  libphp7.1-embed # HTML-embedded scripting language (Embedded SAPI library)
sudo apt-get install -y --allow-unauthenticated  php7.1-bcmath # Bcmath module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.1-bz2 #bzip2 module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.1-enchant # Enchant module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.1-fpm
sudo apt-get install -y --allow-unauthenticated  php7.1-imap
sudo apt-get install -y --allow-unauthenticated  php7.1-interbase
sudo apt-get install -y --allow-unauthenticated  php7.1-intl
sudo apt-get install -y --allow-unauthenticated  php7.1-mbstring
sudo apt-get install -y --allow-unauthenticated  php7.1-mcrypt
sudo apt-get install -y --allow-unauthenticated  php7.1-phpdbg
sudo apt-get install -y --allow-unauthenticated  php7.1-soap
sudo apt-get install -y --allow-unauthenticated  php7.1-sybase
sudo apt-get install -y --allow-unauthenticated  php7.1-xsl
sudo apt-get install -y --allow-unauthenticated  php7.1-zip
sudo apt-get install -y --allow-unauthenticated  php7.1-dba
sudo apt-get -y --allow-unauthenticated  install php7.1 libapache2-mod-php7.1 libapache2-mod-php

echo '------------------------- PHP 7.2 ------------------------------->'
sudo apt-get install -y --allow-unauthenticated php-json php7.1-imap php7.2-json php7.2-gd
sudo apt-get install -y --allow-unauthenticated  php7.2-cgi # server-side, HTML-embedded scripting language (CGI binary)
sudo apt-get install -y --allow-unauthenticated  php7.2-cli # command-line interpreter for the PHP scripting language
sudo apt-get install -y --allow-unauthenticated  php7.2-common # documentation, examples and common module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.2-curl # CURL module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.2-dev # Files for PHP7.0 module development
sudo apt-get install -y --allow-unauthenticated  php7.2-gd # GD module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.2-gmp #  GMP module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.2-json # JSON module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.2-ldap #  LDAP module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.2-mysql # MySQL module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.2-odbc # ODBC module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.2-opcache # Zend OpCache module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.2-pgsql # PostgreSQL module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.2-pspell # pspell module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.2-readline # readline module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.2-recode # recode module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.2-snmp # SNMP module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.2-sqlite3 # SQLite3 module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.2-tidy # tidy module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.2-xml # DOM, SimpleXML, WDDX, XML, and XSL module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.2-xmlrpc # XMLRPC-EPI module for PHP
sudo apt-get install -y --allow-unauthenticated  libphp7.2-embed # HTML-embedded scripting language (Embedded SAPI library)
sudo apt-get install -y --allow-unauthenticated  php7.2-bcmath # Bcmath module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.2-bz2 #bzip2 module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.2-enchant # Enchant module for PHP
sudo apt-get install -y --allow-unauthenticated  php7.2-fpm
sudo apt-get install -y --allow-unauthenticated  php7.2-imap
sudo apt-get install -y --allow-unauthenticated  php7.2-interbase
sudo apt-get install -y --allow-unauthenticated  php7.2-intl
sudo apt-get install -y --allow-unauthenticated  php7.2-mbstring
sudo apt-get install -y --allow-unauthenticated  php7.2-mcrypt
sudo apt-get install -y --allow-unauthenticated  php7.2-phpdbg
sudo apt-get install -y --allow-unauthenticated  php7.2-soap
sudo apt-get install -y --allow-unauthenticated  php7.2-sybase
sudo apt-get install -y --allow-unauthenticated  php7.2-xsl
sudo apt-get install -y --allow-unauthenticated  php7.2-zip
sudo apt-get install -y --allow-unauthenticated  php7.2-dba
sudo apt-get -y --allow-unauthenticated  install php7.2 libapache2-mod-php7.2 libapache2-mod-php

sudo apt-get install -y php7.2-xdebug
sudo apt-get install -y php7.1-xdebug
sudo apt-get install -y php7.0-xdebug

#sudo ln -s /etc/php/mods-available/xdebug.ini /etc/php/7.0/apache2/conf.d/20-xdebug.ini
#sudo ln -s /etc/php/mods-available/xdebug.ini /etc/php/7.1/apache2/conf.d/20-xdebug.ini
#sudo ln -s /etc/php/mods-available/xdebug.ini /etc/php/7.2/apache2/conf.d/20-xdebug.ini

echo '---------------> activar -------------------->'
echo ' '
sudo a2enconf php7.0-fpm
sudo a2enconf php7.1-fpm
sudo a2enconf php7.0-fpm
#sudo a2enconf php5.6-fpm

echo ' --------------------- > PHP MyAdmin -------------------->'
sudo apt-get install phpmyadmin

echo ' --------------------- > reiniciar apache y mysql -------------------->'
echo ' '
sudo service apache2 restart
sudo service mysql restart

echo ' ----------------------- Modo rewrite apache2 ------------------------>'
echo ' '
sudo a2enmod rewrite

echo '------------------- Instalar Vhost script ---------------------------->'
echo ' '
cd /usr/local/bin
sudo wget -O virtualhost https://raw.githubusercontent.com/RoverWire/virtualhost/master/virtualhost.sh
sudo chmod +x virtualhost
cd

echo '------------------ Set PHP ------------------------------------------>'
echo ' '

echo 'PHP 7.0'
cd /etc/php/7.0/apache2
sudo cp php.ini php.ini.back
sudo sed -i 's/display_errors = Off/display_errors = On/g' php.ini
cd /etc/php/7.0/fpm
sudo cp php.ini php.ini.back
sudo sed -i 's/display_errors = Off/display_errors = On/g' php.ini

echo 'PHP 7.1'
cd /etc/php/7.1/apache2
sudo cp php.ini php.ini.back
sudo sed -i 's/display_errors = Off/display_errors = On/g' php.ini
cd /etc/php/7.1/fpm
sudo cp php.ini php.ini.back
sudo sed -i 's/display_errors = Off/display_errors = On/g' php.ini

echo 'PHP 7.2'
cd /etc/php/7.2/apache2
sudo cp php.ini php.ini.back
sudo sed -i 's/display_errors = Off/display_errors = On/g' php.ini
cd /etc/php/7.2/fpm
sudo cp php.ini php.ini.back
sudo sed -i 's/display_errors = Off/display_errors = On/g' php.ini

echo '----------------------- Volver a reiniciar apache --------------------->'
sudo service apache2 restart

echo '-----------------------> Node JS -------------------------------------->'
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install -y nodejs

echo '-----------------------> Python --------------------------------------->'
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
apt-get install python-dev
sudo apt-get install -y libmysqlclient-dev
sudo apt-get install -y python-pip
sudo pip install virtualenv
sudo apt-get install libapache2-mod-wsgi python-dev
sudo a2enmod wsgi
sudo service apache2 restart

echo '-----------------------> Sqlite --------------------------------------->'
sudo apt-get install -y sqlite
sudo apt-get install php-sqlite3
sudo service apache2 restart

echo '-----------------------> MYSQL External connection ------------------------------------->'
sudo mysql -u root -pvagrant -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'vagrant' WITH GRANT OPTION; FLUSH PRIVILEGES;" 
sudo mysql -u root -pvagrant -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'127.0.0.1' IDENTIFIED BY 'vagrant' WITH GRANT OPTION; FLUSH PRIVILEGES;" 

以上是关于sh Instalaciones PHP Completas的主要内容,如果未能解决你的问题,请参考以下文章

sh Instalaciones para ubuntu RNB

修改route.php文件对ThinkPHP快速注册路由

sh php.sh

sh run__php.sh

sh php-5.5-install.sh

如何在从 docker-compose 调用的 .sh 文件中使用 .NET Core 机密