PyroCMS<\/strong><\/a>\u00a0is an open source CMS written in PHP. PyroCMS source code is hosted on\u00a0GitHub<\/strong><\/a>. In this guide we’ll walk through the entire PyroCMS installation process on a CentOS 7 AKLWEB HOST<\/a><\/strong> instance.<\/p>\n\n\n\n Before you can install PyroCMS on a server, there are a few requirements that need to be met.<\/p>\n\n\n\n Check the CentOS version.<\/p>\n\n\n\n Create a new NOTE<\/strong>: Replace Set up the timezone.<\/p>\n\n\n\n Ensure that your system is up to date.<\/p>\n\n\n\n Install required and useful packages.<\/p>\n\n\n\n Disable SELinux.<\/p>\n\n\n\n CentOS does not provide the latest PHP version in its default software repositories. We’ll need to add a Webtatic YUM repo.<\/p>\n\n\n\n Download and install PHP 7.2 and required PHP extensions.<\/p>\n\n\n\n Check PHP version.<\/p>\n\n\n\n Download and install MariaDB.<\/p>\n\n\n\n [mariadb]<\/p>\n\n\n\n name = MariaDB baseurl = https:\/\/yum.mariadb.org\/10.2\/centos7-amd64 gpgkey=https:\/\/yum.mariadb.org\/RPM-GPG-KEY-MariaDB gpgcheck=1 sudo yum install -y MariaDB-server MariaDB-client<\/p>\n\n\n\n Check the MariaDB version.<\/p>\n\n\n\n Start and enable MariaDB.<\/p>\n\n\n\n Run the Log into MariaDB as the root user.<\/p>\n\n\n\n Create a new MariaDB database and user, and remember the credentials.<\/p>\n\n\n\n Exit MySQL.<\/p>\n\n\n\n Install NGINX.<\/p>\n\n\n\n [nginx]<\/p>\n\n\n\n name=nginx repo baseurl=https:\/\/nginx.org\/packages\/mainline\/centos\/7\/$basearch\/ gpgcheck=1 enabled=1 wget https:\/\/nginx.org\/keys\/nginx_signing.key sudo rpm –import nginx_signing.key rm nginx_signing.key sudo yum install -y nginx<\/p>\n\n\n\n Check the NGINX version.<\/p>\n\n\n\n Start and enable NGINX.<\/p>\n\n\n\n Configure NGINX as a FastCGI proxy. Run NOTE<\/strong>: Make sure to point the web root to Pyro’s Test the NGINX configuration.<\/p>\n\n\n\n Reload NGINX.<\/p>\n\n\n\n Download the Composer dependencies.<\/p>\n\n\n\n Download and install Composer, the dependency manager for PHP.<\/p>\n\n\n\n Check the Composer version.<\/p>\n\n\n\n Create a document root directory.<\/p>\n\n\n\n Change the ownership of the Download the latest stable release of PyroCMS from the command line.<\/p>\n\n\n\n NOTE<\/strong>: You may run out of memory when installing Pyro via Composer. It may be wise to stop Nginx, PHP-FPM and MySQL servers with Change the ownership of the Run Restart the Using your preferred web browser, open your site and follow the PyroCMS installer. After following the installer you will have PyroCMS up and running. To access the PyroCMS admin area, append Requirements<\/h2>\n\n\n\n
\n
cat \/etc\/centos-release\n# CentOS Linux release 7.4.1708 (Core)<\/code><\/pre>\n\n\n\n
non-root<\/code> user account with
sudo<\/code> access and switch to it.<\/p>\n\n\n\n
useradd -c \"John Doe\" johndoe && passwd johndoe\nusermod -aG wheel johndoe\nsu - johndoe<\/code><\/pre>\n\n\n\n
johndoe<\/code> with your username<\/em>.<\/p>\n\n\n\n
timedatectl list-timezones\nsudo timedatectl set-timezone 'Region\/City'<\/code><\/pre>\n\n\n\n
sudo yum update -y<\/code><\/pre>\n\n\n\n
sudo yum install -y wget vim unzip bash-completion<\/code><\/pre>\n\n\n\n
sudo setenforce 0<\/code><\/pre>\n\n\n\n
Install PHP and required extensions<\/h2>\n\n\n\n
sudo yum install -y php72w php72w-cli php72w-fpm php72w-mysql php72w-curl php72w-sqlite3 php72w-mbstring php72w-gd php72w-dom<\/code><\/pre>\n\n\n\n
php --version\nPHP 7.2.2 (cli) (built: Feb 4 2018 10:14:07) ( NTS )\nCopyright (c) 1997-2018 The PHP Group\nZend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies<\/code><\/pre>\n\n\n\n
Install MySQL\/MariaDB and create a database<\/h2>\n\n\n\n
sudo vim \/etc\/yum.repos.d\/MariaDB.repo\n\n# Copy\/paste this to the \/etc\/yum.repos.d\/MariaDB.repo file\n\n<\/code><\/pre>\n\n\n
mysql --version\n# mysql Ver 15.1 Distrib 10.2.13-MariaDB, for Linux (x86_64) using readline 5.1<\/code><\/pre>\n\n\n\n
sudo systemctl enable mariadb.service\nsudo systemctl start mariadb.service<\/code><\/pre>\n\n\n\n
mysql_secure_installation<\/code> script to improve the security of your MariaDB installation.<\/p>\n\n\n\n
sudo mysql_secure_installation<\/code><\/pre>\n\n\n\n
mysql -u root -p\n# Enter password:<\/code><\/pre>\n\n\n\n
create database dbname;\ngrant all on dbname.* to 'username' identified by 'password';<\/code><\/pre>\n\n\n\n
exit<\/code><\/pre>\n\n\n\n
Install and configure NGINX<\/h2>\n\n\n\n
sudo vim \/etc\/yum.repos.d\/nginx_mainline.repo\n\n# Copy\/paste this to the \/etc\/yum.repos.d\/nginx_mainline.repo file\n\n<\/code><\/pre>\n\n\n
nginx -v<\/code><\/pre>\n\n\n\n
sudo systemctl enable nginx.service\nsudo systemctl start nginx.service<\/code><\/pre>\n\n\n\n
sudo vim \/etc\/nginx\/conf.d\/pyro.conf<\/code> and populate it with the following text.<\/p>\n\n\n\n
server {\n listen 80;\n\n server_name example.com; # Check this\n root \/var\/www\/pyro\/public; # Check this\n \n index index.php index.html;\n charset utf-8;\n \n location \/ {\n try_files $uri $uri\/ \/index.php?$args;\n }\n\n location ~ \\.php$ {\n fastcgi_pass 127.0.0.1:9000; # Check this\n fastcgi_index index.php;\n fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n include fastcgi_params;\n }\n}<\/code><\/pre>\n\n\n\n
public<\/code> directory<\/em>.<\/p>\n\n\n\n
sudo nginx -t<\/code><\/pre>\n\n\n\n
sudo systemctl reload nginx.service<\/code><\/pre>\n\n\n\n
Download and install Composer<\/h2>\n\n\n\n
sudo yum install -y curl git unzip<\/code><\/pre>\n\n\n\n
php -r \"copy('https:\/\/getcomposer.org\/installer', 'composer-setup.php');\"\nphp -r \"if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;\"\nphp composer-setup.php\nphp -r \"unlink('composer-setup.php');\"\nsudo mv composer.phar \/usr\/local\/bin\/composer<\/code><\/pre>\n\n\n\n
composer --version\n# Composer version 1.6.3 2018-01-31 16:28:17<\/code><\/pre>\n\n\n\n
Download and install PyroCMS via Composer<\/h2>\n\n\n\n
sudo mkdir -p \/var\/www\/pyro<\/code><\/pre>\n\n\n\n
\/var\/www\/pyro <\/code> directory to
johndoe<\/code>.<\/p>\n\n\n\n
sudo chown -R johndoe:johndoe \/var\/www\/pyro<\/code><\/pre>\n\n\n\n
cd \/var\/www\/pyro\ncomposer create-project pyrocms\/pyrocms .<\/code><\/pre>\n\n\n\n
sudo systemctl stop nginx.service php-fpm.service mysql.service<\/code> to save on memory usage and start them again after this step<\/em>.<\/p>\n\n\n\n
\/var\/www\/pyro<\/code> directory to
nginx<\/code>.<\/p>\n\n\n\n
sudo chown -R nginx:nginx \/var\/www\/pyro<\/code><\/pre>\n\n\n\n
sudo vim \/etc\/php-fpm.d\/www.conf<\/code> and set the user and group to
nginx<\/code>.<\/p>\n\n\n\n
sudo vim \/etc\/php-fpm.d\/www.conf\n# user = nginx\n# group = nginx<\/code><\/pre>\n\n\n\n
php-fpm.service<\/code>.<\/p>\n\n\n\n
sudo systemctl restart php-fpm.service<\/code><\/pre>\n\n\n\n
\/admin<\/code> to your site URL.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","manualknowledgebasecat":[231,242,245,587],"manual_kb_tag":[615,616,647,649,651,662],"_links":{"self":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/3844"}],"collection":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/comments?post=3844"}],"version-history":[{"count":3,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/3844\/revisions"}],"predecessor-version":[{"id":3847,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/3844\/revisions\/3847"}],"wp:attachment":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/media?parent=3844"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manualknowledgebasecat?post=3844"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb_tag?post=3844"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}