service httpd start service httpd stop
httpd -v => Server version: Apache/2.2.3 Server built: Jan 21 2009 22:01:41
Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more.
http://doxfer.com/Webmin/Modules http://www.webmin.com/
yum -y install perl perl-Net-SSLeay openssl perl-IO-Tty perl-Encode-Detect
wget http://prdownloads.sourceforge.net/webadmin/webmin-1.930-1.noarch.rpm rpm -U webmin-1.930-1.noarch.rpm
with webmin new version: we copy the webmin source to /usr/local before setup
./setup.sh => install from source with default port: 10000
/etc/webmin/uninstall.sh
refer:
Below are steps to Install Webmin on Windows:
cd c:\webmin ppm install Win32-Daemon
perl setup.pl
With configs below:
For config, type "c:\etc" For logs, type "c:\temp" type 10000 for port no ssl
/etc/webmin/miniserv.conf
/etc/webmin/start
/etc/webmin/stop
All users and pass of webmin store in /etc/webmin/miniserv.users
./changepass.pl /etc/webmin/ admin admin@123
tar czpf custom.tar.gz custom/ scp custom.tar.gz root@10.30.31.131:/etc/webmin/ tar xf custom.tar.gz cp custom/* /et/web/custom1
phpMyAdmin is a free software tool written in PHP intended to handle the administration of MySQL over the World Wide Web
http://www.atomicorp.com/wiki/index.php/PHP
phpMyAdmin-3.2.0.1-english/Documentation.txt
at least PHP 5.2 and MySQL 5
service httpd restart (or) /etc/init.d/httpd restart
<?php phpinfo(); ?> check http://192.168.191.128/phpinfo.php
yum list | grep mysql => mysql.i386 5.0.83-1.el5.art installed mysql-devel.i386 5.0.83-1.el5.art installed mysql-libs.i386 5.0.83-1.el5.art installed mysql-server.i386 5.0.83-1.el5.art installed php-mysql.i386 5.2.9-2.el5.art installed php-mcrypt.i386 5.2.9-2.el5.art installed
chkconfig httpd on chkconfig mysqld on
check https://192.168.191.128/phpMyAdmin user permissions: root
=> you must click "change administration password" on webmin before login to phpMyAdmin
/usr/local/squid/var/logs/cache.log: Permission denied cat /var/log/messages Sep 10 00:54:13 GWServer01-DT05 squid: Cannot open
chown -R nobody.nobody /usr/local/squid/var user squid
service vsftpd start service vsftpd stop chkconfig --level 345 vsftpd on chkconfig --list vsftpd
/etc/vsftpd/vsftpd.conf /etc/vsftpd/ftpusers /etc/vsftpd/user_list
userlist_deny=YES userlist_enable=YES userlist_file=/etc/vsftpd/user_list
⇒ any user listed in /etc/vsftpd/user_list is NOT allowed to log in via FTP
userlist_deny=NO userlist_enable=YES userlist_file=/etc/vsftpd/user_list
⇒ any user listed in the file /etc/vsftpd/user_list is now allowed to log in via FTP
If you want to share home directories via ftp please run:
setsebool -P ftp_home_dir 1
Open port 21 for FTP:
*filter :INPUT ACCEPT [396:30624] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [216:23216] -A INPUT -p tcp -m state --state RELATED,ESTABLISHED -j ACCEPT #eth0 INPUT here -A INPUT -i eth0 -p tcp -m tcp --dport 2222 -j ACCEPT -A INPUT -i eth0 -p tcp -m tcp --dport 80 -j ACCEPT -A INPUT -i eth0 -p tcp -m tcp --dport 9999 -j ACCEPT -A INPUT -s 118.70.109.139 -i eth0 -p tcp -m tcp --dport 21 -j ACCEPT -A INPUT -p udp -i eth0 --sport 53 -j ACCEPT -A INPUT -i eth0 -p tcp -m tcp --dport 4324 -j ACCEPT -A INPUT -i eth0 -p tcp -m tcp --dport 4325 -j ACCEPT -A INPUT -i eth0 -p icmp -j ACCEPT -A INPUT -i eth0 -j DROP #eth1 INPUT here -A INPUT -i eth1 -p icmp -j ACCEPT -A INPUT -i eth1 -j DROP COMMIT
And addition ftp will use a random higher port. To allow this you need to load the ip_conntrack_ftp module on boot. Uncomment and modify the IPTABLES_MODULES line in the /etc/sysconfig/iptables-config file to read:
IPTABLES_MODULES="ip_conntrack_ftp"
yum install samba.i386
service smb start service smb stop
/var/log/samba/smbd.log
setsebool -P samba_enable_home_dirs on create /home/share
cd /home/anhvc/.ssh ssh-keygen -t rsa -b 2048 ssh-keygen -t dsa -b 1024
⇒ output:
id_rsa(or id_dsa) => private key(secrect key => authenticate for user anhvc id_rsa.pub(or id_dsa.pub) => public key
In case error “Saving ssh key fails”, you remove old directory .ssh and run again the command generate keys
rm -rf ~/.ssh
mkdir -p .ssh or ssh-keygen -t dsa -b 1024 chmod 700 ~/.ssh touch .ssh/authorized_keys chmod 644 .ssh/authorized_keys
Sometimes you may do something to mess up these permissions. Run the following to fix most permissions problems. You may have to do this on both the remote host and local host.
chmod 700 ~/.ssh chmod 600 ~/.ssh/id_rsa chmod 644 ~/.ssh/id_rsa.pub chmod 644 ~/.ssh/authorized_keys chmod 644 ~/.ssh/known_hosts
convert id_dsa to id_dsa.ppk for putty
The structure of email system contain 3 components: MUA(Mail User Agent), MTA(Mail Transfer Agent) and MDA(Mail Delivery Agent)
Figure: Basic Components of Email System
Email flows through the mail server components as follows:
An application with which users can create, view, send, and receive email. The MUA is located on a client system, such as a workstation or PC.
mail -s “Hello world” anhvc@vinagame.com.vn This is a test from my server Ctrl+D
An application that sends, receives, and stores email. This program determines where and how to store email.
An application that saves received email to the MSA. This program might also perform additional tasks such as filtering email or delivering email to subfolders.
The Postfix, Dovecot, and Cyrus applications each implement some or all of the functions of the MDA.
A local system or server where the MTA stores email. This is also the location from which the MSS retrieves email at the request of the MUA.
An application that retrieves email from the MSA and returns it to the MUA.
Network Time Protocol(NTP) provides accurate and syncronised time across the Internet.
http://www.akadia.com/services/ntp_synchronize.html
we know that NTP clients can operate with NTP servers in three ways:
architecture:
script:
/usr/sbin/ntpdate -s -b -p 8 -u 10.30.31.127
Open Iptable firewall:
-A INPUT -i eth0 -p udp -m multiport --dports 123,161 -j ACCEPT
Or
-A INPUT -p udp -i eth0 --dport 123 -j ACCEPT -A INPUT -p udp -i eth0 --dport 161 -j ACCEPT
ps -eaf | grep nfs
yum install nfs-utils nfs-utils-lib
/etc/init.d/rpcbind start /etc/init.d/nfs start
/work *(rw,no_root_squash,sync)
⇒ directory /work was exported and all host can use it
/databk/ztbackup/logzt 192.168.0.12(ro,no_root_squash) /databk/ztbackup/logzt 10.30.3.42(ro,no_root_squash) /databk/ztbackup/logzt 10.30.3.43(ro,no_root_squash) /databk/ztbackup/logzt 10.30.3.44(ro,no_root_squash) /databk/ztbackup/logzt 10.30.3.45(ro,no_root_squash) /databk/ztbackup/logzt 10.30.3.46(ro,no_root_squash)
⇒ directory /databk/ztbackup/logzt was exported and only hosts 192.168.0.12,10.30.3.42….46 can use it
/usr/sbin/exportfs -a /usr/sbin/exportfs
⇒ display configuration of nfsserver
Linux:
/etc/init.d/nfs restart
debian:
/etc/init.d/nfs-kernel-server restart
mkdir /work chmod 777 /work Copy rootfs from CD(2007WLP) to /work/rootfs-sgwp-080403-2-wtk.tar.bz2 and extract it.
Below are steps config in client with mount:
yum install nfs-utils nfs-utils-lib
10.30.31.8:/databk/ztbackup/db /data/dbzt nfs defaults 0 0 10.30.31.8:/databk/ztbackup/logzt /data/countitem/logzt nfs defaults 0 0 10.30.31.8:/databk/ztbackup/dbreport /var/lib/mysql nfs defaults 0 0
mount -a
Check nfs server with mount command:
mount 10.30.31.8:/databk/ztbackup/db /data/dbzt
umount 10.30.31.8:/databk/ztbackup/db /data/dbzt
/etc/default/snmpd snmpwalk -v2c -c public 10.30.43.10