proxmox lxc改密码
1.在母机器lxc-attach -n 101
2.passwd
3.izhod
permalink Komentarji izklopljeni
Prostor imitacija znamke,Ameriška prostor imitacija blagovne znamke,Nizozemski anti pritožba prostor,imitacija blagovne znamke,Anti-pritožba,Web Hosting,Vesolje,VPS,Server
1) Po ponovnem zagonu stopil v veljavo
Odpri: chkconfig iptables na
Zapri: chkconfig iptables off
2) S takojšnjim učinkom,Po neuspehu ponovnega zagona
Odpri: storitev iptables začetek
Zapri: storitev iptables stop
vi / etc / sysconfig / iptables
-Vhod -m state -državna NEW -m tcp -p tcp -dport 80 -j ACCEPT (dovoljena preko požarnega vrata 80)
-Vhod -m state -državna NEW -m tcp -p tcp -dport 3306 -j ACCEPT (dovoljena preko požarnega vrata 3306)
Posebna opomba:Mnogi uporabniki dodajo ta dva pravila zadnji vrstici požarnega zidu,Pride do požarnega zidu ni uspela zagnati,Desno je treba dodati, da privzeto pristanišče 22 tega pravila pod
Po dodatku dobre pravila požarnega zidu, so naslednji:
######################################
# Požarnega zidu, ki ga sistemski nastavitveni požarni zid napisal
# Ročno prilagajanje te datoteke ni priporočljiva.
*filter
:INPUT ACCEPT [0:0]
:NAPREJ ACCEPT [0:0]
:IZHOD ACCEPT [0:0]
-Vhod -m state -državna ustanovljeno,POVEZANIH -j ACCEPT
-Vhodno -p ICMP -j ACCEPT
-Vhodno -i lo -J ACCEPT
-Vhod -m state -državna NEW -m tcp -p tcp -dport 22 -j ACCEPT
-Vhod -m state -državna NEW -m tcp -p tcp -dport 80 -j ACCEPT
-Vhod -m state -državna NEW -m tcp -p tcp -dport 3306 -j ACCEPT
-Vhod -J ZAVRNI -reject-z ICMP-gostiteljice prepovedano
-V prihodnost -J ZAVRNI -reject-z ICMP-gostiteljice prepovedano
COMMIT
#####################################
/etc / init.d / iptables restart
#Končno, ponovno zaženite požarni zid konfiguracijo, da bo učinek
systemctl stop iptables 防火墙 storitev iptables shranite systemctl ponovni zagon iptables
#写入以下内容 DEVICE=eth0 //绑定IP段的网卡名称 ONBOOT=yes //开机启用此网卡 BOOTPROTO=static //协议为静态 IPADDR_START=192.168.0.101 //网段的起始IP IPADDR_END=192.168.0.120 //网段的截止IP NETMASK=255.255.255.255 //子网掩码 CLONENUM_START=0 //这个数字是网卡别名的开始位置,比如这里的3是指eth0:0,并且会把IPADDR_START设置的IP192.168.0.101绑定到eth0:0上,以此类推 NO_ALIASROUTING=yes //这个参数的作用是数据包始终通过eth0进出,不走网卡别名(如eth0:0),设置这个参数可以加快路由的响应速度,所以强烈建议配置。
Koraki v WHM:
Prijava za SSH, in naredite naslednje:
namestitev Iftop
namestitev 1、Prevesti in namestiti
Če lahko zbere in namestite Iftop na uradni spletni strani, da prenesete najnovejši paket izvorne。
Pred namestitvijo nastajanje okolje, potrebno za osnovne potrebe, ki so bili nameščeni,Na primer, da、gcc、autoconf 等。Namestitev Iftop morali namestiti tudi libpcap in libcurses。
Potrebna za namestitev odvisnosti na CentOS:
yum namestite flex byacc libpcap ncurses ncurses-devel libpcap-raz
Potrebna za namestitev odvisnosti na Debian:
apt-get install flex byacc libpcap0.8 libncurses5
Prenos Iftop
wget http://www.ex-parrot.com/pdw/iftop/download/iftop-0.17.tar.gz
tar zxvf Iftop-0.17.tar.gz
CD Iftop-0.17
./konfiguracijo
Znamka && make install
#!/bin / sh
# crontab: */3 * * * * /koren / loadavg_restart_apache.sh >> /Wise / Ljudje / Ristart_apacheklog
sinhronizacijo
sinhronizacijo
echo 3 > /proc / sys / vm / drop_caches
TOP_SYS_LOAD_NUM = 5
SYS_LOAD_NUM = 'uptime | awk '{print $(NF-2)}’ | sed 's /, //' '
echo $(datum +”%Y-% m-% d”) `uptime`
če [ `echo “$TOP_SYS_LOAD_NUM < $SYS_LOAD_NUM”|bc` -eq 1 ]
potem
sinhronizacijo
echo “#0#” $(datum +”%Y-% m-% d% H:%M:%S”) “pkill httpd” `Ps -ef | grep httpd | wc -l`
echo “#0#” $(datum +”%Y-% m-% d% H:%M:%S”) “pkill mysql” `Ps -ef | grep mysql | wc -l`
Storitev stop httpd
Storitev stop mysql
spanje 8
pkill httpd
pkill mysql
spanje 8
za iv 1 2 3
storiti
če [ `Pgrep mysql | -V WC -l` 0 ]
potem
/sbin/service mysql start
spanje 30
echo “#1#” $(datum +”%Y-% m-% d% H:%M:%S”) “start mysql” `Ps -ef | grep mysql | wc -l`
fi
če [ `pgrep httpd | -V WC -l` 0 ]
potem
service httpd start
service wdapache start
spanje 30
echo “#1#” $(datum +”%Y-% m-% d% H:%M:%S”) “start httpd” `Ps -ef | grep httpd | wc -l`
fi
Končano
else
če [ `Pgrep mysql | -V WC -l` 0 ]
potem
/sbin/service mysql start
spanje 30
echo “#2#” $(datum +”%Y-% m-% d% H:%M:%S”) “start mysql” `Ps -ef | grep mysql | wc -l`
fi
če [ `pgrep httpd | -V WC -l` 0 ]
potem
service httpd start
spanje 30
echo “#2#” $(datum +”%Y-% m-% d% H:%M:%S”) “start httpd” `Ps -ef | grep httpd | wc -l`
fi
fi
将以上文件,保存在 /root/loadavg_restart_apa_my.sh
然后在
crontab -e
添加
*/3 * * * * /koren / loadavg_restart_apa_my.sh >> /Wise / Ljudje / Ristart_ap_mayklog
*/3 ***** Predstavlja tri minute,/root / loadavg_restart_apa_my.sh lahko prilagodite。
Step 1
Run System Backup on the old server.
Admin Tools >> System Backup
We will be backuping home directories and mysql db’s manually so Uncheck and unselect the following options on System Backup
Add user home directories to directory list below
Backup httpd data
Backup MySQL Databases
Check and Select
Backup DNS data
Backup Directories and Files listed below
All directories/files listed in bottom section of the System Backup
now click on the Run System Backup Now icon . The backup will be stored mostly in /home/backup ( it will depend upon how you have set it in DA )
Step 2
rsync the system backup to the Newserver.
root@old:~# rsync -avurz -e ssh –delete /home/backup root@Newserver_IP:/home/backup
Step 3
On the Newserver restore the system backups one by one manually.
For example, for restoring your /etc/virtual directory,
root@new:~# cd /etc
root@new:~# tar xvzfp /home/backup/<backup_date>/custom/etc/virtual.tar.gz
Please check here for the complete paths and files used on a DirectAdmin system.
( Do take extra care while restoring /etc/passwd /etc/shadow /etc/group etc.. )
Step 4
Synchronise the home directory
root@old:~# rsync -avurz -e ssh –delete /home root@Newserver_IP:/home
Step 5
Backup and restore the mysql DB’s
On Oldserver
root@old:~# cat /usr/local/directadmin/conf/mysql.conf
Get the da_admin password from the above file
root@old:~# mysqldump -u da_admin -p –all-databases > /root/all_databases.sql
root@old:~# scp /root/all_databases.sql root@Newserver_IP:/root
On Newserver
root@new:~# cat /usr/local/directadmin/conf/mysql.conf
root@new:~# mysql -u da_admin -p < /root/all_databases.sql
Step 6
Use the ipswap script to change the Oldserver IP’s
root@new:~# cd /usr/local/direactadmin/scripts/
root@new:~# ./ipswap.sh Oldserver_IP Newserver_IP
Step 7
Update the nameservers to the Newserver IP’s.
Step 8
To resolve all the queries correctly to the new server . You will have to setup the multi server dns clustering on the new server
permalink Za ogled komentarjev vnesite geslo.
permalink Za ogled komentarjev vnesite geslo.
In a situation when a lot of disk space were freed on an in-ploop filesystem, use ploop balloon discard to optimize the ploop image size.
ploop balloon discard | [–automount] [–to-free size] [–min-block min_size] [–defrag] DiskDescriptor.xml |
Iteratively try to relocate and discard unused blocks from a ploop image, reducing its size.
Note that ploop device and its inner file system should be mounted. If not, one can use –automount option to automatically mount ploop for the duration of the operation.
Option –defrag can be used to run a filesystem defragmentation utility (currently e4defrag2 on ext4 only) before the main operation.
Option –to-free can be used to specify a maximum disk space to be freed. In other words, stop the process once freed space exceeded requested size. Default is 0, meaning to try to free as much space as possible.
Option –min-block can be used to specify a minimum size of an extent to free. The smallest possible extent is 1 cluster (currently 1 MB), one can specify higher value to speed up the whole discarding operation.
Note that the same functionality is available by means of vzctl compact command.
permalink Za ogled komentarjev vnesite geslo.
HostMonster主机提供免费SSH,通过SSH导入/导出MySQL数据库还是比较方便的,具体步骤如下:
1. HostMonster主机导出MySQL数据库
下面的例子显示怎样导出一个MySQL数据库,经常将数据导出做个备份还是必要的,在命令行的操作步骤如下:
(1). mysqldump -u username -p database_name > FILE.sql
(2). Vnesite
(3). 提示输入密码
(4). 输入密码,Vnesite.
其中username, password 和 database_name 就是MySQL数据库的用户名、密码 和 数据库名。文件FILE.sql就是HostMonster主机上MySQL数据库的备份,现在可以下载到本地来保存。
2. HostMonster主机导入MySQL数据库
上传MySQL数据库备份文件(比如上面导出的文件FILE.sql)到HostMonster服务器上,然后执行如下命令:
(1). mysql -u username -p database_name < FILE.sql
(2). Vnesite
(3). 提示输入密码
(4). 输入用户名对应的密码,Vnesite.
wget http://www.kscub.com/share/mhash-0.9.9.9.tar.gz
wget http://www.kscub.com/share/libmcrypt-2.5.8.tar.gz
解决方法:
ena、先查看一下php-fpm的启动情况:(到底是不是这个问题造成的)
1 2 3 4 5 6 7 8 | [root@localhost ~] # find / -name php-fpm #查看php-fpm /www/wdlinux/init .d /php-fpm /www/wdlinux/nginx_php-5 .2.17 /sbin/php-fpm [root@localhost ~] # /www/wdlinux/init.d/php-fpm start #启动一下php-fpm 下面报错了(缺少包mhash) Starting php_fpm /www/wdlinux/nginx_php-5 .2.17 /bin/php-cgi : error while loading shared libraries: libmhash.so.2: cannot open shared object file : No such file or directory failed |
二、下载mhash包:
wget http://www.kscub.com/share/mhash-0.9.9.9.tar.gz
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | [root@localhost ~] # ls #查看一下上传的包 mhash-0.9.9.9. tar .gz [root@localhost ~] # tar xf mhash-0.9.9.9.tar.gz #解压mhash-0.9.9.9.tar.gz包 [root@localhost ~] # cd mhash-0.9.9.9 #进入到解压后生成的mhash-0.9.9.9目录中去 [root@localhost mhash-0.9.9.9] # ./configure #配置,检测安装环境 [root@localhost mhash-0.9.9.9] # make && make install #编译 && 安装 [root@localhost mhash-0.9.9.9] # ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2 [root@localhost mhash-0.9.9.9] # vim /etc/ld.so.conf.d/mhash.conf #新建的一个配置文件,往里写入:/usr/lib/ [root@localhost mhash-0.9.9.9] # cat /etc/ld.so.conf.d/mhash.conf #里面就只有:/usr/lib/ /usr/lib/ [root@localhost mhash-0.9.9.9] # ldconfig [root@localhost mhash-0.9.9.9] # /www/wdlinux/init.d/php-fpm start #再启动一下php-fpm,还是报缺少包 Starting php_fpm /www/wdlinux/nginx_php-5 .2.17 /bin/php-cgi : error while loading shared libraries: libmcrypt.so.4: cannot open shared object file : No such file or directory |
三、下载mcrypt包:
wget http://www.kscub.com/share/libmcrypt-2.5.8.tar.gz
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | [root@localhost ~] # ls #查看一下上传的包 libmcrypt-2.5.8. tar .gz [root@localhost ~] # tar xf libmcrypt-2.5.8.tar.gz #解压libmcrypt-2.5.8.tar.gz包 [root@localhost ~] # cd libmcrypt-2.5.8 #进入到解压后生成的libmcrypt-2.5.8目录中去 [root@localhost libmcrypt-2.5.8] # ./configure #配置,检测安装环境 [root@localhost libmcrypt-2.5.8] # make && make install #编译 && 安装 [root@localhost libmcrypt-2.5.8] # ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4 [root@localhost libmcrypt-2.5.8] # ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib64/libmcrypt.so.4 [root@localhost libmcrypt-2.5.8] # /www/wdlinux/init.d/php-fpm start #再次启动php-fpm,成功 Starting php_fpm don [root@localhost libmcrypt-2.5.8] # reboot #重新开机 |
小工具从v3.0.1版本开始提供
修改/重置后台用户的密码
/www/wdlinux/wdcp/shell/wdcploginchp.sh
适用于忘记了admin用户密码时可操作
修改/重置mysql的root用户密码
/www/wdlinux/wdcp/shell/mysqlrootchp.sh
适用于忘记了mysql的root用户密码时可操作
ftp用户密码检查
/www/wdlinux/wdcp/shell/pureftpconfcheck.sh
适用于FTP用户登录不了或是登录503时可操作
重置wdcp后台的登录限制
/www/wdlinux/wdcp/shell/wdcplogincip.sh
适用于在wdcp后台上设置IP/域名访问限制时设置错误时可操作
« Prejšnja stran — « Previous entries « Prejšnja stran · Next Page » Naslednji vnosi » — Next Page »