How To Install Craft CMS on Rocky Linux 8
How To Install Craft CMS on Rocky Linux 8
in This Tutorial you will Learn " How To Install Craft CMS on Rocky Linux 8"
Craft CMS is an open source CMS written in PHP. Craft CMS source code is hosted on GitHub.
_________________________________________________________________________________________
Server - Os: Rocky Linux 8.5 64Bit | IP -192.168.1.20 | Hostname - www.primaryhost.com
_________________________________________________________________________________________
cat /etc/system-release ; sestatus ; hostname ; hostname -I ; dnf groupinstall "Development Tools" -y
dnf install nginx mariadb-server php php-cli php-fpm php-common php-curl php-gd php-json php-mbstring php-mysqli php-pgsql php-zip php-intl php-xml php-pdo -y
nano /etc/php.ini
memory_limit = 256M
nano /etc/php-fpm.d/www.conf
user = nginx
group = nginx
systemctl start nginx mariadb php-fpm ; systemctl enable nginx mariadb php-fpm
mysql
create database craftdb;
grant all on craftdb.* to craftuser@localhost identified by 'securepassword';
flush privileges;
quit;
mysql_secure_installation
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
HASH="$(wget -q -O - https://composer.github.io/installer.sig)"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php --install-dir=/usr/local/bin --filename=composer
cd /var/www/html/ ; composer create-project craftcms/craft craft
chown -R nginx:nginx /var/www/html/craft ; chown -R nginx:nginx /var/lib/php/session
nano /etc/nginx/conf.d/craft.conf
server {
listen 80;
server_name craft.example.com;
root /var/www/html/craft/web;
index index.php;
location / {
try_files $uri/index.html $uri $uri/ /index.php?$query_string;
}
location ~ [^/]\.php(/|$) {
try_files $uri $uri/ /index.php?$query_string;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php-fpm/www.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTP_PROXY "";
}
}
nano /etc/nginx/nginx.conf
server_names_hash_bucket_size 64;
systemctl restart nginx
echo "192.168.1.20 craft.example.com" >> /etc/hosts
firewall-cmd --permanent --add-service={http,https} ; firewall-cmd --reload
craft.example.com
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Related Posts:
- How To Setup LVS (Linux Virtual Server) Load Balancer on Rocky Linux 8.5
- How To Install Magento 2.4 on Rocky Linux 8
- How To Install Docker on Oracle Linux Server 9
- How to Install WHM/cPanel in Almalinux?
- Configure NTP Server in Oracle Linux 9
- How To Install Ruby on Rails with PostgreSQL on Rocky Linux 8
- How To Install EMQX MQTT Broker on Rocky Linux 8
- How To Install Kamailio SIP Server on Rocky Linux 8
- How to Install and Configure RabbitMQ Server on Rocky Linux 8
- Setup Quick DNS Server On Rocky Linux 8.5 Using Dnsmasq
Latest Posts
- Server-Side Scripting: PHP, Node.js, Python – A Detailed Comparison
- Securing Your Website in 2024: Essential Strategies for Online Safety
- The Future of Web Development Technologies: Trends to Watch in 2024
- How Banks Handle Server-Side Operations and Ensure System Security: An Inside Look
- Tips for Writing Clean, Understandable, and Efficient Code: Avoiding Garbage Code
- Tailwind CSS: Revolutionizing Modern Web Design
- Basic Linux Commands for Beginners: A Starter Guide
- Dairy Farming Loan Apply
- BSNL Recharge Plan
- Bijli Bill Mafi Yojana Online Apply
Technical
- DevOps Roadmap
- How To Install and Configure an SNMP on Ubuntu 20.04
- Apple releases iOS 18 Developer Beta 2 with iPhone screen mirroring, RCS toggle,and more
- How to enable SNMP on Ubuntu Linux 18.04 and above
- How to Force HTTPS Using .htaccess (Updated 2024)
- Display All PHP Errors: Basic & Advanced Usage
- PHP alert
- MongoDB loads but breaks, returning status=14
- MongoDB database deleted automatically
- MongoDB all Error Solutions
Category