How To Install Gprof On Ubuntu Forums

On this page

Vanilla is free, open source discussion forum written in PHP. Vanilla Forum software is distributed under the GNU GPL2 license. Its source code is available through Github. It has a rich add-on system that you can take advantage of to add custom features to your Vanilla forum. Content for Vanilla Forum can be written using the Markdown language. In this tutorial, we will go through the Vanilla Forum installation and setup on Ubuntu 18.04 LTS system by using Nginx as a web server, MySQL as a database server, and optionally you can secure transport layer by using acme.sh client and Let's Encrypt certificate authority to add SSL support.

Requirements

Vanilla requires a server with PHP, MySQL, and web server software (like Apache or Nginx). You'll probably need to own a domain, and already have it configured on your server with DNS if you want to install on a production server, but if not then you don't need a domain.

Vanilla Forum minimumrequirements are:

  • PHP version 7.0 or newer.
  • PHP extensions mbstring, cURL, GD, and PDO, MySQLi, OpenSSL.
  • MySQL version 5.0 or newer (or Percona/MariaDB equivalent).
  • Web Server software (Nginx, Apache ..).
  • MySQL strict mode disabled.
  • How to Profile a C program in Linux using GNU gprof. By Himanshu Arora – Posted on Aug 15. Download and Install. Gprof comes pre-installed with most of the Linux distributions. How to Fix Broken Packages in Ubuntu. How to Use Netcat to Quickly Transfer Files Between Linux Computers.
  • In this tutorial, I will show you how to install Vanilla Forum on Ubuntu 18.04 LTS using Nginx as a web server, MySQL as a database server, and option. In this tutorial, I will show you how to install Vanilla Forum on Ubuntu 18.04 LTS using Nginx as a web server, MySQL as a database server, and option.

Vanilla Forum strongly recommends:

A help and support forum for Ubuntu Linux. Execute the program code to produce the profiling data; Run the gprof tool on the profiling data file (generated in the step above). The last step above produces an analysis file which is in human readable form. This file contains a couple of tables (flat profile and call graph) in addition to some other information.

  • PHP version 7.2 or newer.
  • PHP extensions mbstring, cURL, GD, and PDO, MySQLi, OpenSSL.
  • MySQL version 5.7 or newer (or Percona/MariaDB equivalent).
  • Web server software (Nginx, Apache ..).
  • SSL encryption.

NOTE: PHP 7.0 has reached end of life and will no longer receive security patches, so it's highly recommended to use newer PHP versions. Vanilla's support for PHP 7.0 will end soon! Ubuntu 18.04 LTS ships with PHP 7.2 by default, and thus we don't need to worry about PHP version.

Prerequisites

  • An operating system running Ubuntu 18.04 LTS.
  • A non-root user with sudo privileges.

Initial steps

Check your Ubuntu version:

Set up the timezone:

Update your operating system packages (software). This is an important first step because it ensures you have the latest updates and security fixes for your operating system's default software packages:

Install some essential packages that are necessary for basic administration of Ubuntu operating system:

Step 1 - Install PHP and necessary PHP extensions

Install PHP, as well as the necessary PHP extensions:

To show PHP compiled in modules, you can run:

How

Check PHP version:

PHP-FPM service is automatically started and enabled on reboot on Ubuntu 18.04 system, so there is no need to start and enable it manually. We can move on to the next step, which is database installation and setup.

Step 2 - Install MySQL and create a database for Vanilla Forum

Vanilla Forum supports MySQL, MariaDB and Percona databases. In this tutorial, we will use MySQL as database server.

Install MySQL database server:

Check MySQL version:

Run mysql_secure installationscript to improve MySQL security and set the password for MySQLroot user:

Answer each of the questions:

Connect to MySQL shell as the root user:

How To Install Gprof On Ubuntu Forums Windows 7

Create an empty MySQL database and user for Vanilla Forum and remember the credentials:

Exit from MySQL:

Replacedbname,usernameandpasswordwith your own names.

Step 3 - Installacme.shclient and obtain Let's Encrypt certificate (optional)

Securing your website with HTTPS is not necessary, but it is a good practice to secure your site traffic. In order to obtain TLS certificate from Let's Encrypt we will use acme.sh client. Acme.sh is a pure unix shell software for obtaining TLS certificates from Let's Encrypt with zero dependencies.

How To Install Gprof On Ubuntu Forums

Download and install acme.sh:

Check acme.sh version:

ObtainRSAandECC/ECDSAcertificates for your domain/hostname:

If you want fake certificates for testing you can add --staging flage to the above commands.

After running the above commands, your certificates and keys will be in:

  • ForRSA:/home/username/example.comdirectory.
  • ForECC/ECDSA:/home/username/example.com_eccdirectory.

To list your issued certs you can run:

Create a directories to store your certs. We will use /etc/letsencrypt directory.

Install/copy certificates to/etc/letsencryptdirectory.

All the certificates will be automatically renewed every 60 days.

After obtaining certs exit form root user and return back to normal sudo user:

Step 4 - Install NGINX and configure NGINX for Vanilla Forum

Vanilla Forum can work fine with many popular web server software. In this tutorial, we selected Nginx. If you prefer Apache web server over Nginx, please visit https://docs.vanillaforums.com/developer/backend/server-apache/ to learn more.

Download and install Nginx from the Ubuntu repository:

Check the Nginx version:

Configure Nginx for Vanilla by running:

And populate the file with the following configuration:

NOTE:For complete and production ready Nginx config for Vanilla visit https://docs.vanillaforums.com/developer/backend/server-nginx/.

Activate the newvanilla.confconfiguration by linking the file to thesites-enableddirectory.

Check Nginx configuration for syntax errors:

Reload Nginx service:

How To Install Gprof

Step 5 - Install Vanilla Forum

Create a document root directory where Vanilla Forum should reside in:

Mods

Change ownership of the/var/www/vanilladirectory to {jour_user}:

NOTE: Replace {jour_user} with your initially created non-root user username.

Navigate to the document root directory:

Download the Vanilla Forum zip archive:

Extract and remove Vanilla zip archive:

Provide the appropriate ownership:

Navigate to the folder where you uploaded Vanilla in your web browser and follow the instructions on the screen.

Step 6 - Complete the Vanilla Forum Installation and Setup

After opening your site in a web browser, you should be redirected to the following page:

Fill in the required information and click on the 'Continue ' button to finish up the installation and setup. After that Vanilla Forum admin interface should appear.

Links