Jump to content
gogusan

[Novice] Nginx php5.5fpm Mariadb Froxlor - Instalare CENTOS 6.5 64bit

Recommended Posts

1. Se instaleaza Centos 6.5 64bit ca Basic Server

2. Dezactivam selinux si dam restart

nano /etc/selinux/config
SELINUX=disabled

reboot

3. Personal eu dezactivez si firewallul

system-config-firewall-tui

debifati> OK si YES

4. Adaugam Remi-repo(mai intai adaugam EPEL)

cd /usr/local/src
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

activam remirepo (remi si remi-php55; puteti sa dati skip la asta daca scrieti yum --enablerepo=remi respectiv remi-php55)

nano /etc/yum.repos.d/remi.repo
enabled=1

(la ambele> remi si remi-php55)

5. Facem update la sistem si instalam cateva utilitare

yum update -y
yum groupinstall 'Development Tools' -y
yum install zlib-devel pcre-devel openssl-devel -y
yum install autoconf automake libtool -y

6. Instalare MariaDB mysql server

Adaugam repo pt MariaDB:

nano /etc/yum.repos.d/MariaDB.repo

# MariaDB 5.5 CentOS repository list - created 2014-02-26 10:44 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

yum install MariaDB-server MariaDB-client -y
chkconfig --levels 235 mysql on
service mysql start
mysql_secure_installation
enter
y
parolamea
parolamea
y
y
y
y
service mysql restart

7. Nginx server

wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm
yum install nginx -y
chkconfig --levels 235 nginx on
usermod -a -G apache nginx
service nginx start

testati daca functioneaza intr-un browser: http://ip (daca nu ati dezactivat firewallul, faceti setarile necesare pt portul 80)

8. Php 5.5 - fpm server (cu zend opache inclus - nu mai este necesar instalarea APC)

daca nu ati dat enable la remi-repo (remi si remi-php55) ori editati enabled ori adaugati --enablerepo=remi,remi-php55

yum install php php-fpm php-mysql php-opcache php-common

pt ca nginx ruleaza sub userul nginx vom face modificarea userului si pt php-fpm

nano /etc/php-fpm.d/www.conf

si modificati user = apache in user = nginx

chkconfig --levels 235 php-fpm on
service php-fpm start
service nginx restart

facem un fisier php cu phpinfo in directorul web default al nginx

echo "<?php phpinfo();?>" > /usr/share/nginx/html/info.php

inainte de a testa trebuie sa setam nginx sa foloseasca php-fpm

nano /etc/nginx/conf.d/default.conf

stergem # din fata liniilor si adaugam pathul corect la root si la fastcgi_param inlocuim /scripts cu $document_root

    location ~ \.php$ {
root /usr/share/nginx/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name;
include fastcgi_params;
}

service nginx restart

testam phpinfo http://ip/info.php

9. Froxlor panel --- OPTIONAL daca vreti un control panel simplu si la obiect.

wget http://files.froxlor.org/releases/froxlor-latest.tar.gz
tar -xzvf froxlor-latest.tar.gz
mv froxlor/* /usr/share/nginx/html/

adaugam index.php in default.conf la nginx


nano /etc/nginx/conf.d/default.conf

   location / {
root /usr/share/nginx/html;
index index.php index.html index.htm; #aici adaugam index.php
}

instalam Froxlor: http://ip

"Welcome to Froxlor

It seems that Froxlor has not been installed yet.

Click on the link below to start the installation."

Click pe Start Install

PHP bcmath-extension... not installed

Traffic-calculation related functions will not work correctly!"

yum install php-bcmath

il va instala din remi-php55 (nu uitati ca daca nu ati dat enable la remi repo sa folosit --enablerepo=remi,remi-php55 la comanda yum)

service php-fpm restart
service nginx restart

accesati iar instalarea Froxlor

dupa ce completati toate campurile acolo (userul si db le creaza el, voi doar introduceti parola de mysql root)

Checking MySQL-root access... OK

Preparing database... OK

Creating database and username... OK

Testing if database and user have been created correctly... OK

Importing data... OK

Adjusting settings... OK

Inserting new values... OK

Creating admin-account... OK

Creating configfile... File was saved in /tmp/userdata.inc.php, please move to lib/.

mv /tmp/userdata.inc.php /usr/share/nginx/html/lib/

ATENTIE: in acest fisier sunt stocate parolele deci modificatii drepturile de citire (exemplu: doar userul root are dreptul de a citi fisierul)

chown root.apache /usr/share/nginx/html/lib/userdata.inc.php

mergeti inapoi pe pagina si dati click pe Click here to login.

accesati Settings si modificati ce va intereseaza (de exemplu la webserver la php-fpm by default e pus 127.0.0.1:8888 si noi avem pe portul 9000)

daca accesati Configuration va va indica modele de configurare( NU EXISTA CFG PENTRU CENTOS dar puteti adapta de la ubuntu 12.04 de exemplu)

LE: mutati va rog topicul ca am gresit sectiunea:)

// edit: done

Edited by aelius
  • Upvote 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...