1 頁 (共 1 頁)

ngnix php 7.0 maria db

發表於 : 2016-02-04 20:36:39
yehlu
Maria DB
https://downloads.mariadb.org/mariadb/r ... university

代碼: 選擇全部

sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo add-apt-repository 'deb [arch=amd64,i386] http://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/repo/10.1/ubuntu trusty main'

sudo apt-get update
sudo apt-get install mariadb-server

Re: ngnix php 7.0 maria db

發表於 : 2016-02-04 20:38:37
yehlu
https://www.digitalocean.com/community/ ... untu-14-04

代碼: 選擇全部

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update


sudo apt-get install php7.0-fpm
sudo apt-get install php7.0-mysql
sudo apt-get install php7.0-gd

sudo nano /etc/nginx/sites-enabled/default

sudo service nginx restart

php -v

代碼: 選擇全部

server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;

    root /var/www/html;
    index index.php index.html index.htm;

    server_name server_domain_name_or_IP;

    location / {
        try_files $uri $uri/ =404;
    }

    error_page 404 /404.html;
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
        root /usr/share/nginx/html;
    }

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

sudo group

發表於 : 2016-02-04 21:15:51
yehlu

代碼: 選擇全部

groupadd  admin
usermod -aG admin yehlu

disable root ssh login

發表於 : 2016-02-04 21:18:42
yehlu
https://www.linode.com/docs/security/se ... our-server

/etc/ssh/sshd_config

代碼: 選擇全部

PermitRootLogin yes  -> PermitRootLogin no

Re: ngnix php 7.0 maria db

發表於 : 2016-02-04 22:05:06
yehlu
sudo dpkg-reconfigure tzdata