Gentoo 2.6.35-r4 内核 VirtualBox 虚拟机发布
Friday, August 27th, 2010制作了最新版本的Gentoo虚拟机,内核版本2.6.35-r4。下载地址:
http://www.douhua.im/downloads/gentoo/Gentoo.2.6.35.r4.x86.zip
root密码:douhua.im
修改网卡和IP地址请参考:《发布 Gentoo 2.6.31-r6 vmdk 镜像》
制作了最新版本的Gentoo虚拟机,内核版本2.6.35-r4。下载地址:
http://www.douhua.im/downloads/gentoo/Gentoo.2.6.35.r4.x86.zip
root密码:douhua.im
修改网卡和IP地址请参考:《发布 Gentoo 2.6.31-r6 vmdk 镜像》
首先要在Gentoo下安装编译Nginx,需要加入GeoIP模块,请参考另一篇文章《Gentoo 安装编译Nginx》。在安装的过程中应该是会自动安装dev-libs/geoip这个包,如果没有的话使用emerge安装:
emerge -avt dev-libs/geoip
下载MaxMind的GEO数据,解压缩放在/etc/nginx目录下:
#Get the free database of geo_city wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz gunzip GeoLiteCity.dat.gz mv GeoLiteCity.dat /etc/nginx #Get the free database of geo_coundty wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz gunzip GeoIP.dat.gz mv GeoIP.dat /etc/nginx
编辑/etc/nginx/nginx.con文件,加入GeoIP的支持:
http {
geoip_country /etc/nginx/GeoIP.dat;
geoip_city /etc/nginx/GeoLiteCity.dat;
}编辑django的fastcgi_param:
fastcgi_param GEOIP_COUNTRY_CODE $geoip_city_country_code; fastcgi_param GEOIP_COUNTRY_CODE3 $geoip_country_code3; fastcgi_param GEOIP_COUNTRY_NAME $geoip_country_name; fastcgi_param GEOIP_CITY_COUNTRY_CODE $geoip_city_country_code; fastcgi_param GEOIP_CITY_COUNTRY_CODE3 $geoip_city_country_code3; fastcgi_param GEOIP_CITY_COUNTRY_NAME $geoip_city_country_name; fastcgi_param GEOIP_REGION $geoip_region; fastcgi_param GEOIP_CITY $geoip_city; fastcgi_param GEOIP_POSTAL_CODE $geoip_postal_code; fastcgi_param GEOIP_CITY_CONTINENT_CODE $geoip_city_continent_code; fastcgi_param GEOIP_LAT $geoip_latitude; fastcgi_param GEOIP_LNG $geoip_longitude;
在Django的使用方法:
def index(request): return HttpResponse(request.META['GEOIP_COUNTRY_CODE'])
今天更新了Gentoo虚拟机,然后就无法启动所有的Service了。因为/var/lib/init.d/deptree这个文件损坏,提示需要运行/sbin/depscan.sh这个脚本进行修复。运行了命令还是不能启动,用vim查看deptree这个文件,损坏的地方都不能正确显示。Google之,需要在运行的时候加入–update的参数才可以,运行完重启动一切正常。
depscan.sh --update产生这个问题的原因没有找到,估计是emerge命令更新的时候由于软件之间的冲突造成的。
制作了最新内核版本的2.6.34-r1的Gentoo虚拟机镜像,下载地址:
http://www.douhua.im/downloads/gentoo/Gentoo.2.6.34.r1.x86.rar
root密码:douhua.im
修改网卡和IP地址请参考:《发布 Gentoo 2.6.31-r6 vmdk 镜像》
发布了最新的内核2.6.32-r7版本的Gentoo VirtualBox镜像:
Gentoo 2.6.32-t7 x86:http://www.douhua.im/downloads/gentoo/Gentoo.2.6.32.r7.x86.rar
目前MongoDB 1.4还是Masked的,所以安装的时候要UnMasked。在/etc/portage/package.keywords中加入:
dev-db/mongodb ~x86MongoDB需要的splidermonkey需要Masked的spidermonkey-1.7.0 r1, 在/etc/portage/package.keywords中加入:
dev-lang/spidermonkey ~x86安装MongDB:
time emerge -avt mongodb
安装完成后加入到启动中:
rc-update add mongodb default
在Gentoo下使用Nginx,总是涉及到编译Nginx的HTTP Module。每次系统更新都要重新设置USES、NGINX_MODULES_HTTP很麻烦,把这些关键字写在配置文件里面就不容易出错。
首先在/etc/portage/package.keywords下加入如下行,这样就可以使用最新的dev版本了:
www-servers/nginx ~x86在/etc/portage/package.use文件中加入如下内容,是否使用-ipv6要看安装Nginx的服务器是否支持IPV6:
www-servers/nginx aio libatomic -ipv6
最后在/etc/make.conf加入对HTTP Module的设定:
NGINX_MODULES_HTTP="addition fastcgi flv geo geoip sub access auth_basic rewrite"
最后使用emerge命令安装Nginx:
emerge -avt nginx安装完成后可以使用命令查看nginx的编译参数:
nginx -V最近制作了Gentoo新版本内核x86和x86_64的镜像,内核版本号是2.6.31-r10,现在已经可以从站点下载到,下载地址:
Gentoo 2.6.31-r10 x86 :http://www.douhua.im/downloads/gentoo/Gentoo.2.6.31.r10.x86.rar
Gentoo 2.6.31-r10 x86_64 :http://www.douhua.im/downloads/gentoo/Gentoo.2.6.31.r10.x86_64.rar
root密码是: douhua.im
登录后请使用passwd修改密码
编译的内核,总在启动的时候报一个警告:
udev: missing sysfs features; please update the kernel or disable the kernel's
CONFIG_SYSFS_DEPRECATED option. udev may fail to work correctly虽然系统使用没有遇到什么异常,但是搞不明白这个到底是怎么样的问题。今天在重新编译内核的时候,删除了一个内核的选项后启动就正常了,也没有任何的警告信息。
General Setup --> [ ] remove sysfs features which may confuse old userspace tools
使用genkernel编译内核参见:《在gentoo下更新kernel》
发布Virtualbox Gentoo 64位 镜像文件,内核版本2.6.31-r6,root密码douhua.im。
下载地址:
VirtualBox Gentoo 64位镜像文件:http://www.douhua.im/downloads/gentoo/gentoo.64.virtualbox.rar