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 Answer
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. Oct 22, 2013 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. Sep 3, 2014 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...– chesedoSep 3, 2014 at 5:32
-
-
sudo chown -R www-data:www-data /var/data-dir
- change data-dir with the correct path).