Bang hộiTiền mặt: 0 Xu Trò chơiHộp quà giáng sinhThứ Tư, 08:34:21 - 29/05/2024


TẠO CHỦ ĐỀ MỚI


[Ubuntu] How to connect as root using WINSCP - Ubuntu

In Ubuntu and other Linux distribution the “root” user is not directly accessible with a login operation without first doing an intermediate login with an unprivileged user.

Luckily, you can configure WinSCP to log in automatically from an unprivileged user into the “root ” user, by following these simply steps:

At the login window select:
1. File protocol: SCP
2. Advanced... (Advanced Site Settings)
3. Environment: SCP/Shell
4. Shell: sudo su -
5. select OK ...
Read more : [Ubuntu] How to connect as root using WINSCP - Ubuntu | Xem : 767 | Trả lời : 0


[Linux] How to backup and restore MySQL databases on Linux

How to backup and restore MySQL databases on Linux


A simple and easy method for creating MySQL backups is to use the mysqldump command. This command will create a simple .sql file of an existing database, which can then be restored to any other empty MySQL database. This article will work for any Linux distribution running MySQL.


1. Back up the database using the following command:

mysqldump -u –p >
Example: mysqldump ...
Read more : [Linux] How to backup and restore MySQL databases on Linux | Xem : 629 | Trả lời : 0


How to change SSH port on CentOS

- Open file:
/etc/ssh/sshd_config

- Find:
#Port 22

- Replace:
Port 7777

- Stop firewall and reboot:
Code: Chọn tất cả
cd
echo 0 
> /selinux/enforce
setenforce 0
sudo systemctl stop firewalld
sudo systemctl disable firewalld
sudo systemctl mask 
--now firewalld
reboot
cd


View more: https://monovm.com/blog/how-to-change-ssh-port-on-centos/
Read more : How to change SSH port on CentOS | Xem : 554 | Trả lời : 0


[Cent OS] server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting

Open file /etc/httpd/conf/httpd.conf
Find </IfModule>
Add after:

Code: Chọn tất cả
<IfModule mpm_prefork_module>
      
StartServers              10
      MinSpareServers           10
      MaxSpareServers           20
      MaxClients                4000
      MaxRequestWorkers         4000
      ServerLimit               5000
      MaxConnectionsPerChild    10000
</IfModule


Restart apache:
service httpd restart

Read more:
https://devops.ionos.com/tutorials/optimize-apache-performance-on-centos-7-1/
https://bobcares.com/blog/server-reached-maxrequestworkers-setting/


Hướng dẫn thay đổi port Windows Server qua Remote Desktop

Với port default Remote Desktop là 3389, chính vì vậy để an toàn hơn cho việc truy cập hệ thống từ xa bằng phương pháp Remote Desktop, bài viết này sẽ hướng dẫn cách thực hiện change port Remote Desktop.

* Một số điều kiện cần đảm bảo trước khi thực hiện change port:

- Tránh xung đột cổng kết nối với phần mềm khác. (ví dụ: 80 cổng kết nối HTTP, 443 cổng kết ...
Read more : Hướng dẫn thay đổi port Windows Server qua Remote Desktop | Xem : 587 | Trả lời : 0


Hướng dẫn cài đặt NGINX phiên bản mới nhất trên CentOS 7

Hình ảnh

NGINX (đọc là “engine x”) là một phần mềm mã nguồn mở cho web serving, reverse proxying, caching, load balancing, media streaming,…Ban đầu nó giống như một web server được thiết kế để cho hiệu suất(performance) và tính ổn định(stability) cao nhất. Ngoài khả năng là 1 Web server, NGINX cũng có thể hoạt động như một proxy server cho email (IMAP, POP3 và SMTP) và reverse proxy và load balancer cho HTTP, TCP, ...


Tối ưu hóa NGINX - Optimized nginx.conf configuration

worker_processes 6;
worker_rlimit_nofile 8192;
...
events {
worker_connections 4096;
}




File nginx.conf after optimization:
Code: Chọn tất cả
user  nginx;
worker_processes 6;
worker_rlimit_nofile 8192;
   
   
error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections 4096;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;
}
Read more : Tối ưu hóa NGINX - Optimized nginx.conf configuration | Xem : 599 | Trả lời : 0


Tối ưu hóa PHP - Optimized php.ini configuration Tối ưu hóa PHP - Optimized php.ini configuration

cgi.fix_pathinfo=0
session.save_path = "/var/lib/php/session"
memory_limit = 512M
short_open_tag = On
max_execution_time = 60
max_input_time = 60
post_max_size = 9999M
upload_max_filesize = 9999M




File php.ini after optimization:
[code=php]

;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.

; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search ...
Read more : Tối ưu hóa PHP - Optimized php.ini configuration | Xem : 582 | Trả lời : 0


Tối ưu hóa Apache - Optimized httpd.conf configuration for Apache

#Listen 12.34.56.78:80
Listen 80
Listen 443
Listen 2222


#CustomLog "logs/access_log" common
#CustomLog "logs/access_log" combined


DocumentRoot "/var/www/html"


File httpd.conf after optimization:

#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding ...


Tối ưu hóa MYSQL và MariaDB - Optimized my.cnf configuration for MySQL/MariaSQL

# Optimized my.cnf configuration for MySQL/MariaSQL
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated January 2020 ~
#
#
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
# The settings marked with a specific comment or the word ...


Hương dẫn cài đặt Remote MYSQL - Instructions for installing Remote MYSQL

I - Editing the Defaults File:
- edit file: /etc/my.cnf.d/server.cnf
Code: Chọn tất cả
 [mysqld]
    ...
    skip-networking
    ...
    bind-address = <some ip-address>
    ...

to
Code: Chọn tất cả
 [mysqld]
    ...
    #skip-networking
    skip-networking=0
    ...
    #bind-address = <some ip-address>
    skip-bind-address
    ...


- Restart MySQL:
systemctl restart mariadb

- You can now verify the MariaDB listening status with the following command:
netstat -ant | grep 3306

- If everything is fine, you should get the following output:
tcp 0 0 0.0.0.0:3306 ...


Hướng dẫn cài đặt MariaDB Server phiên bản mới nhất trên CentOS 7

MariaDB là một nhánh của MySQL (một trong những CSDL phổ biến trên thế giới ), là máy chủ cơ sở dữ liệu cung cấp các chức năng thay thế cho MySQL. MariaDB được xây dựng bởi một số tác giả sáng lập ra MySQL được sự hỗ trợ của đông đảo cộng đồng các nhà phát triển phần mềm mã nguồn mở. Ngoài việc kế thừa các chức năng cốt lõi của MySQL, MariaDB ...


Cài đặt ngày giờ trên CentOS theo giờ chuẩn Việt Nam Cài đặt ngày giờ trên CentOS theo giờ chuẩn Việt Nam

Hình ảnh

Sau khi cài đặt CentOS trên máy chủ (đặt biệt là máy chủ và VPS có server không ở Việt Nam), thường ngày giờ sẽ không chính xác, thậm chí là lệch cả múi giờ làm cho việc cập nhật hệ thống hay các website trên máy chủ này sẽ bị sự cố.

Khi đó ta cần kiểm tra và chỉnh lại ngày giờ theo đúng giờ Việt Nam.

Lệnh xem ngày giờ trên ...
Read more : Cài đặt ngày giờ trên CentOS theo giờ chuẩn Việt Nam | Xem : 634 | Trả lời : 0


SELinux là gì? Cách vô hiệu hóa SELinux trên Linux CentOS

Khi thực hiện cài đặt 1 số phần mềm trên Linux, thì yêu cầu phải tắt hoặc vô hiệu hóa SELinux. Vậy SELinux là gì? Vì sao phải vô hiệu hóa SELinux, trong bài viết này sẽ giúp các bạn hiểu thêm về khái niệm SELinux, các chế độ cũng như cách vô hiệu hóa SELinux trên hệ thống CentOS

Hình ảnh


I. SELinux là gì?
SELinux (Security-Enhanced Linux) là một mô đun bảo mật ở ...
Read more : SELinux là gì? Cách vô hiệu hóa SELinux trên Linux CentOS | Xem : 739 | Trả lời : 0


How To Backup And Restore MySQL On Linux

This article shows you several practical examples on how to perform various backup operations of MySQL databases using mysqldump command and also we will see how to restore them with the help of mysql and mysqlimport command in Linux.

mysqldump is a command-line client program, it is used to dump local or remote MySQL database or collection of databases for backup into a single flat file.

Hình ảnh

We assume that you already have MySQL installed ...
Read more : How To Backup And Restore MySQL On Linux | Xem : 1034 | Trả lời : 2




TẠO CHỦ ĐỀ MỚI