差異處

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

連向這個比對檢視

Both sides previous revision 前次修改
下次修改
前次修改
freebsd [2016/11/28 16:26]
jz
freebsd [2017/10/04 23:23] (目前版本)
jz [Upgrade to next release]
行 30: 行 30:
 </​code>​ </​code>​
  
-===== Apache ​=====+===== 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> <code bash>
 sudo pkg install apache24 sudo pkg install apache24
 sudo sysrc apache24_enable=yes sudo sysrc apache24_enable=yes
 sudo service apache24 start sudo service apache24 start
 +</​code>​
  
 +==== install mysql ====
 +<code bash>
 sudo pkg install mysql56-server sudo pkg install mysql56-server
 sudo sysrc mysql_enable=yes sudo sysrc mysql_enable=yes
行 42: 行 65:
  
 sudo mysql_secure_installation sudo mysql_secure_installation
 +</​code>​
  
 +==== install php ====
 +<code bash>
 sudo pkg install mod_php56 php56-mysql php56-mysqli sudo pkg install mod_php56 php56-mysql php56-mysqli
 sudo cp /​usr/​local/​etc/​php.ini-production /​usr/​local/​etc/​php.ini sudo cp /​usr/​local/​etc/​php.ini-production /​usr/​local/​etc/​php.ini
 rehash rehash
 +</​code>​
  
 +=== setting for apache to use index.php ===
 +
 +<code bash>
 sudo vi /​usr/​local/​etc/​apache24/​Includes/​php.conf sudo vi /​usr/​local/​etc/​apache24/​Includes/​php.conf
 </​code>​ </​code>​
行 78: 行 108:
 </​code>​ </​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 =====