gentoo服务器的各种配置,记录一下,以便自己以后使用。
1、/etc/make.conf
CFLAGS="-O2 -march=i686 -pipe" CXXFLAGS="${CFLAGS}" CHOST="i686-pc-linux-gnu" ACCEPT_KEYWORDS="x86" GENTOO_MIRRORS="http://mirrors.163.com/gentoo/" MAKEOPTS="-j2" USE="-doc samba -emacs -spell -evo -introspection -bluetooth -X -alsa -gnome -cups -kde -qt3 -qt4 -ipv6"
2、/etc/conf.d/net
config_eth0=( "192.168.1.109 netmask 255.255.254.0 brd 192.168.1.255" ) routes_eth0=( "default via 192.168.1.103" )
3、/etc/ssh/sshd_config
Port 22 PermitRootLogin yes PasswordAuthentication no AllowGroups root gentoo
4、/etc/nginx/nginx.conf
user nginx nginx; worker_processes 1; error_log /var/log/nginx/error_log info; events { worker_connections 1024; use epoll; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] ' '"$request" $status $bytes_sent ' '"$http_referer" "$http_user_agent" ' '"$gzip_ratio"'; client_header_timeout 10m; client_body_timeout 10m; send_timeout 10m; connection_pool_size 256; client_header_buffer_size 1k; large_client_header_buffers 4 2k; request_pool_size 4k; gzip on; gzip_min_length 1100; gzip_buffers 4 8k; gzip_types text/plain; output_buffers 1 32k; postpone_output 1460; autoindex on; autoindex_exact_size off; autoindex_localtime on; sendfile on; tcp_nopush on; tcp_nodelay on; client_max_body_size 30m; keepalive_timeout 75 20; ignore_invalid_headers on; index index.htm index.html index.php; server { listen 80; server_name 19web; access_log /var/log/nginx/localhost.access_log main; error_log /var/log/nginx/localhost.error_log info; root /document/ubuntu/www; location ~.php$ { fastcgi_pass localhost:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME /document/ubuntu/www$fastcgi_script_name; } } }
5、/etc/samba/smb.conf
workgroup = WORKGROUP server string = Samba Server on Gentoo load printers = no wins server =19web map to guest=bad user usershare allow guests=yes [软件] Path = /document/ubuntu/www/software Public = yes Writable = no [share] Path = /document/ubuntu/share Public = yes Writable = yes browseable = no [POT] Path = /document/ubuntu/www/pot Public = yes Path = /document/ubuntu/www/video Public = yes