差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

Both sides previous revision 前次修改
下次修改
前次修改
freebsd [2016/09/28 02:30]
127.0.0.1
freebsd [2017/10/04 23:23] (目前版本)
jz [Upgrade to next release]
行 11: 行 11:
 </​code>​ </​code>​
 相關設定可以參考 VT100 相關設定可以參考 VT100
 +
 +===== reverse search =====
 +在 .cshrc 中加入以下
 +<​code>​
 +bindkey "​^R"​ i-search-back
 +</​code>​
 +
 +==== checkout src ====
 +安裝 svn
 +<​code>​
 +pkg install subversion
 +</​code>​
 +
 +<​code>​
 +svn checkout https://​svn.FreeBSD.org/​base/​releng/​11.0 /usr/src
 +svn up /usr/src
 +cd /usr/src; make clean
 +</​code>​
 +
 +===== Upgrade to next release =====
 +<​code>​
 +# install latest updates from current release
 +freebsd-update fetch
 +freebsd-update install
 +# switch to next release version
 +freebsd-update upgrade -r 10.3-RELEASE
 +freebsd-update install
 +# restart
 +reboot
 +# install again to finish installing updates
 +freebsd-update install
 +# upgrade packages
 +pkg upgrade
 +freebsd-update install
 +# roll back if needed
 +freebsd-update rollback
 +</​code>​
 +
 +===== FAMP =====
 +
 +==== install apache ====
 +<code bash>
 +sudo pkg install apache24
 +sudo sysrc apache24_enable=yes
 +sudo service apache24 start
 +</​code>​
 +
 +==== install mysql ====
 +<code bash>
 +sudo pkg install mysql56-server
 +sudo sysrc mysql_enable=yes
 +sudo service mysql-server start
 +
 +sudo mysql_secure_installation
 +</​code>​
 +
 +==== install php ====
 +<code bash>
 +sudo pkg install mod_php56 php56-mysql php56-mysqli
 +sudo cp /​usr/​local/​etc/​php.ini-production /​usr/​local/​etc/​php.ini
 +rehash
 +</​code>​
 +
 +=== setting for apache to use index.php ===
 +
 +<code bash>
 +sudo vi /​usr/​local/​etc/​apache24/​Includes/​php.conf
 +</​code>​
 +
 +content of php.conf
 +<​code>​
 +<​IfModule dir_module>​
 +    DirectoryIndex index.php index.html
 +    <​FilesMatch "​\.php$">​
 +        SetHandler application/​x-httpd-php
 +    </​FilesMatch>​
 +    <​FilesMatch "​\.phps$">​
 +        SetHandler application/​x-httpd-php-source
 +    </​FilesMatch>​
 +</​IfModule>​
 +</​code>​
 +
 +==== test out if php works ====
 +<code bash>
 +sudo vi /​usr/​local/​www/​apache24/​data/​info.php
 +</​code>​
 +
 +content of info.php
 +<code php>
 +<?php phpinfo(); ?>
 +</​code>​
 +
 +if works, remove info.php
 +<code bash>
 +sudo rm /​usr/​local/​www/​apache24/​data/​info.php
 +</​code>​
 +
 +===== phpmyadmin =====
 +<code bash>
 +sudo pkg install phpmyadmin
 +</​code>​
 +
 +<code apache>
 +Alias /​phpmyadmin/​ "/​usr/​local/​www/​phpMyAdmin/"​
 +
 +<​Directory "/​usr/​local/​www/​phpMyAdmin/">​
 +Options None
 +AllowOverride Limit
 +
 +#Require local
 +#Require host.example.com
 +Require all granted
 +
 +</​Directory>​
 +</​code>​
 +
 +Go to ''​example.com/​phpmyadmin/​setup''​ to create an new config file, then apply it
 +<code bash>
 +sudo cp /​usr/​local/​www/​phpMyAdmin/​config/​config.inc.php /​usr/​local/​www/​phpMyAdmin/​config.inc.php
 +</​code>​
 +
 +===== vsftp =====
 +<code bash>
 +sudo pkg install vsftpd-ext
 +sudo pkg install pam_pwdfile
 +</​code>​
  
 ===== Jail ===== ===== Jail =====
行 128: 行 254:
   * https://​gist.github.com/​tracphil/​4353170   * https://​gist.github.com/​tracphil/​4353170
   * http://​wiki.weithenn.org/​cgi-bin/​wiki.pl?​PF-%E5%88%A9%E7%94%A8_PF_%E8%BC%95%E9%AC%86%E9%81%94%E6%88%90_NAT   * http://​wiki.weithenn.org/​cgi-bin/​wiki.pl?​PF-%E5%88%A9%E7%94%A8_PF_%E8%BC%95%E9%AC%86%E9%81%94%E6%88%90_NAT
 +
 +
 +===== build kernel =====
 +https://​www.freebsd.org/​doc/​handbook/​makeworld.html