FreeBSD A 95/10/11 19:00~21:00 95/10/11 FreeBSD 練 1
Services Setup SSH, lighttpd, PHP, MySQL, FTP, Postfix, phpmyadmin, Blog, Gallery 95/10/11 FreeBSD 練 2
1. 2. # FreeBSD # 3. vi ee joe nano etc 95/10/11 FreeBSD 練 3
95/10/11 FreeBSD 練 4
PC-BSD http://www.pcbsd.org 95/10/11 FreeBSD 練 5
PC-BSD FreeBSD BSD KDE (PBI) http://www.pbidir.com 95/10/11 FreeBSD 練 6
Exercise 0 PBI PC-BSD Firefox 95/10/11 FreeBSD 練 7
95/10/11 FreeBSD 練 8
Service 95/10/11 FreeBSD 練 9
SSH Secure Shell http://zh.wikipedia.org/wiki/ssh 95/10/11 FreeBSD 練 10
SSH (Telnet FTP) SSH 95/10/11 FreeBSD 練 11
SSH /etc/rc.conf sshd_enable="yes" SSH /etc/rc.d/sshd start 95/10/11 FreeBSD 練 12
SSH /etc/ssh/sshd_config Port 22 PermitRootLogin no 95/10/11 FreeBSD 練 13
Windows SSH FreeBSD 95/10/11 FreeBSD 練 14
Open Source A Free Telnet/SSH Client putty http://www.putty.nl 95/10/11 FreeBSD 練 15
PieTTY http://www.csie.ntu.edu.tw/~piaip/pietty/ 95/10/11 FreeBSD 練 16
A secure, fast, compliant, and very flexible Web Server lighttpd Light footprint + httpd = LightTPD http://www.lighttpd.net/ 95/10/11 FreeBSD 練 17
lighttpd cd /usr/ports/www/lighttpd make install clean Options for lighttpd [ X ] MYSQL 95/10/11 FreeBSD 練 18
Options for lighttpd 95/10/11 FreeBSD 練 19
95/10/11 FreeBSD 練 20
lighttpd /etc/rc.conf lighttpd_enable="yes mkdir /usr/local/www/data ( ) && cd /var/log touch lighttpd.access.log lighttpd.error.log chown www:www lighttpd.access.log chown www:www lighttpd.error.log 95/10/11 FreeBSD 練 21
lighttpd /usr/local/etc/lighttpd.conf mod_fastcgi, (# ) fastcgi.server = (.php => ( "localhost" => ( "socket" => "/tmp/php-fastcgi.socket", "bin-path" => "/usr/local/bin/php-cgi" ) ) ) lighttpd /usr/local/etc/rc.d/lighttpd start 95/10/11 FreeBSD 練 22
PHP: Hypertext Preprocessor PHP http://php.net Personal HomePage 95/10/11 FreeBSD 練 23
PHP cd /usr/ports/lang/php5 make install clean Options for php5 95/10/11 FreeBSD 練 24
php5-extensions php5-extensions cd /usr/ports/lang/php5-extensions make install clean Options for php5-extensions [ X ] MYSQL MySQL database support lighttpd /usr/local/etc/rc.d/lighttpd restart 95/10/11 FreeBSD 練 25
/usr/local/www/data/index.php [IP]/index.php HTML PHP Exercise 1 PCBSD Firefox Konqueror http://localhost/index.php 95/10/11 FreeBSD 練 26
The World s Most Popular Open Source Database MySQL http://mysql.org 95/10/11 FreeBSD 練 27
MySQL cd /usr/ports/databases/mysql51-server/ make install clean /etc/rc.conf mysql_enable="yes" MySQL /usr/local/etc/rc.d/mysql-server start 95/10/11 FreeBSD 練 28
MySQL MySQL ( ) mysqladmin -u root password [ ] MySQL mysqladmin -u root -p password [ ] Enter password: 95/10/11 FreeBSD 練 29
ProFTPD vsftpd FTP pure-ftpd File Transfer Protocol wu-ftpd 95/10/11 FreeBSD 練 30
proftpd cd /usr/ports/ftp/proftpd make install clean Options for proftpd 95/10/11 FreeBSD 練 31
proftpd /etc/rc.conf proftpd_enable="yes" proftpd /usr/local/etc/rc.d/proftpd start 95/10/11 FreeBSD 練 32
95/10/11 FreeBSD 練 33
proftpd - IPv4 getaddrinfo ' sata.localdomain ' error: hostname nor servname provided, or not known - warning: unable to determine IP address of 'sata.localdomain' - error: no valid servers configured - Fatal: error processing configuration file '/usr/local/etc/proftpd.conf' 95/10/11 FreeBSD 練 34
FTP Server 95/10/11 FreeBSD 練 35
( ) /etc/hosts 127.0.0.1 Ex: 127.0.0.1 localhost localhost.my.domain sata.localdomain proftpd 95/10/11 FreeBSD 練 36
postfix http://www.postfix.org 95/10/11 FreeBSD 練 37
postfix cd /usr/ports/mail/postfix make install clean Options for postfix 95/10/11 FreeBSD 練 38
postfix You need user "postfix" added to group "mail". Would you like me to add it [y]? yes Would you like to activate Postfix in /etc/mail/mailer.conf [n]? yes 95/10/11 FreeBSD 練 39
postfix rc.conf postfix_enable="yes" sendmail_enable="none" postfix /usr/local/etc/rc.d/postfix start 95/10/11 FreeBSD 練 40
mail -s [ ] [ ] < [ ] Ex: mail -s 955004001@cc.ncu.edu.tw < /etc/rc.conf Exercise 2 rc.conf 95/10/11 FreeBSD 練 41
phpmyadmin http://www.phpmyadmin.net 95/10/11 FreeBSD 練 42
phpmyadmin cd /usr/ports/databases/phpmyadmin make install clean Options for phpmyadmin 95/10/11 FreeBSD 練 43
phpmyadmin cd /usr/local/www/data ln -s../phpmyadmin/ phpmyadmin phpmyadmin http://[ip]/phpmyadmin/ 95/10/11 FreeBSD 練 44
phpmyadmin cd /usr/local/www/phpmyadmin cp config.sample.inc.php config.inc.php config.inc.php $cfg['servers'][$i]['auth_type'] = 'http'; $cfg['servers'][$i]['controluser'] = ' '; $cfg['servers'][$i]['controlpass'] = ' '; 裡 95/10/11 FreeBSD 練 45
Blog 95/10/11 FreeBSD 練 46
Wordpress http://wordpress.org 95/10/11 FreeBSD 練 47
Wordpress cd /usr/ports/www/wordpress make install clean 95/10/11 FreeBSD 練 48
Wordpress MySQL 95/10/11 FreeBSD 練 49
Second Step admin Now you can log in with the username "admin" and password "df5fc1". http://[ip]/wordpress/ create a wp-config.php file through a web interface 95/10/11 FreeBSD 練 50
95/10/11 FreeBSD 練 51
Gallery http://gallery.menalto.com 95/10/11 FreeBSD 練 52
Gallery2 cd /usr/ports/www/gallery2 make install clean cd /usr/local/www/data ln -s../gallery2/ gallery2 95/10/11 FreeBSD 練 53
Gallery2 MySQL 95/10/11 FreeBSD 練 54
http://[ip]/gallery2/ 95/10/11 FreeBSD 練 55
The End shell scripts - tcsh, bash 95/10/11 FreeBSD 練 56