![]() ![]() Lets install MySQL as follows:- cd /usr/ports/databases/mysql55-server MySQL is a very popular database engine and is utilised by FuelPHP, some people may prefer Postgres over MySQL and FuelPHP does support that too but in this tutorial I’m using MySQL so I’ll now demonstrate how this is installed. Its a good idea while we’re installing the server to turn on the error reporting, this will make troubleshooting much easier while we’re installing, we can turn this off once we’ve finished installing and configuring our server etc. cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini Now we need to copy one of the example PHP.ini file examples so we can make any custom changes that we may need etc. for curl, you can just accept the defaults if you wish. Now that should take a few minutes and you may get additional configuration screens appear eg. So I’ll run the following commands now and ensure that I select the required modules at the configuration screen before then running a make install clean to have then installed and ready for FuelPHP to use. So I’ll also choose the following at the configuration screen:. I also generally like to install a few other extensions as they can be most useful for other applications that I may want to install on the server at a later date. pdo_mysql (again, pdo_pgsql if you prefer to use Postgres).mysql (or pgsql if you prefer to use Postgres instead of MySQL!).You can now install some PHP extensions which you may find come in handy, as I’m using FuelPHP, the recommended PHP extensions are as follows:. Make sure you select FPM at the configuration screen, you can also de-select SUHOSIN if you wish, I only really feel this is worth having if your using PHP in a shared hosting environment this server however will be running a single web application with no other system users so I do not see the benefit of having this installed too. Now we’ll install the latest version of PHP 5.3, so now we run the following commands:- cd /usr/ports/lang/php53 We’ll move on now but we’ll be back soon to make some config changes to nginx but for now we’ll go and install some other packages. ![]() If you browse to your web server using a web browser you should now see the default nginx homepage. Once that has been installed we need to add it to the rc.conf and start the service like so: echo 'nginx_enable="YES"' > /etc/rc.conf Now you’ll see a blue ‘configuration’ screen appear, you can choose to leave the defaults if you wish or select additonal modules, I will be using an SSL certificate so I also checked HTTPS (SSL) support. Ok, so the basic install is rather easy, lets quickly run the following commands:- cd /usr/ports/www/nginx There we go, we now have Nano installed, if you prefer using the default editor (Vi) then thats fine and you can skip the above step! Installing nginx Ok so first up, I’m quickly going to install Nano, its my preferred editor of choice so I quickly run the following commands:- cd /usr/ports/editors/nano Or if you don’t currently have them installed, run the following command:- portsnap fetch extract update Install Nano The very first thing to do, is quickly update the server’s port tree you can do this like so: portsnap fetch update The aim of this post is to document the installation of Nginx, MySQL, PHP, APC and Memcache specifically to work as a web application server for hosting a FuelPHP application.įirst of all I will assume that you have already installed the base OS, configured an IP address and logged into your server using the ‘root’ account, if you don’t want to use your ‘root’ account for this installation, make sure you add ‘sudo’ to the start of all the nessacery commands to gain the appropriate permissions to carry out the installations etc.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |