Debian 使用笔记
1. Install pear on Debian
A:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
|
2. Install PHP GD extension on Debian
A:
1 2 3 4 5 6 7 8 9 |
|
Reference:Ubuntu Linux: Install or Add PHP-GD Support To Apache Web Server
3. Install PHP cURL extension on Debian
A:
1
|
|
Reference:How do I install PHP cURL on Linux Debian?
4. Install PHP mCrypt extension on Debian
A:
1 2 3 4 5 6 7 8 9 10 |
|
5. Default installation layouts for Apache HTTPD on Debian
A:
1 2 3 4 5 6 7 8 9 10 11 |
|
Notes:
- The Debian/Ubuntu layout is fully documented in /usr/share/doc/apache2/README.Debian
- Debian/Ubuntu use symlinks to configure vhosts and load modules. Configuration files are created in their respective sites-available and mods-available directories. To activate vhosts and modules, symlinks are created in the respective sites-enabled and mods-enabled directories to the config files in either sites-available and mods-available. Debian provides scripts to handle this process called ‘a2ensite’ and ‘a2enmod’ which activates vhosts and modules.
- The default vhost is defined in /etc/apache2/sites-available/default, and overrides the DocumentRoot set in the server context.
Reference:DistrosDefaultLayout
6. Can’t connect to PPTP VPN with ufw enabled on Debian 3.16.7-ckt11-1 with kernel 3.16.0-4-amd64
A: Allow Port 1723 on UFW
1
|
|
This is caused by a change for security reason in kernel 3.18 [1]. There are two ways to fix this.
- First approach is adding this rule to the file /etc/ufw/before.rules before the line # drop INVALID packets …
-A ufw-before-input -p 47 -j ACCEPT
- Second approach is manually loading the nf_conntrack_pptp module. You can do this by running
$sudo modprobe nf_conntrack_pptp
To load this module on every boot on Ubuntu, add it to the file /etc/modules.
Reference:Can’t connect to PPTP VPN with ufw enabled on Ubuntu 14.04 with kernel 3.18
How to setup pptp vpn on ubuntu 12.04
7.OpenVPN server configure correct, but client can’t brower web site block by GTW.
A:There is a crue the the log of VPN client issue client DNS be used. So I think this may be the problem. YES, client can brower all web site after remove all client DNS settings.
1 2 3 4 5 |
|
Reference: How To Set Up an OpenVPN Server on Debian 8
How To Set Up an OpenVPN Server on Ubuntu 14.04
8.How to stop rpcbind and rpc.statd on debian?
A:Both of these services are only needed if you plan on using NFS for file sharing. They are otherwise unneeded and are a potential security risk.
1 2 3 4 5 |
|
Reference:Is it safe to remove rpcbind?
rpc.statd running on system not using NFS
9.Welcome to emergency mode! After loggin in, type “journalctl -xb” to view system logs, “systemctl reboot” to reboot,“systemctl default” or ctrl+D to try again to boot into default mode.
A:在 digitalocean 上从 snapshot 创建一个 droplet, 登录后提示上述信息。journalctl -xb
查看系统日志发现提示的错误信息是:
1 2 3 |
|
从错误信息来看,似乎是文件系统出错了,用 lsblk -f
查看下挂载的文件系统,发现并没有 /boot 分区,于是编辑 /etc/fstab
,将未挂载的分区都注释掉,提示文件系统为只读,于是使用命令 mount -o remount,rw /dev/vda1 /
重新挂载根文件系统。/etc/fstab
也就可编辑了,之后 systemctl reboot
系统恢复了。
Reference:“Welcome to emergency mode!” Think it is a fsck problem