4

I installed Ubuntu server and did not know what to do at command prompt so I ended up doing the install desktop command so I could have a GUI. I have the owncloud server package downloaded but do not have the permission to move it into the /var/www/ folder. I was following the instructions here: http://ubuntuserverguide.com/2012/05/install-owncloud-4-ubuntu-server-1204-lts.html, but couldn't get past step 2.

  • 1
    What errors are you getting at step 2? Also did you get owncloud 4 as per the website instructions or version 5? And seeing that you are not familiar with the command line, you can also just try the ppa. – chesedo Oct 20 '13 at 8:57
  • 1
    Did you try to access the interface from the server or another computer connected to the server? And what did you substitute SERVERNAME with? – chesedo Oct 20 '13 at 9:33
  • 1
    SERVERNAME is the name of the server linked to its IP address. Use localhost when trying from the server and the IP of the within your LAN when trying from another computer in the LAN. I will help you give it a proper name once owncloud works. – chesedo Oct 20 '13 at 10:11
  • 1
    You will install the LAMP server - LAMP server installs Apache, PHP and mySQL needed for a web service like owncloud server. Openssh-server will allow you to run commands on the server from another machine and can also be used to access the server's files remotely(mostly for backup programs) - so you might want to install it too. – chesedo Oct 21 '13 at 4:34
  • 1
    Is the drive/partition still mounted? And change the permissions of the data directory like in step 3 of the article you linked to (eg sudo chown -R www-data:www-data /var/data-dir - change data-dir with the correct path). – chesedo Oct 21 '13 at 8:55
8

Installing a webserver

Owncloud is a webservice so you will need to install LAMP - a webserver for Ubuntu. Do that by running the following. Or choose to install LAMP when installing the server.

sudo apt-get install lamp-server^ php5-gd

Give MySQL root a password when asked - and remember it as you will need it later.

Getting Owncloud files

Next you will need the owncloud server files. You will find full instructions here, but here's a summary that should work for 12.04 and 14.04. It may cover other releases but check the repo availability first.

source /etc/lsb-release
REPO=http://download.opensuse.org/repositories/isv:ownCloud:community/xUbuntu_$DISTRIB_RELEASE
wget $REPO/Release.key | sudo apt-key add -
echo "deb $REPO/ /" | sudo tee /etc/apt/sources.list.d/owncloud.list 
sudo apt-get update
sudo apt-get install owncloud

Setting the permissions of the owncloud files to those of the webserver by running.

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

Setting up a separate partition/drive for the data directory (optional)

If you want to keep the data on a separate drive then add it and set its mount point in /mnt/owncloudData (preferably)

Final setup

Go to http://your-server-ip/owncloud in the browser of a computer on the same network. Set the username and password that you want for the admin user.

Under Storage & database (after clicking it) you can change the data path if you prepared a separate one. You can also change the database engine, if you choose mySQL then set root as the user, the password is the one you set above when you installed LAMP and the database name is up to you ('owncloud' is a good name).

Giving server a proper name (optional) - only if server is gateway

Typing the IP address of the server to access the web UI can become hard to remember so lets give it a proper name. Type the following.

sudo nano /etc/hosts

And add the following to the end.

server-ip        server-name

Replace server-ip with its IP and server-name with the name (like just 'server' is good). Now lets get DNSMASQ to use the hosts file (like explained here) by typing the following.

echo 'addn-hosts=/etc/hosts' | sudo tee -a /etc/NetworkManager/dnsmasq.d/hosts.conf
sudo restart network-manager

You should now be able to go to http://server-name/owncloud to access the UI from any computer on the LAN.

  • Very thorough answer. I had to do this command to get the owncloud browser to work, sudo apt-get install php5-gd. – Cam Jones Oct 22 '13 at 5:46
  • hi there, if you have time could you review this answer and make sure it is relevant to 14.04.1 server. Thanks. – Cam Jones Sep 3 '14 at 0:03
  • @Skateguy, they should be - you'll just use the repository details for 14.04 in the second step (see the full instructions link). But I'll see to run a quick test later today to confirm... – chesedo Sep 3 '14 at 5:32
  • @Skateguy answer has been updated to make the deviation clear – chesedo Sep 3 '14 at 11:38
  • I appreciate you reviewing your answer, thanks. – Cam Jones Sep 4 '14 at 2:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.