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.

Braiam
  • 67,791
  • 32
  • 179
  • 269
Cam Jones
  • 3,741
  • 10
  • 23
  • 26
  • 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 08:57
  • I downloaded version 5.0.12 from the owncloud website. not sure what errors i'm getting, i will post the errors tomorrow when in front of pc again. I clicked on your ppa link and it look like this website:http://www.slsmk.com/how-to-install-owncloud-to-ubuntu-12-04/, which I already tried following as well. I got past the command line prompt part and got stuck on this, (once the package is installed, access the ownCloud interface at http://SERVERNAME/owncloud). – Cam Jones Oct 20 '13 at 09:20
  • 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 09:33
  • I am not sure what to substitute SERVERNAME with. Do I just make one up or are you suppossed to previously have it set up? This is my first time setting up any kind of home server so I am kinda in the dark when it comes to most of this stuff. – Cam Jones Oct 20 '13 at 10:04
  • 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
  • something happened to the graphics driver so long story short I am reinstalling ubuntu server 12.04. Should I install the openSSH server or the LAMP server? – Cam Jones Oct 20 '13 at 22:43
  • 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 04:34
  • I now have mysql and owncloud installed on ubuntu. I made a seperate partition for where I want my cloud data to be stored mounted at /var. I am able to log into owncloud using my ipaddress/owcloud. It asked me to set up an account and i did that and I changed the directory /var/www/owncloud/data and logged in. Now every time i go to my owncloud ip address it says cannot create data directory and doesn't give me an option to log out. Any ideas? – Cam Jones Oct 21 '13 at 08:38
  • 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 08:55
  • Thank you very much for all your effort so far. I guess I should have said the mount point is set to /var, but it was probably never actually mounted. Oh and I'm not using the gui anymore, just the ubuntu server command shell(or whatever it is called) Do you know – Cam Jones Oct 21 '13 at 09:28
  • the command to mount it? I guess if the partition was never mounted, then owncloud was installed somewhere else and I still need to move it into the /var/www/ folder. All the guides for installing owncloud are all outdated So I am having to pick and choose info from a bunch of different guides which is making it much more confusing. I have webmin installed So I am able to manage the ubuntu server from a browser, if that makes anything easier. I tried to move this to chat but didn't have enough reputation. – Cam Jones Oct 21 '13 at 09:29

1 Answers1

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.

chesedo
  • 1,709
  • 14
  • 25
  • 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 05: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 03 '14 at 00: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 03 '14 at 05:32
  • @Skateguy answer has been updated to make the deviation clear – chesedo Sep 03 '14 at 11:38
  • I appreciate you reviewing your answer, thanks. – Cam Jones Sep 04 '14 at 02:39
  • @Oli, why did you edit out the part about installing php or gd module? I have server edition installed and I choose LAMP at setup so I only want to run the command for the module instead of tagging it on to install LAMP command. – Cam Jones Sep 05 '14 at 18:40
  • @Skateguy I just combined it into the previous command. Doesn't matter what you chose at setup, specifying lamp-server^ again won't hurt. – Oli Sep 05 '14 at 20:08