yum install php php-pdo php-common php-mcrypt php-mbstring<\/pre>\nDownload the latest stable release of Craft from their official website.<\/p>\n
wget http:\/\/download.buildwithcraft.com\/craft\/2.4\/2.4.2670\/Craft-2.4.2670.zip<\/pre>\nUnpack the downloaded zip archive.<\/p>\n
unzip Craft-2.4.2670.zip<\/pre>\nThe archive contains two directories ‘craft\/’ and ‘public\/’ . It is recommended to move the ‘craft\/’ directory above the document root directory.<\/p>\n
mv craft\/ \/var\/www\/<\/pre>\nAnd move the ‘public\/’ directory to the document root directory on your server and change your current working directory.<\/p>\n
mv public\/ \/var\/www\/html\/\r\ncd \/var\/www\/html\/\r\nmv public\/ craft\/<\/pre>\nIf you are not sure where is your document root directory you can use the following command to find out<\/p>\n
grep -i '^documentroot' \/etc\/httpd\/conf\/httpd.conf\r\nDocumentRoot \"\/var\/www\/html\"<\/pre>\nChange the ownership<\/p>\n
chown -R apache:apache craft\/<\/pre>\nNow, we need to tell Craft how to connect to the MariaDB database. Opoen the db.conf file and enter the database information:<\/p>\n
vim ..\/..\/craft\/config\/db.php\r\n\r\n'server' => 'localhost',\r\n'user' => 'craftuser',\r\n'password' => 'PASSWORD',\r\n'database' => 'craft',\r\n'tablePrefix' => 'craft',<\/pre>\nRename the htacces file located in the ‘public\/’ directory<\/p>\n
mv public\/htaccess public\/.htaccess<\/pre>\nNext, create Apache virtual host for your domain. Create ‘\/etc\/httpd\/conf.d\/vhosts.conf’ directory with the following content<\/p>\n
vim \/etc\/httpd\/conf.d\/vhosts.conf\r\n\r\nIncludeOptional vhosts.d\/*.conf<\/pre>\nand create the virtual host<\/p>\n
vim \/etc\/httpd\/vhosts.d\/yourdomain.com.conf\r\n\r\n<VirtualHost YOUR_SERVER_IP:80>\r\nServerAdmin webmaster@yourdomain.com\r\nDocumentRoot \"\/var\/www\/html\/craft\/\"\r\nServerName yourdomain.com\r\nServerAlias www.yourdomain.com\r\nErrorLog \"\/var\/log\/httpd\/yourdomain.com-error_log\"\r\nCustomLog \"\/var\/log\/httpd\/yourdomain.com-access_log\" combined\r\n\r\n<Directory \"\/var\/www\/html\/craft\/\">\r\nDirectoryIndex index.html index.php\r\nOptions FollowSymLinks\r\nAllowOverride All\r\nRequire all granted\r\n<\/Directory>\r\n<\/VirtualHost><\/pre>\nRestart the Apache web server for the changes to take effect.<\/p>\n
systemctl restart httpd<\/pre>\nNow, load Craft’s administrator panel at http:\/\/yourdomain.com\/admin to finish the installation.<\/p>\n
Of course you don\u2019t have to do any of this if you use one of our Linux VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to install Craft for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n
PS<\/strong><\/span>. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"
Craft is a content management system (CMS) designed for publishers who want more control and more powerful performances from their … <\/p>\n
Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":17391,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1699,1710,13],"tags":[541,292,851],"yoast_head":"\nInstall Craft CMS on CentOS 7 - RoseHosting<\/title>\n<meta name=\"description\" content=\"Install Craft CMS on CentOS 7 - RoseHosting\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Install Craft CMS on CentOS 7 - RoseHosting\" \/>\n<meta property=\"og:description\" content=\"Install Craft CMS on CentOS 7 - RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2016-01-01T19:31:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-15T13:18:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2015\/06\/ikJdiVZj_400x400.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"400\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"Install Craft CMS on CentOS 7\",\"datePublished\":\"2016-01-01T19:31:51+00:00\",\"dateModified\":\"2022-12-15T13:18:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/\"},\"wordCount\":479,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2015\/06\/ikJdiVZj_400x400.jpeg\",\"keywords\":[\"centos 7\",\"cms\",\"craft\"],\"articleSection\":[\"CentOS\",\"CMS, CRM, ERP\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/\",\"name\":\"Install Craft CMS on CentOS 7 - RoseHosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2015\/06\/ikJdiVZj_400x400.jpeg\",\"datePublished\":\"2016-01-01T19:31:51+00:00\",\"dateModified\":\"2022-12-15T13:18:16+00:00\",\"description\":\"Install Craft CMS on CentOS 7 - RoseHosting\",\"breadcrumb\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/#primaryimage\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2015\/06\/ikJdiVZj_400x400.jpeg\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2015\/06\/ikJdiVZj_400x400.jpeg\",\"width\":400,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.rosehosting.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Install Craft CMS on CentOS 7\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"name\":\"RoseHosting\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/RoseHosting\",\"https:\/\/x.com\/rosehosting\",\"https:\/\/www.linkedin.com\/in\/rosehosting\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\/\/www.rosehosting.com\",\"https:\/\/www.facebook.com\/rosehosting.helpdesk\"],\"url\":\"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Install Craft CMS on CentOS 7 - RoseHosting","description":"Install Craft CMS on CentOS 7 - RoseHosting","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/","og_locale":"en_US","og_type":"article","og_title":"Install Craft CMS on CentOS 7 - RoseHosting","og_description":"Install Craft CMS on CentOS 7 - RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2016-01-01T19:31:51+00:00","article_modified_time":"2022-12-15T13:18:16+00:00","og_image":[{"width":400,"height":400,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2015\/06\/ikJdiVZj_400x400.jpeg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"Install Craft CMS on CentOS 7","datePublished":"2016-01-01T19:31:51+00:00","dateModified":"2022-12-15T13:18:16+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/"},"wordCount":479,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2015\/06\/ikJdiVZj_400x400.jpeg","keywords":["centos 7","cms","craft"],"articleSection":["CentOS","CMS, CRM, ERP","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/","url":"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/","name":"Install Craft CMS on CentOS 7 - RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2015\/06\/ikJdiVZj_400x400.jpeg","datePublished":"2016-01-01T19:31:51+00:00","dateModified":"2022-12-15T13:18:16+00:00","description":"Install Craft CMS on CentOS 7 - RoseHosting","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2015\/06\/ikJdiVZj_400x400.jpeg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2015\/06\/ikJdiVZj_400x400.jpeg","width":400,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/install-craft-cms-on-a-centos-7-vps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Install Craft CMS on CentOS 7"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"]},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/17384"}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=17384"}],"version-history":[{"count":4,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/17384\/revisions"}],"predecessor-version":[{"id":44305,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/17384\/revisions\/44305"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/17391"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=17384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=17384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=17384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}