系统升级阿里云FreeBSD系统默认安装版本为10.1。该版本已经超过官方维护时间,必须先升级系统版本。设置当前系统版本为10.1-release,setenvUNAME_r"10.1-RELEASE"修改更新源,默认的官方源由于某些原因很慢而且很疯狂,所以我们不得不使用镜像源。这里推荐使用chinafreebsd.vi的更新源/etc/freebsd-update.conf注释掉官方更新源#ServerNameupdate.FreeBSD.org添加chinafreebsd的更新源ServerNameupdate1.chinafreebsd.cn升级系统到10.3-release获取系统升级信息freebsd-updateupgrade-r10.3-RELEASEinstallfreebsd-updateinstall合并过程中可能会出现一些文件冲突,需要手动解决冲突,解决冲突类似gitrestartreboot再次执行freebsd-updateinstall执行freebsd-version-k-u查看升级结果安装Posgresql当前版本的mariadb在新安装时有BUG,执行有问题。所以我安装了另一个最喜欢的数据库,Postgresqlmariadb。bug已经修复,后面会添加mariadb的安装。启动数据库服务installPHPpkginstallphp71php71-pdophp71-pdo_pgsqlphp71-opensslphp71-bz2php71-mbstringphp71-xmlphp71-jsonphp71-gdphp71-filterphp71-pharphp71-calendarphp71-ctypephp71-curlphp71-exifphp71-bcmathphp71-domphp71-dbaphp71-fileinfophp71-iconvphp71-tokenizerphp71-zlibphp71-session上面是一条命令sysrcphp_fpm_enable=YESservicephp-fpmstartinstallnginxpkginstallnginxsysrcnginx_enable=YES#自启动服务nginxstart配置Nginx稍微安装Mariadbpkginstallmariadb102-servermariadb102-clientsysrcmysql_ebable=YEScp/usr/local/share/mysql/my-medium.cnf/usr/local/etc/my.cnfservicemysql-serverstart
