Last active
September 8, 2017 22:32
-
-
Save iamnnort/4717330c268fef9450daabb0156b1aa4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo a2enmod rewrite && sudo service apache2 restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Install Apache: | |
sudo apt-get install apache2 - install | |
sudo service apache2 restart - restart demon | |
sudo a2enmod <mod-name> - add mode from /etc/apache2/mods-available | |
sudo a2enconf <config-name> - add config from /etc/apache2/conf-available | |
sudo a2ensite <site-name> - add vhost from etc/apache2/sites-available | |
2) Add vhost to apache: | |
open /etc/hosts and add "127.0.0.1 host1.server1" | |
open /etc/apache2/sites-available/ and add | |
<VirtualHost *:80> | |
#Host name | |
ServerName host1.server1 | |
#Host document root | |
DocumentRoot /var/www/host1.server1 | |
<Directory /var/www/host1.server1> | |
AllowOverride All | |
</Directory> | |
</VirtualHost> | |
open /var/www and sudo mkdir host1.server1 && sudo chmod -R 777 host1.server1 | |
open etc/apache2/sites-available and add file "host1.server1.conf" | |
sudo a2ensite host1.server1.conf | |
sudo service apache2 restart | |
3) Install PHP: | |
sudo apt-get install libapache2-mod-php5 | |
sudo apt-get install php5-cli | |
sudo a2enmod php5 | |
sudo apt-get install php5-extension - add extension to php | |
4) Install MySQL: | |
sudo apt-get install mysql-server | |
sudo apt-get install mysql-client | |
sudo apt-get install php5-mysql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo a2dismod php5.6 | |
sudo a2enmod php7.1 | |
sudo service apache2 restart |
apt-get install php7.1-xml
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sudo apt-get remove php*
sudo apt-get install php7.1 php7.1-cli php7.1-common libapache2-mod-php7.1 php7.1-mysql php7.1-fpm php7.1-curl php7.1-gd php7.1-bz2 php7.1-mcrypt php7.1-json php7.1-tidy php7.1-mbstring php-redis php-memcached