Công cụ thành viên

Công cụ trang web


web_server:cai-dat-lemp-cho-centos7

Khác biệt

Đây là những khác biệt giữa hai phiên bản của trang.

Liên kết đến bản xem so sánh này

Phiên bản sau
Phiên bản trước
Phiên bản cuốiPhiên bản sau của cả hai bên
web_server:cai-dat-lemp-cho-centos7 [2016/08/01 18:50] – được tạo ra vuthaoweb_server:cai-dat-lemp-cho-centos7 [2016/08/03 17:12] vuthao
Dòng 40: Dòng 40:
  
 <code> <code>
-yum --enablerepo=remi,remi-php56 install nginx php-fpm php-mysql php-common php-mbstring php-mcrypt php-gd -y+yum --enablerepo=remi,remi-php56 install nginx php-fpm php-mysql php-common php-mbstring php-mcrypt php-gd php-xml php-zip php-memcached php-opcache -y
 </code> </code>
  
Dòng 63: Dòng 63:
 Nếu dùng firewalld Nếu dùng firewalld
 <code> <code>
-firewall-cmd --reload 
 firewall-cmd --permanent --zone=public --add-port=80/tcp firewall-cmd --permanent --zone=public --add-port=80/tcp
 +firewall-cmd --reload
 </code> </code>
  
Dòng 104: Dòng 104:
 Sửa thành Sửa thành
 <code> <code>
-    location / { 
         root   /usr/share/nginx/html;         root   /usr/share/nginx/html;
         index  index.html index.php index.htm;         index  index.html index.php index.htm;
-    } 
 </code> </code>
  
Dòng 125: Dòng 123:
 <code> <code>
     location ~ \.php$ {     location ~ \.php$ {
-        root           /usr/share/nginx/html; 
         fastcgi_pass   127.0.0.1:9000;         fastcgi_pass   127.0.0.1:9000;
         fastcgi_index  index.php;         fastcgi_index  index.php;
Dòng 131: Dòng 128:
         include        fastcgi_params;         include        fastcgi_params;
     }     }
 +</code>
 +
 +Chạy đoạn code sau để sửa lỗi session
 +<code>
 +sed -i 's/php_value\[session.save_handler\]/;php_value\[session.save_handler\]/g' /etc/php-fpm.d/www.conf
 +sed -i 's/php_value\[session.save_path\]/;php_value\[session.save_path\]/g' /etc/php-fpm.d/www.conf
 +sed -i 's/php_value\[soap.wsdl_cache_dir\]/;php_value\[soap.wsdl_cache_dir\]/g' /etc/php-fpm.d/www.conf
 +sed -i 's/;session.save_path = \"\/tmp\"/session.save_path = \"\/tmp\"/g' /etc/php.ini 
 </code> </code>
  
 Khởi động lại PHP-FPM Khởi động lại PHP-FPM
 <code> <code>
-service php-fpm restart+systemctl restart nginx 
 +systemctl restart php-fpm
 </code> </code>
  
Dòng 243: Dòng 249:
 yum install wget unzip yum install wget unzip
 cd /root/ cd /root/
-wget https://github.com/nukeviet/nukeviet/archive/develop.zip +wget https://github.com/nukeviet/nukeviet/releases/download/4.0.29/nukeviet4.0official-setup.zip 
-unzip develop.zip  +unzip nukeviet4.0official-setup.zip 
-mv nukeviet-develop/* /usr/share/nginx/html/+mv ./nukeviet/* /usr/share/nginx/html/
 chown -R nginx:nginx /usr/share/nginx/html/ chown -R nginx:nginx /usr/share/nginx/html/
 rm -f /usr/share/nginx/html/index.html rm -f /usr/share/nginx/html/index.html
Dòng 258: Dòng 264:
 <code> <code>
     location ~ \.php$ {     location ~ \.php$ {
-        root           /usr/share/nginx/html; 
         fastcgi_pass   127.0.0.1:9000;         fastcgi_pass   127.0.0.1:9000;
         fastcgi_index  index.php;         fastcgi_index  index.php;
Dòng 304: Dòng 309:
 </code> </code>
  
-Lưu lại và Khởi động lại PHP-FPM +Lưu lại
-<code> +
-service php-fpm restart +
-service nginx restart +
-</code>+
  
 Sửa file data/config_global.php của nukeviet Sửa file data/config_global.php của nukeviet
Dòng 320: Dòng 321:
 <code> <code>
 $sys_info['supports_rewrite']='rewrite_mode_apache'; $sys_info['supports_rewrite']='rewrite_mode_apache';
 +</code>
 +
 +
 +Lưu lại và Khởi động lại PHP-FPM
 +<code>
 +service php-fpm restart
 +service nginx restart
 </code> </code>
  
web_server/cai-dat-lemp-cho-centos7.txt · Sửa đổi lần cuối: 2018/06/01 09:23 bởi hoaquynhtim99