Changes

How to forge a local file system server with IGEPv2 Board

90 bytes added, 11:45, 24 November 2011
m
no edit summary
=== Objectives ===
This project aims to create a local file system server using ARM Platform. It is very useful for this purpose for the next reasons:
-ARM is designed for low power consumption. This server should be connected to power supply all the day, if you use this architecture, you can lower your electric bill.
-ARM-Embedded is usually cheaper than a X86-Embedded processor.
-If you have a good internet broadband connection, is not difficult to configure your server to accept external http requests.
-Your data are 100% under your control, other services you don't know where are your files.
-Commercial services offer premium accounts with extra hard disk space, in this project you can use all the space as your HD or SD supports.
<br> When you finish this how-to, you will have your own local web service similar than Dropbox and SugarSync. Your service will powered by [http://www.owncloud.org Owncloud.org] software. I used for this tutorial Owncloud 3 alpha 1 release to prove all new characteristics, but you can follow this tutorial using the stable version, there characteristics are: File management, WebDAV access, sharing, music streaming, calendar, contacts, users &amp; groups, image gallery, online text editor, online task manager and bookmarks. For more information go to [http://www.owncloud.org Owncloud.org] page.
=== Limitations ===
- Don't upload more than 750 MB via Web, use WebDAV for this purpose.<br>
- The Web uses HTML5 technology, it tested with Firefox 7, Google Chrome 14 browser and mobile phone with IOS 4.3.3. Older browsers maybe have problems.
= Hardware Used =
- MicroSD card 2GB at least with SD card adapter.
- IGEPv2 Serial Debug cable, it isn't necessary later.
- Ethernet cable.
- Switch or Router.<br>
- External USB Hard Disk with USB&nbsp;cable.<br>
= Software Used =
- [http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29 LAMP]
- [http://www.openssh.com/ OpenSSH Server]<br>
= Installing Linaro Headless =
;init=/bin/bash
</pre>
NOTE: Check MAC address is not used for avoid conflicts.<br>
= Set up internet connection =
<pre>ping X.X.X.X
</pre>
After this, upgrade your system via "apt-get".
= Installing Open SSH Server =
<pre>ssh root@X.X.X.X
</pre>
Now we be able to connect to server via SSH, using the password typed above.
The next steps are not necessary use serial communication .
= Creating and editing Server Users =
The first line says that adminserver user can access like root with sudo command.
The second line, configure some paremetres to adminserver sudo access: adminserver needs root's password to run sudo (runaspw), the password will not be remembered (timestamp_timeout) and he gets only one chance to enter it (passwd_tries).<br>NOTE: Is important use visudo editor because it can detect spelling errors before write sudoers file.<br>
= Installing LAMP =
Replace by:
<pre>DocumentRoot /home/&lt;user&gt;/web/</pre>
DocumentRoot is the root folder that contains our web pages.
Search line:
Options FollowSymLinks</pre>
For security reasons, we are going to hide our files and folders.
Search line:
Replace by:
<pre>AllowOverride all</pre>
Allows a file .htaccess to override the options for the respective directory
Save and exit.
<pre>ServerSignature Off
ServerTokens Prod</pre>
For security reasons, this lines hide the version of Apache and Linux Distro.
Restart Apache:
<pre>sudo /etc/init.d/apache2 restart</pre>
Now we have a Apache with basic improved configuration.<br>
=== PHP ===
</pre>
Restart Apache:
<pre>sudo /etc/init.d/apache2 restart</pre> 
=== MySQL + PHPmyAdmin ===
<pre>sudo apt-get install mysql-server mysql-client phpmyadmin</pre>
Make a simbolic link to phpmyadmin:<br>
<pre>sudo ln -s /usr/share/phpmyadmin /home/adminserver/web/phpmyadmin</pre>
With phpmyadmin you can handle your mysql databases (managing databases, tables, fields, relations, indexes, users, permissions, etc) via web browser. It is useful for Owncloud or another program than uses MySQL.<br>
= Enabling Automatic Updates =
The above configuration updates the package list, downloads, and installs available upgrades every day. The local download archive is cleaned every week.
For more information go to [https://help.ubuntu.com/10.10/serverguide/C/automatic-updates.html here.]
= Set up a External HD =
/dev/sda1 on /media/usbhd-sda1 type ext3 (rw,relatime)
</pre>
Where our HD isi mounted in media folder, and its name is u"sbhd-sda1"
= Set up Owncloud.org Software =
</pre>
The estable version, the folder is named owncloud.
Open your web browser and finish your Owncloud installation. Go to: http://&lt;IP PRIVATE SERVER&gt;/owncloud-owncloud/ Put your personal information and select MySQL Database. once finish, click Finish Setup.
[[Image:Previewowncloudinstallation1.png|thumb|center]] <br>
=== Configuring Apache and PHP for Owncloud ===
PHP and Apache have a standard configuration, we need to change it to improve performance&nbsp; of our project and server.<br>
Edit <&lt;span style="font-family: monospace;" />&gt;/etc/apache2/apache2.conf
<pre>LockFile ${APACHE_LOCK_DIR}/accept.lock
PidFile ${APACHE_PID_FILE}
ServerTokens Prod
</pre>
I reduce the number of clients and increased the persistent connection time.
Edit: /etc/php5/apache2/php.ini.<br>
memory_limit = 128M memory_limit = 1025M
mysql.connect_timeout = 60 mysql.connect_timeout = 600</pre>
I configure it for a local connection.
Edit Owncloud .htaccess and erase the following lines:
php_value post_max_size 512M
</pre>
Now .htacces don't limit the upload filesize and post size.
Restart Apache service:
<pre>sudo /etc/init.d/apache2 restart
</pre> 
=== Configuring WebDAV for Owncloud ===
</pre>
Mount your Virtual Owncloud Hardrive with the command: mount ~/owncloud You can automatically mount the folder on login, add the last command to ~/.bashrc
 
[[Category:Tutorials]]
[[Category:Work in progress]]
0
edits