Hello friends, I wanted to give you a heads up that v1.5 is now available for use. Although the change log is very minimal, in reality there was a lot of refactoring code that took place and with it comes even better compatibility with Windows Server 2008/2008r2.
As I get further into development of this utility, I am a starting to realize how unprofessional it might look and feel. As a solution I am working on a better interface and although I do not have a prototype that I can share at this moment, let me tell you that it is coming along very well and surprisingly it is looking pretty slick….at least to me 🙂
As always, thank you for visiting and see you next time!
We are indeed making some progress, today I will be going over the install process for ownCloud 8.0.2 and walking you through the best practices.
Configure static IP address
Do not leave your machine to grab an IP from DHCP, I suggest you have a spreadsheet that lists all IP addresses within your subnet and there status (free/used/reserved). Doing this has helped me keep my network organized and no more dang IP conflicts!
Using your favorite text editor, open the interface file which is located in /etc/network/interfaces
1
sudo nano/etc/network/interfaces
I have already reserved a IP address in my list so that is won’t get used anywhere else, I suggest you do that same. Under the primary network interface comment is where you want to put your static address.
1
2
3
4
5
6
7
8
9
# The primary network interface
auto eth0
iface eth0 inet static
address11.0.0.13
netmask255.255.255.0
network11.0.0.0
broadcast11.0.0.255
gateway11.0.0.1
dns-nameservers11.0.0.78.8.8.8
Once you have entered this information, save your changes (in nano it is CTRL + X) and exit the text editor. At this point it would be a good idea to reboot the machine to insure it does come back up with the correctly set static IP address.
Installing ownCloud 8.0.2
First thing to do is add ownCloud’s repo to apt-get by doing the following command:
Once you have created your repo file and optionally downloaded/saved the key, do the following:
1
2
3
#run these
sudo apt-get update
sudo apt-get install owncloud
You should see something similar to below…
You will be asked for confirmation, enter Y and let’s get this ball rolling!
NOTE if you did not save the key above then you will get a second prompt warning that the ownCloud packages cannot be authenticated, go ahead and press Y to confirm
During the install process, you will be asked to set a password for the root user for MySQL, I suggest a strong password here and be sure that you keep record of it because we will need it when we configure ownCloud.
Once apt-get is finished downloading all of the bits bring up your favorite
At this time, fill in the blanks including the password that you had setup during the install process for mysql and hit Finish Setup.
The setup process will take a few minutes so do not navigate away from the page and let it process. Once the setup finishes you will enter the main dashboard for your user account.
On the top right, click your username and go to the Admin section, from here lets clear up some of the warnings that ownCloud might be complaining about.
Resolving the “PHP charset is not set to UTF-8” warning
Let’s jump back into our SSH session and edit the relevant php.ini file that this warning is referring to. Open up /etc/php5/apache2/php.ini in your favorite editor again and search for the phrase “default_charset”. (CTRL + W in nano)
1
2
3
;PHP'sdefaultcharacter set isset toempty.
;http://php.net/default-charset
;default_charset="UTF-8"
Once you find it, remove the colon in front of it to uncomment and after that is done, restart apache2 and refresh the admin page to get rid of the warning.
Here are the commands that I used to achieve this:
1
2
nano/etc/php5/apache2/php.ini
service apache2 restart
Resolving the security warning
You are accessing ownCloud via HTTP. We strongly suggest you configure your server to require using HTTPS instead.
In order to enable HTTPS, we must first enable SSL and assign a certificate to use. To create a self-signed certificate, do the following:
At this time you will be prompted to enter a bunch of information regarding the certificate, if this is going to be a private server that only you use then feel free to make up and/or leave some fields blank. Here is what I filled out:
These are the settings that you need to add/change:
1
2
3
4
5
6
ServerAdmin support@uglyvpn.com
ServerName owncloud.uglyvpn.com
ServerAlias www.owncloud.uglyvpn.com
DocumentRoot/var/www/html
SSLCertificateFile/etc/apache2/ssl/apache.crt
SSLCertificateKeyFile/etc/apache2/ssl/apache.key
Once your certificate is created, restart apache2 and HTTPS/SSL should be working on your ownCloud and you should no longer see the warning in the admin dashboard.
1
sudo service apache2 restart
While we are at it, let’s enforce HTTPS by enabling the following options
What these options do is if you go to the HTTP version (plaintext) of your ownCloud, it will automatically redirect you to the HTTPS version.
Recommended ownCloud Apps
Server-side Encryption
To enable this, login as a admin user and go to the Apps section. From there, go to the Not Enabled section.
At this point your ownCloud installation should be fully functional via the web interface or client. What I did on my machines is instead of installing the ownCloud client, I opted to map the drive. To do this in Windows, bring up command prompt as administrator and enter in the following command:
1
net useo:https://owncloud.uglyvpn.com/remote.php/webdav
I did something similar on my Macbook Air as well by connecting to the server and mounting the weddav folder associated with my account.
Additional Steps
Port forwarding – If your ownCloud instance is sitting behind a firewall and you need to access it externally, you will need to create a policy on your firewall/router to allow traffic to/from your ownCloud server using TCP 443.
DNS records – I currently use Namecheap as my domain name provider and made a new A record to point owncloud.uglyvpn.com to my external IP address. This process took close to 10hrs to complete but can take up to 48hrs for all DNS changes to propagate around the world.
I wrote up this tool because I was tired of bringing up CMD prompt and doing an ipconfig /all.The program will loop through all of your active network interfaces and provide you an up to date snapshot of your current settings.
It didn’t take me long to reach my original goal so I decided to add more features to it such as troubleshooting scenarios that involve interface gateway and DNS resolution.
Automatically convert DHCP assigned address to Static
The software also lets you convert a DHCP assigned IP address to static without you having to remember all the settings!
For those interested, this tool queries WMI to gather all of this information. I will soon start posting more code examples and even complete source code.