OpenSolaris rsync install script
OpenSolaris rsync install script #!/bin/bash # OpenSolaris rsync installer # Created by 4Aiur on 2010-12-21. # define function check_rsync_config () { if [ ! -d /opt/local/etc/rsync/ ]; then mkdir -p /opt/local/etc/rsync/ fi if [ ! -f /opt/local/etc/rsync/rsyncd.conf ]; then cat > /opt/local/etc/rsync/rsyncd.conf /opt/local/etc/rsync/rsyncd.secrets /var/svc/manifest/network/rsync.xml RSYNC daemon EOF fi } rotate_log () { logadm -w rsync […]
Logrotate on OpenSolaris
Logrotate on OpenSolaris On OpenSolaris, you use the logadm command, with the actual rotation being specified in /etc/logadm.conf logadm -v -w rsync -s 10m -C 10 \ -t ‘/var/log/rsync.log.%Y-%m’ \ -a ‘/usr/sbin/svcadm restart rsync’ \ /var/log/rsync.log Testing with logadm -p now rsync seems to work just fine.
OpenSolaris net-snmp install script
OpenSolaris net-snmp install script #!/bin/bash # OpenSolaris net-snmp installer # Created by 4Aiur on 2010-12-14. # define function check_netsnmp_config () { if [ ! -f /var/net-snmp/snmpd.local.conf ]; then cat > /var/net-snmp/snmpd.local.conf ############################################################################### # Process checks. # Make sure sshd is running proc sshd ############################################################################### # disk checks # disk PATH [MIN=DEFDISKMINIMUMSPACE] # Check the / […]
在OpenSolais上的安装与配置awstats
在OpenSolais上的安装与配置awstats 安装awstats # pkgin in awstats 安装GeoIP # pkgin in GeoIP 安装perl的GeoIP模块 # Geo::IP::PurePerl # wget http://geolite.maxmind.com/download/geoip/api/pureperl/Geo-IP-PurePerl-1.25.tar.gz # gtar zxf Geo-IP-PurePerl-1.25.tar.gz # cd Geo-IP-PurePerl-1.25 # perl Makefile.PL # make # make test # make install 下载GeoCity库 # wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz # gzip -d GeoLiteCity.dat.gz # mv GeoLiteCity.dat /opt/local/share/GeoIP/ 配置apache的虚拟主机 # cd /opt/local/etc/httpd/virtualhosts/ # vi blog.4aiur.net.conf ServerName […]
在OpenSolaris上安装与配置proftpd
在OpenSolaris上安装与配置proftpd Install proftpd # pkgin in proftpd Setup proftpd proftpd configuration examples /opt/local/share/examples/proftpd modify /opt/local/etc/proftpd.conf TimeoutLogin 120 TimeoutIdle 600 TimeoutNoTransfer 900 TimeoutStalled 3600 RootLogin off DefaultRoot ~ UseReverseDNS off IdentLookups off #VALID LOGINS AllowUser ftpuser DenyALL Setup openSolaris SMF # vi /var/svc/manifest/network/proftpd.xml ProFTPD Server # svccfg import /var/svc/manifest/network/proftpd.xml # svcadm enable proftpd # svcs proftpd