How to Activate Mod_Rewrites:
sudo a2enmod rewrite How to enable new-composed virtual-host config (site-name.conf - filename which Your composed in "site-available" folder in directory "/etc/apache2"): a2ensite site-name.conf
How to Activate Mod_Rewrites:
sudo a2enmod rewrite How to enable new-composed virtual-host config (site-name.conf - filename which Your composed in "site-available" folder in directory "/etc/apache2"): a2ensite site-name.conf
Install Apache – server:
apt-get install apache2
Add repository for php packages:
add-apt-repository ppa:ondrej/php
Install php version 5.6:
apt-get install php5.6
apt-get install php5-cli
Very important module without it I can’t work with *.php files, they just download.
apt-get install libapache2-mod-php5
Also don’t forget install additional php modules for work with mysql, images, curl…. etc.
php5-curl
php5-gd
php5-mysqlnd
All available list here : http://packages.ubuntu.com/search?keywords=php5-&searchon=names&suite=trusty§ion=all
Create new user for MySQL DB from command line with name 'username' and password 'password':
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password'; Create database from linux (Ubuntu, CentOS) with name 'mydb' and charset 'utf8' and collate 'utf8_general_ci'
CREATE DATABASE `mydb` CHARACTER SET utf8 COLLATE utf8_general_ci; Give rights for all tables in 'mydb' for user 'username' with password 'password' GRANT ALL ON `mydb`.* TO `username`@localhost IDENTIFIED BY 'password';
Update rights:
FLUSH PRIVILEGES;