Skip to content

Latest commit

 

History

History
59 lines (38 loc) · 2.3 KB

deploy_on_apache_server_Fedora-CentOS.md

File metadata and controls

59 lines (38 loc) · 2.3 KB

Deploy APACHE SERVER on Fedora/CentOS systems.

IMPORTANT NOTES:

  • If are you running an Operating Systems with SELinux (or others security modules):
    SELINUX WILL CAUSE A LOT OF PROBLEMS. DISABLE IT!
    (the following command temporary disable SELinux, it will be up again at next restart)
    #> sudo setenforce 0

------------------------------------------

  • Install PHP and httpd (apache):
    #> sudo dnf -y install httpd php php-cli php-php-gettext php-mbstring php-mcrypt php-mysqlnd php-pear php-curl php-gd php-xml php-bcmath php-zip

  • Install phpMyAdmin:
    #> sudo dnf -y install phpMyAdmin

  • Enable and start httpd service:
    #> sudo systemctl start httpd
    #> sudo systemctl enable httpd

  • Set User and Server permission:
    #> sudo chown YOUR-USERNAME:apache -R /path/to/repo/NeuralNetworkBuilder/website
    #> sudo chmod -R 775 /path/to/repo/NeuralNetworkBuilder/website
    #> sudo usermod apache --append --groups YOUR-USERNAME
    #> sudo usermod YOUR-USERNAME --append --groups apache

  • If sites-available/ and sites-enabled/ directories doesn't exists, than create it:
    #> sudo mkdir /etc/httpd/sites-available
    #> sudo mkdir /etc/httpd/sites-enabled

  • Create a config file for laravel:
    Into utils/apache_conf/ folder you will find a confing file named neuralnetworkbuilder.conf.
    Copy the config file and Paste it into /etc/httpd/sites-available/.
    Edit now the config file with your properly data.

  • OPTIONAL CHANGES. Add the virtual host neuralnetworkbuilder:
    #> echo "127.0.0.1 neuralnetworkbuilder" >> /etc/hosts

  • Create a neuralnetworkbuilder.conf softlink from sites-available/ to sites-enabled/ directory:
    #> ln -s /etc/httpd/sites-available/neuralnetworkbuilder.conf /etc/httpd/sites-enabled/neuralnetworkbuilder.conf

  • Add the following line at the end of /etc/httpd/conf/httpd.conf file:
    IncludeOptional sites-enabled/*.conf

  • Test if apache config it's ok:
    #> apachectl configtest
    If the command output shows "Syntax OK", then you setting up everythings okay.

  • Reload/Restart apache server:
    #> sudo systemctl reload httpd.service
    #> sudo systemctl restart httpd.service