This shows you the differences between two versions of the page.
tutorials:cb1:customization:cubian_nginx_mysql_php5_on_cubieboard [2013/09/26 09:04] soloforce created |
tutorials:cb1:customization:cubian_nginx_mysql_php5_on_cubieboard [2013/12/23 14:50] (current) |
||
---|---|---|---|
Line 7: | Line 7: | ||
*After a reboot, and an active internet connection, login in Cubian (user: cubie, pwd: cubie) and run: | *After a reboot, and an active internet connection, login in Cubian (user: cubie, pwd: cubie) and run: | ||
<code> | <code> | ||
- | $sudo apt-get update | + | $ sudo apt-get update |
- | $sudo apt-get upgrade | + | $ sudo apt-get upgrade |
</code> | </code> | ||
{{:lxdefromold.jpg|}} | {{:lxdefromold.jpg|}} | ||
*Then,install LXDE with: | *Then,install LXDE with: | ||
<code> | <code> | ||
- | $sudo apt-get install lxde | + | $ sudo apt-get install lxde |
</code> | </code> | ||
**(Nb: It requires a download of 165 MB of data)** | **(Nb: It requires a download of 165 MB of data)** | ||
Line 21: | Line 21: | ||
*After the installation reboot the mechine: | *After the installation reboot the mechine: | ||
<code> | <code> | ||
- | $sudo reboot | + | $ sudo reboot |
</code> | </code> | ||
Line 27: | Line 27: | ||
*After the login, I change the password of Cubie user: | *After the login, I change the password of Cubie user: | ||
<code> | <code> | ||
- | $sudo passwd cubie | + | $ sudo passwd cubie |
</code> | </code> | ||
**(NB insert the new password twice) ** | **(NB insert the new password twice) ** | ||
Line 33: | Line 33: | ||
*And I install the Midnight Commander: | *And I install the Midnight Commander: | ||
<code> | <code> | ||
- | $sudo apt-get install mc | + | $ sudo apt-get install mc |
</code> | </code> | ||
*And finally: | *And finally: | ||
<code> | <code> | ||
- | $sudo apt-get install mysql-server mysql-client | + | $ sudo apt-get install mysql-server mysql-client |
</code> | </code> | ||
{{:mysqlfromold2.jpg|}} | {{:mysqlfromold2.jpg|}} | ||
Line 45: | Line 45: | ||
*On Debian this web server have a package, therefore: | *On Debian this web server have a package, therefore: | ||
<code> | <code> | ||
- | $sudo apt-get install nginx | + | $ sudo apt-get install nginx |
</code> | </code> | ||
{{:nginxfromold1.jpg|}} | {{:nginxfromold1.jpg|}} | ||
*And start the server: | *And start the server: | ||
<code> | <code> | ||
- | $sudo /etc/init.d/nginx start | + | $ sudo /etc/init.d/nginx start |
</code> | </code> | ||
{{:nginxfromold2.jpg|}} | {{:nginxfromold2.jpg|}} | ||
Line 61: | Line 61: | ||
*PHP5 works in nginx through PHP-FPM (PHP-FPM (FastCGI Process Manager), an alternative PHP FastCGI implementation: | *PHP5 works in nginx through PHP-FPM (PHP-FPM (FastCGI Process Manager), an alternative PHP FastCGI implementation: | ||
<code> | <code> | ||
- | $sudo apt-get install php5-fpm | + | $ sudo apt-get install php5-fpm |
</code> | </code> | ||
{{:php5fromold1.jpg|}} | {{:php5fromold1.jpg|}} | ||
Line 69: | Line 69: | ||
*We need to make one small change in the php configuration file, then open php.ini: | *We need to make one small change in the php configuration file, then open php.ini: | ||
<code> | <code> | ||
- | $sudo nano /etc/php5/fpm/php.ini | + | $ sudo nano /etc/php5/fpm/php.ini |
</code> | </code> | ||
{{:php5fromold2.jpg|}} | {{:php5fromold2.jpg|}} | ||
Line 83: | Line 83: | ||
*Save and exit.It's necessary another small change in the php5-fpm configuration.Open up www.conf: | *Save and exit.It's necessary another small change in the php5-fpm configuration.Open up www.conf: | ||
<code> | <code> | ||
- | $sudo nano /etc/php5/fpm/pool.d/www.conf | + | $ sudo nano /etc/php5/fpm/pool.d/www.conf |
</code> | </code> | ||
{{:php5fromold5.jpg|}} | {{:php5fromold5.jpg|}} | ||
Line 90: | Line 90: | ||
*Save and Exit and restart php-fpm: | *Save and Exit and restart php-fpm: | ||
<code> | <code> | ||
- | $sudo service php5-fpm restart | + | $ sudo service php5-fpm restart |
</code> | </code> | ||
{{:php5fromold7.jpg|}} | {{:php5fromold7.jpg|}} | ||
Line 96: | Line 96: | ||
*Open the default virtual host file | *Open the default virtual host file | ||
<code> | <code> | ||
- | $sudo nano /etc/nginx/sites-available/default | + | $ sudo nano /etc/nginx/sites-available/default |
</code> | </code> | ||
{{:cnginxfromold1.jpg|}} | {{:cnginxfromold1.jpg|}} | ||
Line 105: | Line 105: | ||
* Save and exit.Now, create a php test page: | * Save and exit.Now, create a php test page: | ||
<code> | <code> | ||
- | $sudo nano /usr/share/nginx/www/info.php | + | $ sudo nano /usr/share/nginx/www/info.php |
</code> | </code> | ||
{{:cnginxfromold4.jpg|}} | {{:cnginxfromold4.jpg|}} |