Open a terminal window to your Centos server, and change the current directory to the web server root folder:
|
|
Install composer. Follow the instructions indicated on the url https://getcomposer.org/download/ OR You could also get and install composer with curl:.
|
|
Move the composer file to the /usr/local/bin folder.
|
|
Create a Laravel project. We will name our project "site"
|
|
Remove the html folder. We are going to replace it.
|
|
Replace the html folder with a link to Laravel's public folder.
|
|
Change the current directory to your project folder:
|
|
Make the storage folder and its subfolders writable.
|
|
Make the bootstrap/cache folder writable.
|
|
Set your timezone and locale values on the config/app.php file.
|
Enter your database credentials on the .env file.
|
|
Run the migration process, to create the users table.
|
|
Download Laravel/UI package.
|
|
Generate frontend scaffolding Install the login / registration scaffolding:
OR Alternatively, you could install a basic scaffolding:
|
|
Install NVM.
At the time of this writing the latest version of NVM is v0.35.1. |
|
Close and re-open terminal, to make the "nvm" command available, or run the following:
|
|
If you closed and re-opened terminal, change the current directory to your project folder again:
|
|
Install Node.
|
|
Compile the scaffolding.
|
Edit the routes/web.php file Replace the line:
With the following:
|
|
Additionally you can also remove the RegisterController.php file. (optional) |
Note for Docker users: If the installation is going to be done on a Docker Container where a local folder of the host machine will be used as the web server root folder, the local folder should be mapped to "/var/www", instead of "/var/www/html" Example: docker run -tid -p 4000:80 --name=container_apache -v /path_to/my_local_folder:/var/www image_apache Additionally, on your local folder you should create the "html" folder before building/running the container: mkdir /path_to/my_local_folder/html The reason behind this is that the "html" folder will be removed, and it will recreated as a symbolic link from inside the container, and that cannot be done if the "html" folder is being used by Docker. If the folder is mapped when trying to remove it, you will get the following error message: rmdir: failed to remove 'html': Device or resource busy. |