# passwd root
# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup-lv_root 2.6G 1.7G 767M 70% / tmpfs 495M 0 495M 0% /dev/shm /dev/sda1 485M 37M 423M 8% /boot
#fdisk –l Disk /dev/sda: 21.5 GB, 21474836480 bytes … Device Boot Start End Blocks Id System /dev/sda1 * 1 64 512000 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 64 914 6827008 8e Linux LVM Partition 2 does not end on cylinder boundary. …
# fdisk /dev/sda Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 3 First cylinder (914-2610, default 914): Using default value 914 Last cylinder, +cylinders or +size{K,M,G} (914-2610, default 2610): Using default value 2610
Command (m for help): t Partition number (1-4): 3 Hex code (type L to list codes): 8e Changed system type of partition 3 to 8e (Linux LVM)
Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8) Syncing disks.
#reboot
# lvm lvm> pvcreate /dev/sda3 Physical volume "/dev/sda3" successfully created
# lvs LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert lv_root VolGroup -wi-ao--- 2.60g lv_swap VolGroup -wi-ao--- 3.91g
lvm> vgextend VolGroup /dev/sda3 Volume group "VolGroup" successfully extended
lvm> lvextend -l +100%FREE /dev/VolGroup/lv_root Extending logical volume lv_root to 15.59 GiB Logical volume lv_root successfully resized
# resize2fs -p /dev/mapper/VolGroup-lv_root resize2fs 1.41.12 (17-May-2010) Filesystem at /dev/mapper/VolGroup-lv_root is mounted on /; on-line resizing required old desc_blocks = 1, new_desc_blocks = 1 Performing an on-line resize of /dev/mapper/VolGroup-lv_root to 4087808 (4k) blocks. The filesystem on /dev/mapper/VolGroup-lv_root is now 4087808 blocks long.
# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup-lv_root 16G 1.7G 13G 12% / tmpfs 495M 0 495M 0% /dev/shm /dev/sda1 485M 37M 423M 8% /boot
# cd / # wget http://repos.1c-bitrix.ru/yum/bitrix-env.sh # chmod +x bitrix-env.sh # ./bitrix-env.sh
# cd /root # sh menu.sh
iptables -I INPUT -p tcp --dport 25 -j ACCEPT iptables -I INPUT -p tcp --dport 80 -j ACCEPT iptables -I INPUT -p tcp --dport 443 -j ACCEPT iptables -I INPUT -p tcp --dport 5222 -j ACCEPT iptables -I INPUT -p tcp --dport 5223 -j ACCEPT iptables -I INPUT -p tcp --dport 8890 -j ACCEPT iptables -I INPUT -p tcp --dport 8891 -j ACCEPT iptables -I INPUT -p tcp --dport 8893 -j ACCEPT iptables -I INPUT -p tcp --dport 8894 -j ACCEPT service iptables save /etc/init.d/iptables restart
Source: https://habr.com/ru/post/236469/
All Articles