truncate -s 0 /var/log/*log
or
find . -type f -exec sh -c ‘>{}’ \;
truncate -s 0 /var/log/*log
or
find . -type f -exec sh -c ‘>{}’ \;
rcconf
sysv-rc-conf
To check status simply: service –status-all
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
apt-get install iptables-persistent
/etc/init.d/iptables-persistent save
/etc/init.d/iptables-persistent reload
Webmin/Virtualmin issue:
If you don”t need it to create DNS records, you could always uncheck the “DNS Domain” feature when creating the Virtual Server
add-apt-repository ppa:ondrej/php
apt-get update
apt-get -y install php5.6
curl http://nginx.org/keys/nginx_signing.key | apt-key add -
echo -e "deb http://nginx.org/packages/mainline/ubuntu/ `lsb_release -cs` nginx\ndeb-src http://nginx.org/packages/mainline/ubuntu/ `lsb_release -cs` nginx" > /etc/apt/sources.list.d/nginx.list
apt-get update
apt-get install nginx
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc5 in position 92: ordinal not in range(128) fix:
locale-gen en_US.UTF-8
export LANG=en_US.UTF-8
Because of too many authentication failures
/var/webmin/blocked
/etc/webmin/miniserv.users
PHP settings: use “0” and not “-1”
server {
...
large_client_header_buffers 4 16k;
...
}
Error: [core:emerg] [pid 10804:tid 140601303058368] (28)No space left on device: AH00023: Couldn’t create the ssl-cache mutex
ipcs | grep apache | awk '{print $2}' > sem.txt
for i in `cat sem.txt`; do { ipcrm -s $i; }; done;
You can try to avoid such issues:
vi /etc/sysctl.conf
kernel.sem = 250 256000 32 1024
sysctl -p
vi /root/bin/sem.sh
#!/bin/bash
for i in $(ipcs -s | grep apache | awk '{print $2}'); do ipcrm sem $i; done && service httpd restart
crontab -e
MAILTO=""
@daily /root/bin/sem.sh
piped log program ‘ /usr/local/ispconfig/server/scripts/vlogger -s access.log -t “%Y%m%d-access.log” /var/log/ispconfig/httpd’ failed unexpectedly
Fix:
yum install perl-TimeDate
< file tee file-{001..200}
also like this:
for i in {000..199}; do cp file file-$i; done
lsof | grep ' root ' | awk '{print $NF}' | sort | wc -l