1月19
想重启nginx,在网上搜过很多教程,都是老版本的nginx的启动脚本。
ports安装的nginx 0.7.64,突然灵感来了,执行-h试试,发现有-s参数可对nginx服务进行管理:
# /usr/local/sbin/nginx -h
nginx version: nginx/0.7.64
Usage: nginx [-?hvVt] [-s signal] [-c filename] [-p prefix] [-g directives]
Options:
-?,-h : this help
-v : show version and exit
-V : show version and configure options then exit
-t : test configuration and exit
-s signal : send signal to a master process: stop, quit, reopen, reload
-p prefix : set prefix path (default: /usr/local/etc/nginx/)
-c filename : set configuration file (default: /usr/local/etc/nginx/nginx.conf)
-g directives : set global directives out of configuration file
于是乎,再执行:
# /usr/local/sbin/nginx -s stop
OK,停止了nginx服务,直接执行nginx为启动nginx服务。
ports安装的nginx 0.7.64,突然灵感来了,执行-h试试,发现有-s参数可对nginx服务进行管理:
# /usr/local/sbin/nginx -h
nginx version: nginx/0.7.64
Usage: nginx [-?hvVt] [-s signal] [-c filename] [-p prefix] [-g directives]
Options:
-?,-h : this help
-v : show version and exit
-V : show version and configure options then exit
-t : test configuration and exit
-s signal : send signal to a master process: stop, quit, reopen, reload
-p prefix : set prefix path (default: /usr/local/etc/nginx/)
-c filename : set configuration file (default: /usr/local/etc/nginx/nginx.conf)
-g directives : set global directives out of configuration file
于是乎,再执行:
# /usr/local/sbin/nginx -s stop
OK,停止了nginx服务,直接执行nginx为启动nginx服务。
1月18
ports安装MySQL5.5-server的时候,执行:
#make WITH_CHARSET=gbk WITH_XCHARSET=all WITH_COLLATION=gbk_chinese_ci BUILD_STATIC=yes install clean
系统提示:
mysql-server-5.5.1 cannot install: MySQL versions mismatch: mysql50-client is installed and wanted version is mysql55-client.
*** Error code 1.
原因:在安装php5-extensions的时候,将安装过程中,MySQL的选项给选中了,所以在那个时候就安装了mysql-client。
解决方法:
1、先查出安装的MySQL版本
# cd /var/db/pkg
# ls -l | grep mysql
找到mysql-client-5.0.29
2、卸载所安装的mysql(如果找到mysql-server也一并卸载)
# pkg-delete -f mysql-client-5.0.29 // -f为强制卸载
3、重新启动系统,并重新执行命令安装mysql即可。
说明:
卸载有两种方法(推荐使用pkg_delete):
# cd /usr/ports/databases/mysql50-client/
# make deinstall clean
或
# pkg_delete mysql-client-5.0.29
#make WITH_CHARSET=gbk WITH_XCHARSET=all WITH_COLLATION=gbk_chinese_ci BUILD_STATIC=yes install clean
系统提示:
mysql-server-5.5.1 cannot install: MySQL versions mismatch: mysql50-client is installed and wanted version is mysql55-client.
*** Error code 1.
原因:在安装php5-extensions的时候,将安装过程中,MySQL的选项给选中了,所以在那个时候就安装了mysql-client。
解决方法:
1、先查出安装的MySQL版本
# cd /var/db/pkg
# ls -l | grep mysql
找到mysql-client-5.0.29
2、卸载所安装的mysql(如果找到mysql-server也一并卸载)
# pkg-delete -f mysql-client-5.0.29 // -f为强制卸载
3、重新启动系统,并重新执行命令安装mysql即可。
说明:
卸载有两种方法(推荐使用pkg_delete):
# cd /usr/ports/databases/mysql50-client/
# make deinstall clean
或
# pkg_delete mysql-client-5.0.29
1月18
ports安装spawn-fcgi以后,将spawn-fcgi_enable="YES"写入rc.conf,系统启动的时候却提示:
spawn-fcgi_enable=YES not found.
网海茫茫,搜到spawn-fcgi的启动为:
spawn_fcgi_enable="YES"
spawn-fcgi_enable=YES not found.
网海茫茫,搜到spawn-fcgi的启动为:
spawn_fcgi_enable="YES"
1月15
当FreeBSD里/var文件系统容易不够时,执行以下两条命令,清理以前安装过软件的编译文件:
1、
# cd /usr/ports
# make clean
2、
# cd /usr/src
# make clean
1、
# cd /usr/ports
# make clean
2、
# cd /usr/src
# make clean
1月14
# portmanager -ui
rParseCommandLine 0.4.1_9 error: /usr/ports/-ui is not a valid port directory
rParseCommandLine 0.4.1_9 info:either you have used an invalid command line switch as the first option or you are trying to update a non existent port path, see man portmanager(1)
MGPMrCommandLine 0.4.1_9 error: rParseCommandLine returned errorCode 1
说明:
-ui参数不可单独使用,必须与其他参数配合使用,如:# portmanager -u -ui
rParseCommandLine 0.4.1_9 error: /usr/ports/-ui is not a valid port directory
rParseCommandLine 0.4.1_9 info:either you have used an invalid command line switch as the first option or you are trying to update a non existent port path, see man portmanager(1)
MGPMrCommandLine 0.4.1_9 error: rParseCommandLine returned errorCode 1
说明:
-ui参数不可单独使用,必须与其他参数配合使用,如:# portmanager -u -ui





