Linux 查看端口占用情况
lsof -i:port 例子: lsof -i:3000 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME node 3385 grayson 24u IPv4 0x3361f519169d57bf 0t0 TCP *:hbci (LISTEN) node ...
安装gitlib的报错常见问题记录
##问题一 env | grep -E "^(GEM_HOME|PATH|RUBY_VERSION|MY_RUBY_HOME|GEM_PATH)=" > ~/.ssh/environment 这一行如果没有执行会报 [~/projects] $ ssh -T git@192.168.33.10 /home/git/gitlab-shell/bin/gitlab-shell:8:...
how-to-install-mtr
wget ftp://ftp.bitwizard.nl/mtr/mtr-0.82.tar.gz tar -xvf mtr-0.82.tar.gz cd mtr-0.82 export LIBS='-lm -ltermcap -lresolv' ./configure make sudo make install ok! 之后就可以正常运行 mtr 了,默认 mtr 是使用 x11 图形界...
curl SSL certificate problem
用curl装rvm环境的时候报这个错误,是本地服务器的ssl证书太旧了。 $\curl -L https://get.rvm.io | bash -s stable --without-gems="rvm rubygems-bundler" curl: (60) SSL certificate problem, verify that the CA cert is OK. Details...
Starting httpd: (98)Address already in use
```bash Terminal $ sudo /usr/sbin/httpd -S VirtualHost configuration: wildcard NameVirtualHosts and default servers: default:443 www.xxxx.com (/etc/httpd/conf.d/ssl.conf:81) *:80 ...
SSH 安全性和配置最佳实践
SSH 安全性和配置最佳实践 对于一些之前列举的代码示例,许多系统管理员担心 SSH 使用情况和功能的一些安全性实现。尽管已经口头和书面说明了常见的各种 SSH 安全性和远程主机安全性方法,下面有一系列流程和配置可用于加强有关远程主机访问的 SSH 安全性: 将 root 账户仅限制为控制台访问: ```bash /etc/ssh/sshd_config vi /etc/ssh/sshd...
SSH 的一般用途
您通常使用 SSH 来允许用户登录到一个远程主机并执行命令。然而,SSH 还支持隧道和 X11 连接。它甚至可以使用 SFTP 或 SCP 传输文件。SSH 适用于大部分常见平台内的多个应用程序,这些平台包括 Linux、UNIX、Windows 和 Apple® OS X,虽然有些应用程序可能需要仅在特定 SSH 客户端或服务器上提供或与之兼容的功能。 下面是一些常见的 SSH 语法例子:...
优化Nginx的gzip_static配置让Rails的AssetPipeline的技持压缩gz传输
./configure --with-http_gzip_static_module gzip on; gzip_min_length 1024; gzip_buffers 4 8k; gzip_types text/plain application/x-javascript text/css text/html application/xml; ...
linux 时区
##查看当前时区 $ date -R Wed, xxx Apr xxxx xx:xx:xx +0000 ##修改设置时区 如:cp /usr/share/zoneinfo/$主时区/$次时区 /etc/localtime $sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime $date -R Wed, xxx Apr ...
linux信息查看
查看有几个插口用了几个插口 # dmidecode -t memory |grep Size Size: 1024 MB Size: 1024 MB Size: 1024 MB Size: 1024 MB Size: No Module Installed Size: No Module Installed Size: No Module Installed Size: No Module...
关于nginx的auth_basic认证配置
创建htpasswd文件 sudo htpasswd -c -m conf/htpasswd <user> 如果没有该命令,先安装 sudo apt-get install apache2-utils ```bash nginx.conf server { listen 80; charset UTF-8; server_name domai...
Nginx配置autoindex浏览目录列表
Nginx默认是不允许列出整个目录的。如需此功能, 打开nginx.conf文件,在location server 或 http段中加入 autoindex on; 另外两个参数最好也加上去: autoindex_exact_size off; 默认为on,显示出文件的确切大小,单位是bytes。 改为off后,显示出文件的大概大小,单位是kB或者MB或者GB autoinde...
一个不能删除的密秘
``bash Terminal ~/projects$ sudo rm test_del -rf rm: cannot removetest_del': Operation not permitted 这样都删不了,只因世界上有chattr这么一个命令。 ```bash Terminal ~/projects$ sudo chattr -i test_del ~/projects$ r...
Another app is currently holding the yum lock; waiting for it to exit
刚刚更新yum,网络不太好,终于好了。然后再使用yum发现,它被占用啦。 Another app is currently holding the yum lock; waiting for it to exit... The other application is: yum-updatesd-he Memory : 22 M RSS (261 MB VSZ) .....
linux sudoers
把用户可以使用sudo gpasswd -a my_user_name sudo 让sudo不使用密码 vi /etc/sudoers %sudo ALL=(ALL) ALL 改为 %sudo ALL=(ALL) NOPASSWD:ALL