Install the Apache Web Server, PHP, MariaDB (FAMP) on FreeBSD

0
437

Building the Apache Web Server, PHP, MariaDB (FAMP) on FreeBSD – In this tutorial I will explain how to install Apache, MySQL, PHP or commonly called FAMP in FreeBSD, I assume you already update the portcollection at FreeBSD. Before you install the FAMP in FreeBSD you must configure a DNS Server to translate ip, how to install the DNS Server can be seen in the tutorial how to Install and configure the DNS Server on FreeBSD.

freebsd

First install the first package in need:

pkg install apache24 mod_php56 php56-xmlrpc php56-sockets php56-openssl php56-pdo php56-mysqli php56-curl php56-bz2 php56-zlib php56-sockets php56-ftp php56-gd php56-ftp php56-gd php56-imap php56-iconv php56-hash php56-gmp php56-exif php56-fileinfo

  1. After that turn on service apache24 in/etc/rc.conf.
  2. Then enable hostname in/etc/hosts.
  3. After that start the apache service start apache24 command.
  4. Then copy php.ini-production to/usr/local/etc/URphp.ini from/usr/local/etc.
  5. After that install the mariadb server with the command pkg install mariadb55-server mariadb55-client, because previously I’ve never installed a mariadb via port so like this, if it hadn’t just ignore this ss just hit yes.
  6. Then copy URmy-small.cnf to/usr/local/etc/my.cnf from/usr/local/share/mysql/my-small.cnf.
  7. After that activate service mariadb at/etc/rc.conf.
  8. Then start mariadb server.
  9. Next, edit the httpd.conf file that is in the/usr/local/etc/apache24/httpd.conf add the parameter URindex.php after URindex.html and AddType application/x-httpd-php .php AddType application/, x-httpd-php-source. phps and also the servername.
  10. Don’t forget in the save, after that we restart the apache service.
  11. And create a php info at/usr/local/www/apache24/data/info.php to find out if the apache and php connection in sync and run well.
  12. Completed

NO COMMENTS

LEAVE A REPLY