分类: LINUX
2006-02-26 11:50:33
Table of Contents | |
---|---|
|
My Fedora Core 3 Webserver Setup |
---|
1. Download and burn disk one of Fedora Core 3. 2. During the install, select custom, minimum install. Check the services needed in the firewall config. Check System time uses UTC. 3. Turn off IPv6 by adding "alias net-pf-10 off" and "alias ipv6 off" by using nano /etc/modprobe.conf and reboot. 4. Setup yum. (See Yum Setup.) 5. yum --exclude=php-snmp install php*, then install mysql-server, elinks, lynx, bind*, dovecot, vsftpd, spamassassin, sendmail-cf, perl-Crypt-SSLeay, openssl, openssl-perl, openssl-devel, gcc, gcc-c++. 6. Using lynx install webmin from and add it to the firewall. 7. Using lynx install clamav from 8. Turn off these services - cups, isdn, netfs, nfslock, portmap, pcmcia, rhsnd (unless you have a Redhat account), rpc*, and smartd (if running SCSI). 9. Turn on these services - clamd, dovecot, httpd, mysqld, named, and spamassassin. 10. Run a yum update and reboot. 11. Setup mysql and httpd in SELinux. (See httpd/mysql/SELinux setup.) 12. Setup procmail, spamassassin, clamav. (See Clean Email.) 13. Edit /etc/ssh/sshd_conifg set #PermitRootLogin no and #MaxAuthTries 2 14. Edit /etc/log.d/conf/logwatch.conf replacing "root" with a real email address. 15. Thats all for now - more to come. |
Yum Setup |
Yum can do waaaay more than what I got here. I may or may not cover the other stuff later. Run:
rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora |
httpd/mysql/SELinux Setup |
Give apache permission to user directories if needed. If your are running your site from /var/html skip to MySQL:
chcon -R -h -t httpd_sys_content_t /home/www/site1 It should show somthing like: drwxr-xr-x username username user_u:object_r:httpd_sys_content_t MySQL:
yum install selinux-policy-targeted-sources Edit or replace your mysqld.te file with the one below It adds the "# connect to mysql" section. Also make sure you do the "make load" from /etc/selinux/targeted/src/policy directory.
#DESC Mysqld - Database server Then do:
cp mysqld.te /etc/selinux/targeted/src/policy _________________________________________ This FC3 fix was pieced together with info from: |
Clean Email |
1. Get clamassassin from 2. tar -xvzf it and go into the directory. 3. "./configure --enable-clamdscan --enable-subject-rewrite=[VIRUS]" 4. "make install" 5. From webmin >> spamassassin >> Miscellaneous Options >> Can SpamAssassin do DNS lookups? to yes. 6. Setup up procmail. (After looking at this I wondered how out of date it is. Does procmail still drop the "F" from "From:"? It works, but I will look in to it.)
#MAILDIR=$HOME/mail |