dd if=源文件 of=目标文件 conv=sync,noerror bs=4k
分类: 菜鸟Linux笔记
菜鸟学习LINUX笔记
-
Apache关掉Etag、Last-Modified及apache版本的方法
Etag关掉的方法如下,加一个none
FileETag none
要关掉Last-Modified的方法麻烦点,先想好你要去掉Last-Modified 的标签。然后用header模块来控制
LoadModule headers_module modules/mod_headers.so
<FilesMatch “\.(gif|jpg|png)”>
Header unset Last-Modified
</FilesMatch>
去掉apache版本号
ServerSignature off
ServerTokens prod
-
debian gnome
aptitude search gnome|grep
gir1.2-gnomebluetooth-1.0 – Introspection data for GnomeBluetooth
gir1.2-gnomekeyring-1.0 – GNOME keyring services library – introspec
gnome – Full GNOME Desktop Environment, with extra
gnome-accessibility-themes – Accessibility themes for the GNOME desktop
gnome-applets – Various applets for the GNOME panel – bina
gnome-applets-data – Various applets for the GNOME panel – data
gnome-backgrounds – Set of backgrounds packaged with the GNOME
gnome-bluetooth – GNOME Bluetooth tools
gnome-brave-icon-theme – blue variation of the GNOME-Colors icon th
gnome-cards-data – data files for the GNOME card games
gnome-color-manager – Color management integration for the GNOME
gnome-colors-common – common icons for all GNOME-Colors icon the
gnome-common – common scripts and macros to develop with
gnome-contacts – Contacts manager for GNOME
gnome-control-center – utilities to configure the GNOME desktop
gnome-control-center-data – configuration applets for GNOME – data fil
gnome-core – GNOME Desktop Environment — essential com
gnome-desktop-data – Common files for GNOME desktop apps
gnome-desktop-environment – The GNOME Desktop Environment – transition
gnome-desktop3-data – Common files for GNOME desktop apps
gnome-dictionary – GNOME dictionary application
gnome-disk-utility – manage and configure disk drives and media
gnome-doc-utils – collection of documentation utilities for
gnome-documents – Document manager for GNOME
gnome-font-viewer – font viewer for GNOME
gnome-games – games for the GNOME desktop
gnome-games-data – data files for the GNOME games
gnome-games-extra-data – games for the GNOME desktop (extra artwork
gnome-icon-theme – GNOME Desktop icon theme
gnome-icon-theme-extras – GNOME Desktop icon theme (additional icons
gnome-icon-theme-gartoon – Gartoon icon theme for GTK+ 2.x
gnome-icon-theme-nuovo – Dropline Nuovo icon theme for GTK+ 2.x
gnome-icon-theme-suede – Suede icon theme for GTK+ 2.x
gnome-icon-theme-symbolic – GNOME desktop icon theme (symbolic icons)
gnome-icon-theme-yasis – YASIS (Yet Another Scalable Icon Set)
gnome-js-common – Common modules for GNOME JavaScript interp
gnome-keyring – GNOME keyring services (daemon and tools)
gnome-mag – a screen magnifier for the GNOME desktop
gnome-media – GNOME media utilities
gnome-media-common – GNOME media utilities – common files
gnome-menus – GNOME implementation of the freedesktop me
gnome-mime-data – base MIME and Application database for GNO
gnome-nettool – network information tool for GNOME
gnome-online-accounts – GNOME Online Accounts
gnome-orca – Scriptable screen reader
gnome-packagekit – Graphical distribution neutral software ma
gnome-packagekit-data – Data files for graphical distribution neut
gnome-panel – launcher and docking facility for GNOME
gnome-panel-data – common files for the GNOME Panel
gnome-power-manager – power management tool for the GNOME deskto
gnome-rdp – remote desktop client for GNOME
gnome-screensaver – GNOME screen saver and locker
gnome-screenshot – screenshot application for GNOME
gnome-search-tool – GNOME tool to search files
gnome-session – GNOME Session Manager – GNOME 3 session
gnome-session-bin – GNOME Session Manager – Minimal runtime
gnome-session-canberra – GNOME session log in and log out sound eve
gnome-session-common – GNOME Session Manager – common files
gnome-session-fallback – GNOME Session Manager – GNOME fallback ses
gnome-settings-daemon – daemon handling the GNOME session settings
gnome-shell – graphical shell for the GNOME desktop
gnome-shell-common – common files for the GNOME graphical shell
gnome-shell-extensions – Extensions to extend functionality of GNOM
gnome-sudoku – Sudoku puzzle game for GNOME
gnome-sushi – sushi is a quick previewer for nautilus
gnome-system-log – system log viewer for GNOME
gnome-system-monitor – Process viewer and system resource monitor
gnome-system-tools – Cross-platform configuration utilities for
gnome-terminal – GNOME terminal emulator application
gnome-terminal-data – Data files for the GNOME terminal emulator
gnome-themes – official themes for the GNOME desktop
gnome-themes-extras – extra themes for the GNOME desktop
gnome-themes-standard – Standard GNOME themes
gnome-themes-standard-data – Data files for GNOME standard themes
gnome-tweak-tool – tool to adjust advanced configuration sett
gnome-user-guide – GNOME user’s guide
gnome-user-share – User level public file sharing via WebDAV
gnome-video-effects – GNOME Video Effects
guile-gnome2-glib – Guile bindings for GLib
guile-gnome2-gtk – Guile bindings for GTK+, libglade, Pango a
libgnome-bluetooth10 – GNOME Bluetooth tools – support library
libgnome-bluetooth7 – GNOME Bluetooth tools – support library
libgnome-desktop-2-17 – Utility library for loading .desktop files
libgnome-desktop-3-2 – Utility library for loading .desktop files
libgnome-keyring-common – GNOME keyring services library – data file
libgnome-keyring0 – GNOME keyring services library
libgnome-keyring1.0-cil – CLI library to access the GNOME Keyring da
libgnome-mag2 – screen magnification library for the GNOME
libgnome-media-profiles-3.0-0 – GNOME Media Profiles library
libgnome-media0 – runtime libraries for the GNOME media util
libgnome-menu-3-0 – GNOME implementation of the freedesktop me
libgnome-menu2 – GNOME implementation of the freedesktop me
libgnome-speech7 – GNOME text-to-speech library
libgnome-window-settings1 – Utility library for getting window manager
libgnome2-0 – The GNOME library – runtime files
libgnome2-canvas-perl – Perl interface to the GNOME canvas library
libgnome2-common – The GNOME library – common files
libgnome2-perl – Perl interface to the GNOME libraries
libgnome2-vfs-perl – Perl interface to the 2.x series of the GN
libgnomecanvas2-0 – powerful object-oriented display engine –
libgnomecanvas2-common – powerful object-oriented display engine –
libgnomekbd-common – GNOME library to manage keyboard configura
libgnomekbd4 – GNOME library to manage keyboard configura
libgnomekbd7 – GNOME library to manage keyboard configura
libgnomeui-0 – GNOME user interface library – runtime fil
libgnomeui-common – GNOME user interface library – common file
libgnomevfs2-0 – GNOME Virtual File System (runtime librari
libgnomevfs2-common – GNOME Virtual File System (common files)
libgnomevfs2-extra – GNOME Virtual File System (extra modules)
libpam-gnome-keyring – PAM module to unlock the GNOME keyring upo
libreoffice-gnome – office productivity suite — GNOME integra
libsoup-gnome2.4-1 – HTTP library implementation in C — GNOME
network-manager-gnome – network management framework (GNOME fronte
policykit-1-gnome – GNOME authentication agent for PolicyKit-1
python-gnome2 – Python bindings for the GNOME desktop envi
python-gnomedesktop – Python bindings for the GNOME desktop libr
python-gnomekeyring – Python bindings for the GNOME keyring libr
task-gnome-desktop – GNOME desktop environment
vim-gnome – Vi IMproved – enhanced vi editor – with GN
-
解决android 2.x版本pptp vpn不能连接的问题
手里有个LG p350手机,刷机后系统为2.3.7,始终无法vpn,无论是pptp还是openvpn,当然这还得怪我这个有洁癖,什么都喜欢用原生态,手机也是,非得刷原生态ROM,vpn也只喜欢用系统自带的。
好吧,少话废话,直接上android 2.x版本pptp vpn连接的上,却无法访问网络的的解决方法。原因就出在服务端的配置ppp-options文件上,直接注销“require-mppe-128”这个选项,然后在手机里去掉“启用加密”的勾选。OK,再看看,已经连接上,而且也能访问网络了。
如果是android 4.x,最后是把这项打开,手机上也选上“启用加密”。呵呵……
-
Debian7 Wheezy Gnome3找回最大化最小化按钮
直接ALT+F2,输入dconf-editor
org>gnome>shell>overrides>button-layout,把值改成 :
;minimize,maximize,close(包括冒号)
要注意一点,dconf-editor这个命令在终端下输入会提示错误警告,而且不能修改,所以得用ALT+F2才行,具体原因我不知道。
-
Debian: dmesg output contains “Error: Driver ‘pcspkr’ is already registered, aborting…”
解决方法:
aptitude install alsa-base
echo blacklist snd-pcsp >> /etc/modprobe.d/alsa-base-blacklist.conf
如果alsa-base-blacklist.conf文件里有blacklist snd-pcsp就不必执行echo了
-
alert root shell login
vi ~/.bashrc
在最后一行插入:
echo ‘ALERT – Root Shell Access (hostname) on:’ `date` `who` | mail -s “Alert: Root Access from `who | cut -d”(” -f2 | cut -d”)” -f1`” admin@youremail.com
1、hostname更换成你的服务器hostname
2、admin@youremail.com更换成自己的接收邮件地址
3、服务器必须有发送邮件的功能。如安装了mailx、exim4等服务
-
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
debian
service ssh restart
出现Could not load host key: /etc/ssh/ssh_host_ecdsa_key
解决方法:
dpkg-reconfigure openssh-server
-
Connect To OpenVPN Over Shadowsocks
按照https://github.com/clowwindy/shadowsocks/wiki/Connect-to-OpenVPN-over-Shadowsocks给的教程;我试了一下,步骤如下:
1、之前安装的OPENVPN服务端 server.conf配置文件里的proto udp 改为 proto tcp
2、openvpn客户端proto udp 也是改为 proto tcp
3、openvpn直接在客户端最后面加入
socks-proxy 127.0.0.1 19999
route 123.xxx.xxx.xxx 255.255.255.255 net_gateway
保存,在服务器重启openvpn 搞定。
-
debian Shadowsocks Supervisor
执行
apt-get install python-pip python-m2crypto supervisor
pip install shadowsocks
服务端安装好以后,创建一个配置文件 /etc/shadowsocks.json。 示例:
{
“server”:”服务器 IP 地址”,
“server_port”:8388,
“local_address”: “127.0.0.1”,
“local_port”:1080,
“password”:”mypassword”,
“timeout”:300,
“method”:”aes-256-cfb”,
“fast_open”: false,
“workers”: 1
}
多用户配置文件
{
“server”:”your_server_ip”,
“local_address”: “127.0.0.1”,
“local_port”:1080,
“port_password”:{
“8989”:”password0″,
“9001”:”password1″,
“9002”:”password2″,
“9003”:”password3″,
“9004”:”password4″
},
“timeout”:60,
“method”:”aes-256-cfb”,
“fast_open”: false,
“workers”: 1
}
在服务器上运行 ssserver -c /etc/shadowsocks.json 即可。
在本地,用上文的客户端shadowsocks-gui进行相应配置并运行客户端,
shadowsocks-gui下载地址:http://sourceforge.net/projects/shadowsocksgui/files/dist/
最后设置浏览器代理。Chrome 推荐使用 SwitchySharp 切换代理设置。把浏览器代理设为下列参数即可:
协议: socks5
地址: 127.0.0.1
端口: 你填的 local_port
如果要在后台运行, 使用supervisor, supervisor配置如下:
安装完supervisor后创建
vi /etc/supervisor/conf.d/shadowsocks.conf
内容如下:
[program:shadowsocks]
command=ssserver -c /etc/shadowsocks.json
autorestart=true
user=nobody
如果端口 < 1024,把上面的 user=nobody 改成 user=root。保存
在 /etc/default/supervisor 最后加一行:
ulimit -n 51200
执行
service supervisor start
supervisorctl reload
就好了。
如果遇到问题,可以检查日志:
supervisorctl tail -f shadowsocks stderr
如果修改了 shadowsocks 配置 /etc/shadowsocks.json, 可以重启 shadowsocks:
supervisorctl restart shadowsocks
如果修改了 Supervisor 的配置文件 /etc/supervisor/*, 可以更新 supervisor 配置:
supervisorctl update