Experiment No. 5 Step 1: Install Apache2
Experiment No. 5 Step 1: Install Apache2
After installing Apache2, run the commands below to disable directory listing.
sudo sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/"
/etc/apache2/apache2.conf
Next, run the commands below to stop, start and enable Apache2 service to always start up with
the server boots.
After installing, the commands below can be used to stop, start and enable MariaDB service to
always start up when the server boots.
• Enter current password for root (enter for none): Just press the Enter
• Set root password? [Y/n]: Y
• New password: Enter password
• Re-enter new password: Repeat password
• Remove anonymous users? [Y/n]: Y
• Disallow root login remotely? [Y/n]: Y
• Remove test database and access to it? [Y/n]: Y
• Reload privilege tables now? [Y/n]: Y
Restart MariaDB server
sudo systemctl restart mysql.service
Step 3: Install PHP and Related Modules
PHP 7.1 isn’t available on Ubuntu default repositories… in order to install it, you will have to
get it from third-party repositories.
Run the commands below to add the below third party repository to upgrade to PHP 7.1
Then make the change the following lines below in the file and save.
file_uploads = On
allow_url_fopen = On
memory_limit = 256M
upload_max_filesize = 64M
max_execution_time = 360
date.timezone = America/Chicago
Run the commands below to logon to the database server. When prompted for a password, type
the root password you created above.
sudo mysql -u root -p
FLUSH PRIVILEGES;
EXIT;
Step 5: Download OwnCloud Latest Release
Next, visit OwnCloud site to download your free copy. The community edition is what you’ll
want to download.
After downloading, run the commands below to extract the download file into Apache2 root
directory.
unzip owncloud-10.0.3.zip
Then run the commands below to set the correct permissions for OwnCloud to function.
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/owncloud/
ServerName example.com
ServerAlias www.example.com
<Directory /var/www/html/owncloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
</VirtualHost>
https://acme-v01.api.letsencrypt.org/directory
-------------------------------------------------------------------------------
(A)gree/(C)ancel: A
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about EFF and
our work to encrypt the web, protect its users and defend digital rights.
-------------------------------------------------------------------------------
(Y)es/(N)o: Y
This is how easy is it to obtain your free SSL/TLS certificate for your Nginx powered website.
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP a
ccess.
-------------------------------------------------------------------------------
new sites, or if you're confident your site works on HTTPS. You can undo this
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Then open your browser and browse to the server domain name followed by install. You
should see OwnCloud setup wizard to complete. Please follow the wizard carefully.
https://example.com
You should then see OwnCloud setup page. Connect to the database using the information you
created and continue. Select the database server installed on your systems by clicking it as
shown in the image below
Click Finish setup and you’re done.