Ocs-server/Install/Configuring a webserver as host: Difference between revisions

From KDE Community Wiki
 
(12 intermediate revisions by the same user not shown)
Line 3: Line 3:


== Install distribution packages ==
== Install distribution packages ==
===Ubuntu:===
===Ubuntu===
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
sudo apt-get install libapache2-mod-php5 mysql-server php5-mysql phpmyadmin
sudo apt-get install libapache2-mod-php5 mysql-server php5-mysql phpmyadmin php5-gd php5-curl
</syntaxhighlight>
</syntaxhighlight>


== Enable URL rewriting ==
== Enable URL rewriting ==
Ubuntu:
===Ubuntu===
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
sudo a2enmod rewrite
sudo a2enmod rewrite
Line 26: Line 26:
AllowOverride All  
AllowOverride All  
</syntaxhighlight>
</syntaxhighlight>
And restart your web server:
And restart your web server:
<syntaxhighlight lang="php">
sudo service apache2 restart
</syntaxhighlight>
== Get latest source ==
Grab a copy of ocs-server by cloning our public repository into the DocumentRoot of your server. Keep in mind the OCS protocol is made to work on the document root of this type: http://www.example.com or this: http://localhost. If you have other websites on the same server, we suggest you to put it in a subdomain like http://ocs.example.com.
Navigate to your DocumentRoot:
<syntaxhighlight lang="cpp">
cd /var/www/html
</syntaxhighlight>
Clone ocs-server git repository:
<syntaxhighlight lang="cpp">
sudo git clone git://anongit.kde.org/ocs-server.git
</syntaxhighlight>
Copy everything to your server root:
<syntaxhighlight lang="cpp">
sudo cp -r ocs-server/. .
</syntaxhighlight>
Remove your duplicate ocs-server folder:
<syntaxhighlight lang="cpp">
sudo rm -rf /var/www/html/ocs-server
</syntaxhighlight>
And restart again your web server, just to be sure:
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
sudo service apache2 restart
sudo service apache2 restart
Line 32: Line 61:


== Final result ==
== Final result ==
Now you can check your server is now working at [http://localhost/ | http://localhost/]. You are ready to follow the next tutorial.
Ocs-server should be installed and working. Check the homepage, usually [http://localhost/ http://localhost/] or your domain of choice. In the homepage there are several useful links for both end-users and developers. You are ready to follow the [[Ocs-server/Install/First run wizard| First run wizard]] tutorial.

Latest revision as of 14:51, 1 October 2015

Target system

This guide is inteded to use with Ubuntu and may use Ubuntu only commands. It can be adapted to other distros however. If you want to help adding support for other distributions please feel free to edit this page.

Install distribution packages

Ubuntu

sudo apt-get install libapache2-mod-php5 mysql-server php5-mysql phpmyadmin php5-gd php5-curl

Enable URL rewriting

Ubuntu

sudo a2enmod rewrite

Now open your server configuration file with your preferred text editor:

sudo nano /etc/apache2/apache2.conf

Now change those line of code when Directory is / or /var/www:

AllowOverride None

with:

AllowOverride All

And restart your web server:

sudo service apache2 restart

Get latest source

Grab a copy of ocs-server by cloning our public repository into the DocumentRoot of your server. Keep in mind the OCS protocol is made to work on the document root of this type: http://www.example.com or this: http://localhost. If you have other websites on the same server, we suggest you to put it in a subdomain like http://ocs.example.com.

Navigate to your DocumentRoot:

cd /var/www/html

Clone ocs-server git repository:

sudo git clone git://anongit.kde.org/ocs-server.git

Copy everything to your server root:

sudo cp -r ocs-server/. .

Remove your duplicate ocs-server folder:

sudo rm -rf /var/www/html/ocs-server

And restart again your web server, just to be sure:

sudo service apache2 restart

Final result

Ocs-server should be installed and working. Check the homepage, usually http://localhost/ or your domain of choice. In the homepage there are several useful links for both end-users and developers. You are ready to follow the First run wizard tutorial.