Exported on 28-Sep-2021 12:05:22
Parameters
1 - Install PHP7.4
Install PHP and required plugins
Login as user {Linux User} on node {Linux Node}
# Install PHP remi repository
sudo yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
# Enable remi repository
sudo yum-config-manager --enable remi-php74
# Install requiered php plugins
sudo yum -y install php php-mysqlnd php-mbstring php-dom php-zip
2 - Install Composer - PHP Package Manager
Install composer PHP dependency manager
Login as user {Linux User} on node {Linux Node}
# Download composer installer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
# Setup composer
php composer-setup.php
# Add to path
sudo mv composer.phar /usr/local/bin/composer
3 - Install MariaDB Database Server
Installs MariaDB package for MySQL database server
Login as user {Linux User} on node {Linux Node}
# Install mysql/mariadb server
sudo yum -y install mariadb-server
# Start mysql
sudo service mariadb start
# Configure password and auth plugin
sudo mysql -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('rootpass');flush privileges;"
# Restart mysql
sudo service mariadb restart
4 - Install Laravel
Installs and configures Laravel project
Login as user {Linux User} on node {Linux Node}
# Install git and zip
sudo yum -y install git zip
# Download composer
git clone https://github.com/laravel/laravel.git
# Install dependencies
cd laravel && composer i
#Create .env file
cp .env.example .env
#Set MySQL password
sed -i 's/DB_PASSWORD=/DB_PASSWORD=rootpass/g' .env
# Generate Laravel application key
php artisan key:generate
5 - Start Laravel Development Server
Installs screen package and launched Laravel dev server in backgroud
Login as user {Linux User} on node {Linux Node}
# Install screen
sudo yum -y install screen
# Configure screen
sudo echo "zombie xy" >> ~/.screenrc
# Change working directory
cd ~/laravel
# Start Laravel artisan server in backaground
screen -d -m php artisan serve --host 0.0.0.0
Install LEMP (Linux, Nginx, MySQL and PHP) On CentOS Server With AttuneOps
This Blueprint Install LEMP Stack Components On A CentOS Server
Laravel is a free, open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the model–view–controller architectural pattern and based on Symfony.
Laravel makes it easy to develop production ready websites and backend APIs with its power packed development utilities. Using Laravel saves a lot of time and cost as it brings along the basic requirements of any backend service such as Authentication, Notifications, Models, Views, Controllers, Middle-wares, etc.
Pre-Blueprint Attune setup
Steps Involved