Proc 1: 2267 MHz
Execution technology: 6/6 cores; 12 maximum threads
Memory technology: 64-bit capable
Processor 1 Internal L1 Cache: 192 KB
Processor 1 Internal L2 Cache: 1536 KB
Processor 1 Internal L3 Cache: 12288 KB
Proc 2: 2267 MHz
Execution technology: 6/6 cores; 12 maximum threads
Memory technology: 64-bit capable
Processor 2 Internal L1 Cache: 192 KB
Processor 2 Internal L2 Cache: 1536 KB
Processor 2 Internal L3 Cache: 12288 KB
')
HDD:
1 PLEXTOR PX-256M
2 WDC WD1000DHTZ
Ram
PROC 1 DIMM 4B: 16384 MB 1333 MHz
PROC 1 DIMM 6C: 16384 MB 1333 MHz
PROC 2 DIMM 4B: 16384 MB 1333 MHz
PROC 2 DIMM 6C: 16384 MB 1333 MHz
During the setup process, he convinced the owners to purchase another IP address for the test machine.
0. aptitude update && aptitude upgrade 1. pvcreate /dev/sdb 2. vgcreate ws /dev/sdb 3. lvcreate -n data -L980G ws ( 980 , 10 ) 4. mkfs.ext4 -L data /dev/ws/data , , 0 1 aptitude install screen. 4 : screen -dmS createfs mkfs.ext4 -L data /dev/ws/data 5. echo "/dev/ws/data /var/lib/ws ext4 defaults 0 1" >> /etc/fstab 6. mount -a
cd /etc/sysconfig/network-scripts cat ifcfg-eth0 DEVICE=eth0 HWADDR= ( mak , proxmox) TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=none IPADDR=<, > NETMASK= <, > GATEWAY= <, > DNS1=8.8.8.8 DNS2=8.8.4.4 service network restart
vzcpucheck proxmox. vzcpucheck Current CPU utilization: 4000 OpenVZ VM is getting 1000 divided by 906755 and multiplied by 100 = 0.1% of the CPU time So if I want to give 5 percent of guaranteed time to my VPS, I would enter CPU Units = 45337
modprobe dummy
cd /etc/sysconfig/network-scripts cat ifcfg-eth1 DEVICE=eth1 HWADDR= ( mak , proxmox) TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=none IPADDR=192.168.12.10 NETMASK= 255.255.255.0 GATEWAY= 192.168.12.1 DNS1=8.8.8.8 DNS2=8.8.4.4 service network restart
cat my.cnf [mysqld] user=mysql skip-external-locking low-priority-updates port= 3306 wait_timeout = 120 # #innodb_force_recovery = 5 datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock symbolic-links=0 key_buffer = 256M key_buffer_size = 256M max_allowed_packet = 4M thread_stack = 2048K thread_cache_size = 8086 thread_concurrency = 8 query_cache_limit = 1G query_cache_size = 1G #myisam-recover = BACKUP max_connections = 1400 table_definition_cache = 8000 join_buffer_size =4M tmp_table_size = 768M max_heap_table_size = 768M max_tmp_tables = 500 character-set-server = utf8 expire_logs_days=2 innodb_data_home_dir=/var/lib/mysql innodb_data_file_path=ibdata1:10M:autoextend innodb_log_group_home_dir = /var/lib/mysql innodb_file_per_table=1 # You can set .._buffer_pool_size up to 50 - 80 % # of RAM but beware of setting memory usage too high innodb_open_files=1200 innodb_buffer_pool_size = 22G innodb_buffer_pool_instances = 22 innodb_additional_mem_pool_size = 512M # Set .._log_file_size to 25 % of buffer pool size innodb_log_file_size = 64M innodb_log_buffer_size = 4M innodb_lock_wait_timeout = 50 innodb_flush_log_at_trx_commit = 2 innodb_flush_method=O_DIRECT innodb_doublewrite=0 innodb_support_xa=0 innodb_checksums=0 innodb_io_capacity = 120 max-connect-errors = 10000 back_log = 500 binlog_cache_size = 1M sync_binlog = 0 key_cache_division_limit=70 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid [myisamchk] key_buffer_size = 128M sort_buffer_size = 128M read_buffer = 64M write_buffer = 64M key_cache_division_limit=70
cat nginx.conf user nginx; worker_processes 6; # , , . #worker_processes auto; #worker_cpu_affinity 010000 100000 001000 000100 000010 000001; error_log /var/log/nginx/error.log; pid /var/run/nginx.pid; events { worker_connections 2048; } http { include /etc/nginx/mime.types; default_type text/html; access_log /var/log/nginx/access.log; sendfile on; keepalive_timeout 20; tcp_nodelay on; gzip on; gzip_comp_level 2; gzip_proxied any; gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript; client_max_body_size 64m; include /etc/nginx/conf.d/*; } cd /etc/nginx/conf.d cat default server { listen *:80; ## listen for ipv4; this line is default and implied access_log /var/log/nginx/access.log; location /nginx_status { stub_status on; access_log off; allow 127.0.0.1; deny all; } server_name nginx.xxx.ru; location / { proxy_pass http://192.168.12.20:80/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_connect_timeout 60; proxy_send_timeout 60; proxy_read_timeout 90; } }
cd /etc/sysconfig/network-scripts cat ifcfg-eth1 DEVICE=eth1 HWADDR= ( mak , proxmox) TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=none IPADDR=192.168.12.20 NETMASK= 255.255.255.0 GATEWAY= 192.168.12.1 DNS1=8.8.8.8 DNS2=8.8.4.4 service network restart
cd /etc/sysconfig/network-scripts cat ifcfg-eth1 DEVICE=eth1 HWADDR= ( mak , proxmox) TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=none IPADDR=<, > NETMASK= <, > GATEWAY= <, > DNS1=8.8.8.8 DNS2=8.8.4.4 service network restart
fdisk /dev/sdb << >> mkfs.ext4 -L data /dev/sdb1 echo "/dev/sdb1 /var/www ext4 defaults 0 1" >> /etc/fstab 6. mount -a
cat /etc/rc.local /sbin/iptables -F /sbin/iptables -X /sbin/iptables -t nat -A PREROUTING -p tcp -d < IP> --dport 22003 -j DNAT --to-destination 192.168.12.10:22003 /sbin/iptables -t nat -A PREROUTING -p tcp -d < IP> --dport 22002 -j DNAT --to-destination 192.168.12.20:22002 /sbin/iptables -t nat -A PREROUTING -p tcp -d < IP> --dport 22004 -j DNAT --to-destination 192.168.12.30:22004 /sbin/iptables -t nat -A PREROUTING -p tcp -d < IP> --dport 1500 -j DNAT --to-destination 192.168.12.20:1500 #nginx /sbin/iptables -t nat -A PREROUTING -p tcp -d < IP> --dport 80 -j DNAT --to-destination 192.168.12.30:80 /sbin/iptables -t nat -A PREROUTING -p tcp -d < IP> --dport 445 -j DNAT --to-destination 192.168.12.30:445 /sbin/iptables -t nat -A PREROUTING -p tcp -d < IP> --dport 443 -j DNAT --to-destination 192.168.12.30:443 /sbin/iptables -t nat -A PREROUTING -p tcp -d < IP> --dport 25 -j DNAT --to-destination 192.168.12.30:25 /sbin/iptables -t nat -A PREROUTING -p tcp -d < IP> --dport 110 -j DNAT --to-destination 192.168.12.30:110
nslookup < > <ip > - IP ? - httpd. - , - . , . .
mkswap /dev/sd< > cat /proc/swaps swapoff -v /dev/sda< > ( swap swapon /dev/sd< >
cat /etc/fstab # # /etc/fstab # Created by anaconda on Tue Mar 11 15:57:46 2014 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # /dev/mapper/VolGroup-lv_root / ext4 defaults 1 1 UUID=43977fc1-b315-4c84-8d4e-147f4063a60e /boot ext4 defaults 1 2 /dev/mapper/VolGroup-lv_home /home ext4 defaults 1 2 /dev/sdc swap swap defaults 0 0 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 /dev/sdb1 /var/www ext4 defaults 1 2 noatime,nodiratime,noacl,data=writeback,commit=15
Source: https://habr.com/ru/post/218237/
All Articles