詢問IQTechnology Customer Service客服,解決方式有三:
1.將安裝檔重新命名為Setup.exe
2.使用控制台的新增或移除程式>選擇新增程式(CD或磁片)>
3.在C:\Documents and Settings\(使用者名稱)\底下新增一個資料夾名為Wi
When I copy some code from webpages and paste it to VIM,I find it becomes a mess style like a ladder as follows
Since it messed so regularly so I think maybe there's something wrong with myxxxxxx xxxxxx xxxxxx xxxxxxxxxx
.vimrc
which is as below:
Do this before:
Then after::set paste
:set nopaste
<?xml version="1.0" encoding="UTF-8"?>important:
<configuration xsixmlns="Log4j-config.xsd">
<Appenders>
<Console name="CONSOLE" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
</Console>
<RollingFile name="RollingFile_Listener" fileName="logs/SocketServerListener.log"
filePattern="logs/$${date:yyyy-MM}/SockServerListener-%d{MM-dd-yyyy}-%i.log.gz">
<Filters>
<ThresholdFilter level="INFO" onMatch="ACCEPT"
onMismatch="DENY" />
</Filters>
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
<Policies>
<TimeBasedTriggeringPolicy />
<SizeBasedTriggeringPolicy size="500 MB" />
</Policies>
<DefaultRolloverStrategy max="20" />
</RollingFile>
<RollingFile name="RollingFile_TRACE" fileName="logs/SocketServerTRACE.log"
filePattern="logs/$${date:yyyy-MM}/SockServerTRACE-%d{MM-dd-yyyy}-%i.log.gz">
<Filters>
<ThresholdFilter level="INFO" onMatch="DENY"
onMismatch="NEUTRAL" />
<ThresholdFilter level="DEBUG" onMatch="DENY"
onMismatch="NEUTRAL" />
<ThresholdFilter level="TRACE" onMatch="ACCEPT"
onMismatch="DENY" />
</Filters>
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
<Policies>
<TimeBasedTriggeringPolicy />
<SizeBasedTriggeringPolicy size="100 MB" />
</Policies>
<DefaultRolloverStrategy max="10" />
</RollingFile>
<RollingFile name="RollingFile_DEBUG" fileName="logs/SocketServerDEBUG.log"
filePattern="logs/$${date:yyyy-MM}/SockServerDEBUG-%d{MM-dd-yyyy}-%i.log.gz">
<Filters>
<ThresholdFilter level="INFO" onMatch="DENY"
onMismatch="NEUTRAL" />
<ThresholdFilter level="DEBUG" onMatch="ACCEPT"
onMismatch="DENY" />
</Filters>
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
<Policies>
<TimeBasedTriggeringPolicy />
<SizeBasedTriggeringPolicy size="200 MB" />
</Policies>
<DefaultRolloverStrategy max="10" />
</RollingFile>
<RollingFile name="RollingFile_INFO" fileName="logs/SocketServer.log"
filePattern="logs/$${date:yyyy-MM}/SockServer-%d{MM-dd-yyyy}-%i.log.gz">
<Filters>
<ThresholdFilter level="INFO" onMatch="ACCEPT"
onMismatch="DENY" />
</Filters>
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
<Policies>
<TimeBasedTriggeringPolicy />
<SizeBasedTriggeringPolicy size="500 MB" />
</Policies>
<DefaultRolloverStrategy max="20" />
</RollingFile>
</Appenders>
<Loggers>
<logger name="org.hibernate.SQL">
<level value="INFO" />
</logger>
<logger name="org.hibernate">
<level value="INFO" />
</logger>
<logger name="SocketServerStatusListener" level="INFO"
additivity="false">
<AppenderRef ref="RollingFile_Listener" />
</logger>
<Root level="INFO">
<AppenderRef ref="RollingFile_INFO" />
<AppenderRef ref="RollingFile_TRACE" />
<AppenderRef ref="RollingFile_DEBUG" />
<AppenderRef ref="CONSOLE" />
</Root>
</Loggers>
</configuration>
Installation:change to:
1) compile the source using:
Code:gcc -o maillog_watcher maillog_watcher.c -lpthread
2) move the executable and the maillog_watcher_read.sh file to /opt/maillog_watcher/
3) add the following lines to your snmpd.conf
Code:exec .1.3.6.1.4.100.2 maillog_received /opt/maillog_watcher/maillog_watcher_read.sh received
exec .1.3.6.1.4.100.4 maillog_sent /opt/maillog_watcher/maillog_watcher_read.sh sent
exec .1.3.6.1.4.100.5 maillog_virus /opt/maillog_watcher/maillog_watcher_read.sh virus
exec .1.3.6.1.4.100.6 maillog_spam /opt/maillog_watcher/maillog_watcher_read.sh spam
exec .1.3.6.1.4.100.7 maillog_rejected /opt/maillog_watcher/maillog_watcher_read.sh rejected
4) for logrotate to work, modify your /etc/logrotate.d/syslog file to send a HUP signal to maillog_watcher. mine looks like this:
Code:/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
/bin/kill -HUP `cat /var/run/maillog_watcher.pid 2> /dev/null` 2> /dev/null || true
endscript
}
5) You can now start the maillog_watcher
Attachments: |
File comment: maillog_watcher_read.sh file used to read the stats maillog_watcher_read.sh [118 Bytes] Downloaded 196 times |
File comment: maillog_watcher source file maillog_watcher.c [8.06 KiB] Downloaded 209 times |
File comment: maillog_watcher graph and data templates cacti_graph_template_maillog_watcher.xml [41.22 KiB] Downloaded 167 times |
1.首先找一下 com2sec notConfigUser default public 這一段,然後改成如下所示:(其中 10.16.25.25 是 SNMP server 的 IP address)
#com2sec notConfigUser default public2. 再來是找 group notConfigGroup v1 notConfigUser 這一段,然後改成如下所示:
com2sec local localhost public
com2sec mynetwork 10.16.25.25 public
#group notConfigGroup v1 notConfigUser3. 接著是找 view all included .1 80 這一段,然後改成如下所示:(把前面的 # 去掉)
#group notConfigGroup v2c notConfigUser
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
## incl/excl subtree mask4. 找到 #access MyROGroup "" any noauth 0 all none none 這一段,改成如下所示:
view all included .1 80
#access MyROGroup "" any noauth 0 all none none5. 再找一下 syslocation Unknown (configure /etc/snmp/snmp.conf)這一段,改成如下所示:(其中 syslocation 用來告知你機器所在的位置)
#access MyRWGroup "" any noauth 0 all all all
access MyROGroup "" any noauth prefix all none none
access MyRWGroup "" any noauth prefix all all all
syslocation GangShan
syscontact Root (configure /etc/snmp/snmp.local.conf)
Code:pass .1.3.6.1.4.1.2021.255 /usr/local/bin/fetch_mail_statistics.pl /var/log/mail.log /var/log/mailstats.db .1.3.6.1.4.1.2021.255
type=AVC msg=audit(1430250421.774:158725): avc: denied { read } for pid=22972 comm="fetch_mail_stat" name="maillog" dev=dm-0 ino=1444277 scontext=unconfined_u:system_r:snmpd_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=fileHOW DO I FIX(SKIP) this security Deny?
type=SYSCALL msg=audit(1430250421.774:158725): arch=c000003e syscall=2 success=no exit=-13 a0=1813590 a1=0 a2=1b6 a3=7f65bb021d50 items=0 ppid=2219 pid=22972 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=21015 comm="fetch_mail_stat" exe="/usr/bin/perl" subj=unconfined_u:system_r:snmpd_t:s0 key=(null)
type=AVC msg=audit(1430250421.781:158726): avc: denied { read } for pid=22973 comm="fetch_mail_stat" name="maillog" dev=dm-0 ino=1444277 scontext=unconfined_u:system_r:snmpd_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file
=================================================================================================
- The snmpd process only has access to files in /var/log labeled snmpd_log_t. The fix is to label the the file it needs to access correctly
- If its a single file then change the label on the file it needs to access. If its multiple files, then put these files in the /var/log/snmpd directory
# chcon -t snmpd_log_t /path/to/file
Process Types
SELinux defines process types (domains) for each process running on the system
You can see the context of a process using the -Z option to ps
Policy governs the access confined processes have to files. SELinux snmpd policy is very flexible allowing users to setup their snmpd processes in as secure a method as possible.
The following process types are defined for snmpd:
snmpd_t
Note: semanage permissive -a snmpd_t
can be used to make the process type snmpd_t permissive. Permissive process types are not denied access by SELinux. AVC messages will still be generated.
File Contexts
SELinux requires files to have an extended attribute to define the file type.
You can see the context of a file using the -Z option to ls
Policy governs the access confined processes have to these files. SELinux snmpd policy is very flexible allowing users to setup their snmpd processes in as secure a method as possible.
The following file types are defined for snmpd:
snmpd_exec_t
- Set files with the snmpd_exec_t type, if you want to transition an executable to the snmpd_t domain.
snmpd_initrc_exec_t
- Set files with the snmpd_initrc_exec_t type, if you want to transition an executable to the snmpd_initrc_t domain.
snmpd_log_t
- Set files with the snmpd_log_t type, if you want to treat the data as snmpd log data, usually stored under the /var/log directory.
snmpd_var_lib_t
- Set files with the snmpd_var_lib_t type, if you want to store the snmpd files under the /var/lib directory.
snmpd_var_run_t
- Set files with the snmpd_var_run_t type, if you want to store the snmpd files under the /run directory.
Note: File context can be temporarily modified with the chcon command. If you want to permanently change the file context you need to use the semanage fcontext command. This will modify the SELinux labeling database. You will need to use restorecon to apply the labels.
1
| $ sudo iptables -A INPUT -s 1.1.1.1 -p TCP -j DROP |
1
| $ sudo iptables -A INPUT -s 1.1.2.0 /24 -p TCP -j DROP |
1
2
3
4
| $ sudo iptables -A INPUT -s 1.1.1.1 -p TCP -j DROP $ sudo iptables -A INPUT -s 2.2.2.2 -p TCP -j DROP $ sudo iptables -A INPUT -s 3.3.3.3 -p TCP -j DROP . . . . |
1
| $ sudo apt-get install ipset |
1
| $ sudo yum install ipset |
1
| $ sudo ipset create banthis hash :net |
1
| $ sudo ipset list |
1
| $ sudo ipset create banthis hash :net maxelem 1000000 |
1
2
3
4
| $ sudo ipset add banthis 1.1.1.1 /32 $ sudo ipset add banthis 1.1.2.0 /24 $ sudo ipset add banthis 1.1.3.0 /24 $ sudo ipset add banthis 1.1.4.10 /24 |
1
| $ sudo ipset list |
1
| $ sudo iptables -I INPUT -m set --match- set banthis src -p tcp --destination-port 80 -j DROP |
1
2
3
| $ sudo ipset save banthis -f banthis.txt $ sudo ipset destroy banthis $ sudo ipset restore -f banthis.txt |
1
| $ sudo pip install iblocklist2ipset |
1
| $ sudo python-pip install iblocklist2ipset |
1
2
3
| $ iblocklist2ipset generate \ --ipset banthis "http://list.iblocklist.com/?list=ydxerpxkpcfqjaybcssw&fileformat=p2p&archiveformat=gz" \ > banthis.txt |
1
2
3
4
5
6
7
8
| create banthis hash :net family inet hashsize 131072 maxelem 237302 add banthis 1.2.4.0 /24 add banthis 1.2.8.0 /24 add banthis 1.9.75.8 /32 add banthis 1.9.96.105 /32 add banthis 1.9.102.251 /32 add banthis 1.9.189.65 /32 add banthis 1.16.0.0 /14 |
1
| $ sudo ipset restore -f banthis.txt |
1
| $ sudo ipset list banthis |
[wmi/wmic.c:212:main()] ERROR: Retrieve result data.一直尋找,終於在這邊找到一部份原因:
NTSTATUS: NT code 0x80041010 - NT code 0x80041010
原因:未知 症狀:windows點任何文件,都無法拖動到其他地方 解決方式: 來源: https://answers.microsoft.com/en-us/windows/forum/all/drag-and-drop-stopped-working/b73e4938-ca2...