======Cubian====== *[[http://cubian.org|Cubian]] is a Linux operating system designed for Cubieboard based on Debian wheezy. {{:cubianfromold.jpg|}} ======Install LXDE====== *After a reboot, and an active internet connection, login in Cubian (user: cubie, pwd: cubie) and run: $ sudo apt-get update $ sudo apt-get upgrade {{:lxdefromold.jpg|}} *Then,install LXDE with: $ sudo apt-get install lxde **(Nb: It requires a download of 165 MB of data)** {{:lxdefromold2.jpg|}} *During the installation of LXDE it's possible to choose the keyboard layout and language. {{:lxdefromold3.jpg|}} *After the installation reboot the mechine: $ sudo reboot ======Install MySQL====== *After the login, I change the password of Cubie user: $ sudo passwd cubie **(NB insert the new password twice) ** {{:mysqlfromold1.jpg|}} *And I install the Midnight Commander: $ sudo apt-get install mc *And finally: $ sudo apt-get install mysql-server mysql-client {{:mysqlfromold2.jpg|}} **(NB: You will be asked to provide a password for the MySQL root user.)** ======Install Nginx web server====== *On Debian this web server have a package, therefore: $ sudo apt-get install nginx {{:nginxfromold1.jpg|}} *And start the server: $ sudo /etc/init.d/nginx start {{:nginxfromold2.jpg|}} *If all is ok, type in the IP address of web server (or localhost) in your web browser and you should see the following page: {{:nginxfromold3.jpg|}} **(NB The default document root in Nginx is located in /usr/share/nginx/www)** ======Install PHP5-fpm====== *PHP5 works in nginx through PHP-FPM (PHP-FPM (FastCGI Process Manager), an alternative PHP FastCGI implementation: $ sudo apt-get install php5-fpm {{:php5fromold1.jpg|}} **(Note: PHP-FPM is a daemon process (with the init script /etc/init.d/php5-fpm) that runs a FastCGI server on the socket /var/run/php5-fpm.sock.)** ======Configure PHP5====== *We need to make one small change in the php configuration file, then open php.ini: $ sudo nano /etc/php5/fpm/php.ini {{:php5fromold2.jpg|}} *And find the line ;cgi.fix_pathinfo=1 *And remove ; and change the 1 to 0 {{:php5fromold3.jpg|}} {{:php5fromold4.jpg|}} *Save and exit.It's necessary another small change in the php5-fpm configuration.Open up www.conf: $ sudo nano /etc/php5/fpm/pool.d/www.conf {{:php5fromold5.jpg|}} *And verify that the listen directive is set to /var/run/php5-fpm.sock. {{:php5fromold6.jpg|}} *Save and Exit and restart php-fpm: $ sudo service php5-fpm restart {{:php5fromold7.jpg|}} ======Configure Nginx====== *Open the default virtual host file $ sudo nano /etc/nginx/sites-available/default {{:cnginxfromold1.jpg|}} *The configuration should include the changes below {{:cnginxfromold2.jpg|}} {{:cnginxfromold3.jpg|}} * Save and exit.Now, create a php test page: $ sudo nano /usr/share/nginx/www/info.php {{:cnginxfromold4.jpg|}} * Add in the following line: {{:cnginxfromold5.jpg|}} * Then Save and Exit and restart nginx.The nginx and php-fpm configuration is in http://localhost/info.php {{:cnginxfromold6.jpg|}} *Next: Phpmyadmin, Webmin, VNCserver and Owncloud **&The original author:Tommaso Mauro Tautonico &Copied from http://tautonik.homepc.it/tutorial.html**