User Tools

Site Tools


create_a_lemp_server_running_litecart

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
create_a_lemp_server_running_litecart [2018/01/13 02:41]
admin
— (current)
Line 1: Line 1:
-====== How to Create a LEMP Server Running LiteCart ====== 
- 
-  - Download CentOS from the [[https://www.centos.org/|CentOS Project]] website. 
-  - Burn a disc from the ISO file. And boot up your machine using the disc. See YouTube for guides [[https://www.youtube.com/results?search_query=how+to+install+centos|how to install CentOS]]. 
-  - After install. Login as root and proceed with the commands below. 
- 
-===== Install Services ===== 
- 
-<file bash lemp_install.sh> 
-#!/bin/sh 
- 
-# Install some repositories 
-yum localinstall https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm 
-yum localinstall http://rpms.remirepo.net/enterprise/remi-release-7.rpm 
-yum localinstall https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm 
- 
-## Install some tools 
-yum install -y lynx nano unzip wget 
- 
-## Install NGINX (See below) 
-yum install -y nginx 
- 
-## Install MySQL 
-yum --enablerepo=mysql57-community install -y mysql-community-server 
- 
-## Install PHP and PHP-FPM 
-yum --enablerepo=remi-php72 install -y php php-fpm php-bcmath php-gd php-mbstring php-mysqlnd php-mcrypt php-soap php-zip 
- 
-### Configurations ############# 
- 
-## Configure MySQL 
-# If you missed your temporary password do: grep 'temporary password' /var/log/mysqld.log 
-mysql_secure_installation 
- 
-## Configure PHP-FPM (see below) 
-nano /etc/php-fpm.d/www.conf 
- 
-## Configure services to start upon boot sequence 
-systemctl enable nginx 
-systemctl enable mysqld 
-systemctl enable php-fpm 
- 
-## Starts services immediately 
-systemctl start nginx 
-systemctl start mysqld 
-systemctl start php-fpm 
- 
-## Create index.php (echo hello world or phpinfo()) 
-echo "<?php echo 'Hello World'; ?>" > /var/www/litecart/index.php 
- 
-# Open the browser and make sure you see Hello World 
-lynx http://localhost/ 
- 
-## Allow incoming connections on port 80 from other computers 
-firewall-cmd --zone=public --add-port=80/tcp --permanent 
-firewall-cmd --reload 
-</file> 
- 
-===== Install LiteCart ===== 
- 
-<file bash> 
-wget -O litecart.zip https://github.com/litecart/litecart/archive/master.zip 
-unzip litecart.zip litecart-master/public_html/* -d /var/www/litecart 
-mv /var/www/litecart/litecart-master/public_html/* /var/www/litecart/ 
-rm -rf /var/www/litecart/litecart-master 
- 
-## Add host 
-echo "127.0.0.1    litecart" >> /etc/hosts 
- 
-## Configure NGINX (See below) 
-nano /etc/nginx/conf.d/litecart.conf 
- 
-## Create a MySQL Database (Use your mysql root password) 
-mysql -uroot -p -e "CREATE DATABASE litecart; CREATE USER litecart@localhost IDENTIFIED BY 'test123test%'; GRANT ALL ON litecart.* TO litecart@localhost;" 
- 
-# Restart NGINX 
-systemctl start nginx 
- 
-## Go to http://litecart/install to complete installation 
-lynx http://litecart/install 
-</file> 
- 
-===== Configurations ===== 
- 
-<file ini /etc/nginx/conf.d/litecart.conf>    
-server { 
-  server_name litecart; 
-  listen      80; 
- 
-  root        /var/www/litecart; 
-  index       index.php index.html index.htm; 
-   
-  error_page 401 "Access Forbidden"; 
-  error_page 403 /error_document?code=403; 
-  error_page 404 /error_document?code=404; 
-  error_page 410 /error_document?code=410; 
-  error_page 500 "Internal Server Error"; 
- 
-  location / { 
-    try_files $uri $uri/ /index.php$is_args$args; 
-  } 
- 
-  location ~ \.php$ { 
-    try_files $uri =404; 
-    fastcgi_pass 127.0.0.1:9000; 
-    fastcgi_index index.php; 
-    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
-    include fastcgi_params; 
-  } 
-} 
-</file> 
-<file ini /etc/php.ini> 
-... 
-cgi.fix_pathinfo=0 
-... 
-</file> 
- 
-<file ini /etc/php-fpm.d/www.conf> 
-listen = 127.0.0.1:9000 
-listen.owner = nobody 
-listen.group = nobody 
-user = nginx 
-group = nginx 
-</file> 
- 
- 
-===== Install Ajenti Control Panel ===== 
- 
-[[http://support.ajenti.org/forums/5-kb/topics/1122-installing-on-centosrhel/]] 
- 
-<file bash> 
-# Install repository 
-yum localinstall http://repo.ajenti.org/ajenti-repo-1.0-1.noarch.rpm 
- 
-## Install Ajenti 
-yum --enablerepo=ajenti install -y ajenti 
- 
-## Allow incoming connections on port 8000 from other computers 
-firewall-cmd --zone=public --add-port=8000/tcp --permanent 
-firewall-cmd --reload 
-</file> 
- 
-===== Install a DNS Server ===== 
- 
-<file bash> 
-## Install DNS server 
-yum install -y bind bind-utils 
- 
-## Configure to start upon boot sequence 
-systemctl enable named 
- 
-## Start immediately 
-systemctl start named 
-</file> 
  
create_a_lemp_server_running_litecart.1515807666.txt.gz ยท Last modified: 2018/01/13 02:41 by admin