HOWTO create your own cloud server in 10 minutes

Discussion in 'Linux Server' started by Rob, Dec 16, 2011.

  1. Rob

    Rob Administrator Staff Member

    Messages:
    575
    Likes Received:
    217
    Trophy Points:
    43
    Everyone loves using services like Dropbox or Boxnet. It's almost 2012 - everyone has some kind of Cloud (buzz buzz) storage! Half of us do have hardware laying around that we'd love to convert into our own 'cloud server' but never came across the right software. Instead we pay $9.99 each month to places like dropbox for 50gigs.

    Luckily, the people at OwnCloud.org have released their own open source software that works as a web app ready to help you store things, create bookmarks, keep a calendar, contacts, etc.. AND share it to anyone you want.. using YOUR hardware!

    This should take about 10 minutes. We're starting with a new install of CentOS 5.7 on a VPS from IQnection.

    First, install the webtatic repo:
    Code:
    rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
    Next, install the things needed for OwnCloud:
    [xcode=bash]yum -y install --enablerepo=webtatic git-all mysql mysql-server httpd php php-pecl-zip php-mysql php-mbstring[/xcode]

    Let's make sure that httpd and mysqld start each boot and that they're started now:
    [xcode=bash]
    chkconfig --levels 235 mysqld on
    chkconfig --levels 235 httpd on
    service mysqld on
    service httpd on
    [/xcode]

    For the sake of quick articles, we're going to use the main server doc root .. cd into it and grab the latest owncloud:
    [xcode=bash]
    cd /var/www/html
    git clone git://gitorious.org/owncloud/owncloud.git
    [/xcode]

    Get the installation ready..
    [xcode=bash]
    chown -R apache.apache owncloud/
    mkdir owncloud/data
    chmod 750 owncloud/data
    chmod 777 owncloud/config
    [/xcode]


    Let's create a database and add a user:
    [xcode=bash]
    mysql -u root -p
    CREATE DATABSE owncloud;
    GRANT ALL ON owncloud.* TO 'owncloud'@'localhost' IDENTIFIED BY '733Tpass';
    GRANT ALL ON owncloud.* TO 'owncloud'@'localhost.localdomain' IDENTIFIED BY '733Tpass';
    [/xcode]

    Edit the httpd conf file and make sure AllowOverride is set to All so our .htaccess works:
    (find the following in your httpd.conf and match it up)
    [xcode=bash]
    vim /etc/httpd/conf/httpd.conf
    <Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
    [/xcode]

    Now, point your favorite web browser at your new installation ( something like: http://192.168.0.40/owncloud/ ) and have fun!

    First use, you'll have to create an admin username and password, as well as give your mysql information that you created earlier. As long as you followed these instructions, you should be good to go. Leave a comment if you run into any issues - I may have missed writing something down!

    Attached Files:

    rdarw, Remp and Akendo like this.
  2. MustangV10

    MustangV10 New Member

    Messages:
    87
    Likes Received:
    3
    Trophy Points:
    0
    That's pretty cool, might give it a go, I have a spare Linux VPS. Thanks very much Rob!
  3. Victor Leigh

    Victor Leigh Member

    Messages:
    209
    Likes Received:
    8
    Trophy Points:
    18
    Now that has started a new train of thought in this old brain of mine. Using that, we can create a cdn, right? Also an rsync backup server?
  4. arran

    arran Guest

    thanks for the very easy solution.
  5. TheMugenFox

    TheMugenFox New Member

    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    0
    Do you think I could possibly use one of these free cloud services to make my self a small seedbox? I am very interested in downloading about 6GBs worth of files from torrents and I would love to use a seedbox for it, but I cannot afford one at the moment.
  6. Victor Leigh

    Victor Leigh Member

    Messages:
    209
    Likes Received:
    8
    Trophy Points:
    18
    Just thought of one thing. What are the minimum specifications required to run that? I don't want mess up the vps which I am using for my sites now. So I may buy another vps to try this out if the minimum specifications are not too much.
  7. Remp

    Remp New Member

    Messages:
    44
    Likes Received:
    2
    Trophy Points:
    0
    That's really cool! I could imagine my own HTPC running this... Wow, it would be awesome to have one! I wouldn't ever have to use my pendrive again...
  8. wjack2010

    wjack2010 New Member

    Messages:
    22
    Likes Received:
    1
    Trophy Points:
    0
    Could you do this same tutorial but convert it for Ubuntu, or do I just replace yum with apt-get or something? Could someone please tell me, this way I can use Ubuntu for my cloud server, it doesn't matter if it can't be done with Ubuntu, however I would really prefer it ;) Thanks for any one who can help me.
  9. timothywcrane

    timothywcrane New Member

    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    0
    This is really useful. I am always looking for something new that I can add to my plethora of online offerings. Now for a personal cloud server this would be fine, but would it be a viable option to resll space on if you had the room? I see how easy it would be to set this up for yourself, but i do not really see a panel for adding multiple users. I know it might be the marketer in me, but I would find this extremely useful. Integrating this into the various social networks as an app would be real nice. Think "Facebook Space" LOL.
  10. Jimmy Astucia

    Jimmy Astucia New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    This could lead to some great techno-mobility.
  11. kInOzAwA

    kInOzAwA New Member

    Messages:
    23
    Likes Received:
    4
    Trophy Points:
    3

    For ubuntu, follow this step.

    2) Install Own Cloud dependencies via terminal / shell:

    sudo apt-get install apache2 php5 php-pear php-xml-parser php5-sqlite php5-json sqlite php5-mysql mp3info curl libcurl3 libcurl3-dev php5-curl zip php5-gd

    2) Download the latest own cloud via here or by terminal / shell using "wget http://owncloud.org/releases/owncloud-3.0.2.tar.bz2"

    3) You need to decompress the file using tar and extract to its own folder in terminal / shell.

    cd
    tar -xvf owncloud*.tar.bz2
    sudo mv owncloud /var/www/owncloud

    4) Setup the permissions

    sudo chown -R www-data:www-data /var/www/owncloud

    5) Restart Apache on terminal / shell

    sudo /etc/init.d/apache2 restart

    6) Open a browser and enter http://localhost/owncloud - if you get an error similar to this: "No database drivers (sqlite or mysql) installed.", restart your computer and the error should be gone.

    7) Ok, now back to: http://localhost/owncloud - here you'll be prompted to enter a new admin username and password and you're done!

    8) If you get an error similar to the following:

    "Could not open /var/www/.well-known/host-meta for writing, please check permissions!"

    after creating your username and password, run the following commands in terminal / shell :

    sudo mkdir /var/www/.well-known
    sudo touch /var/www/.well-known/host-meta
    sudo chown -R www-data:www-data /var/www/.well-known/


    :)
    sam300 and Rob like this.
  12. sam300

    sam300 New Member

    Messages:
    18
    Likes Received:
    1
    Trophy Points:
    0
    Nice and short tutorial! May come in handy sometime. Thanks.
    ghost4782000 likes this.
  13. kInOzAwA

    kInOzAwA New Member

    Messages:
    23
    Likes Received:
    4
    Trophy Points:
    3
    you're welcome.

    BTW if anyone need to use mysql database to have bigger addon/options to add more users instead of sqlite (single user) just add this line after no 5 via terminal /shell :

    mysql -u root -p
    CREATE DATABASE owncloud;
    GRANT ALL ON owncloud.* TO 'owncloud'@'localhost' IDENTIFIED BY 'your-preferable-pass';
    GRANT ALL ON owncloud.* TO 'owncloud'@'localhost.localdomain' IDENTIFIED BY 'your-preferable-pass';
    type 'quit' or 'exit' to end mysql then continue to line 6).

    :)
  14. Darwin

    Darwin New Member

    Messages:
    115
    Likes Received:
    3
    Trophy Points:
    0
    Very nice.. as to the post mentioning technological mobility... oh for sure seed heaven for lower GB's and maybe something even better if I can set up a little pool at the office for bypassing all that mess of secure server nonsense. Hmmmm lol.
  15. Stefano Messicano

    Stefano Messicano New Member

    Messages:
    88
    Likes Received:
    3
    Trophy Points:
    0
    Thanks for the advanced configuration tips!The Linux version I know best is Ubuntu Server, as this is what I used on all my own virtual servers until now. The second one is CentOS, which is the default at my day job – but there I don’t do system administration. So I first tried to install OpenVZ on Ubuntu server, and then on CentOS – installing a new OS image in my dedicated server only takes a few minutes, so making different tries was very easy.
    rdarw likes this.
  16. ghost4782000

    ghost4782000 New Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
  17. enhu

    enhu New Member

    Messages:
    93
    Likes Received:
    4
    Trophy Points:
    0
    This is something new to me. I'm use to share my files with dropbox with only 2gb :D I'd ask the people in the ubuntu forum if they have the webtatic in their repo so maybe i could also install this.
  18. jhello

    jhello New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    excellent!
  19. siqko

    siqko New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Thank pal that was really helpful i was looking forward for this.


    Cheers
  20. snipestech

    snipestech New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Ok I set it up ,now a dumb question.How do I access it ?

    Sent from my Nexus 7 using Tapatalk 2

Share This Page