How to install CakePHP on CentOS 8?

Windows Articles

How to install Screaming Frog SEO Spider on Ubuntu 20.04 / 18.04?

If you are working with blogs and content creation then you should know about SEO. Or in the best case, you have...

How to Configure a Firewall in Ubuntu 20.04 / Debian 10?

There is nothing safe from hackers on the Internet, however, we can implement security measures to be more protected against an attack. With this...

Gnome 3.38 available

Gnome OS is a Linux-based operating system, which has a huge domain in the Linux forums. On September 16, 2020, developers announced...

NVIDIA acquires ARM for $40 billion

Various rumors of an agreement between NVIDIA and SoftBank to acquire Arm. Where NVIDIA announces that they reached an agreement to buy...

How to install CodoForum on Ubuntu 20.04 / Debian 10?

Hi, folks. In this post, I will show you how to install CodoForum in Ubuntu 20.04 /Debian 10. This program is quite useful to...
angeloma
angeloma
Senior Writer and partner

Installing and using a PHP framework is a great idea to develop quality web applications. This is because the frameworks have configurations and conventions prepared for development. In this post, I will show you how to install CakePHP in CentOS 8. With this framework you will be able to quickly create web applications following the best possible conventions.

In Osradar we like CakePHP very much and is that this PHP framework for the creation of solid web applications, is a wonder. Thanks to CakePHP it is possible to create applications quickly, robust and above all easy to maintain. Not in vain is one of the best known frameworks that PHP has.

So, let us start to install CakePHP on CentOS 8.

Install CakePHP on CentOS 8

1) Install LAMP on CentOS 8

While it is true that to start developing using CakePHP you only need to install PHP and a database management system, it is recommended to install the entire LAMP stack at once.

Read, How to install LAMP on CentOS 8?

In the case of PHP, you can use PHP 7.3 but you have to activate the following modules:

  • mbstring PHP extension
  • intl PHP extension
  • simplexml PHP extension
  • PDO PHP extension

You can also use Apache or Nginx as a web server. As you can see, the framework is very flexible.

2) Install Composer on CentOS 8

CakePHP has many dependencies that make manual installation a bit complicated. However, to handle PHP dependencies nothing better than Composer. Using it the CakePHP installation becomes a lot less complicated. So you have to install it. Just, be sure that you have installed the json PHP extension.

Read, How to install Composer on Linux?

In that post, we detail the installation process. So you will not have any problems in completing the process. Once you are done, you can continue.

3) Install CakePHP on CentOS 8

Now it is time to install CakePHP on CentOS 8. For that, just use composer to “download” all CakePHP components. On a terminal, run the following, as a regular user not as root:

:~$ composer create-project --prefer-dist cakephp/app example
1.- Install CakePHP on CentOS 8
1.- Install CakePHP on CentOS 8

So, remember to replace “example” with the correct name of your project. This is just an example.

Then, you have to make the cake file executable to get tools from the framework. To do this, execute the following commands:

:~$ cd example
:~$ chmod +x bin/cake

Now all you have to do is start developing your application. If you want to “serve it” and check that everything is perfectly in order, run the following command from the project folder:

:~$ bin/cake server

This will make your application available from localhost and will be accessible from the web browser. But if you add the option -H and -P you can specify the host and port where the application will be served.

:~$ bin/cake server -H [host] -p [port]

Now, open your web browser and go to your CakePHP app and you will see the following:

2.- CakePHP on CentOS 8
2.- CakePHP on CentOS 8

And that is it.

Conclusion

CakePHP combines the ease of a clear and conscious framework with the robustness of a solid code that allows you to have secure applications with clear conventions. In this post, you have learned to install it in CentOS in an easy and fast way.

You can also learn how to install it in Debian 10.

Please share this post with your friends and join our Telegram channel.

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to install Screaming Frog SEO Spider on Ubuntu 20.04 / 18.04?

If you are working with blogs and content creation then you should know about SEO. Or in the best case, you have...

How to Configure a Firewall in Ubuntu 20.04 / Debian 10?

There is nothing safe from hackers on the Internet, however, we can implement security measures to be more protected against an attack. With this...

Gnome 3.38 available

Gnome OS is a Linux-based operating system, which has a huge domain in the Linux forums. On September 16, 2020, developers announced...

NVIDIA acquires ARM for $40 billion

Various rumors of an agreement between NVIDIA and SoftBank to acquire Arm. Where NVIDIA announces that they reached an agreement to buy...

How to install CodoForum on Ubuntu 20.04 / Debian 10?

Hi, folks. In this post, I will show you how to install CodoForum in Ubuntu 20.04 /Debian 10. This program is quite useful to...
x