ubuntu-needed

upload and download
sudo apt-get install lrzsz git g++ mercurial subversion lynx supervisor


nginx
sudo apt-get install build-essential libpcre3-dev libssl-dev zlib1g-dev libxml2-dev libxslt1-dev libgd-dev libgeoip-dev google-perftools libgoogle-perftools-dev

nginx compile

./configure --prefix=/usr/local/nginx \
--with-file-aio \
--with-http_ssl_module \
--with-http_v2_module \
--with-http_realip_module \
--with-http_addition_module \
--with-http_xslt_module \
--with-http_image_filter_module \
--with-http_geoip_module \
--with-http_sub_module \
--with-http_dav_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_auth_request_module \
--with-http_random_index_module \
--with-http_secure_link_module \
--with-http_degradation_module \
--with-http_slice_module \
--with-http_stub_status_module \
--with-mail \
--with-mail_ssl_module \
--with-stream \
--with-stream_ssl_module \
--with-stream_realip_module \
--with-stream_geoip_module \
--with-stream_ssl_preread_module \
--with-google_perftools_module \
--with-cpp_test_module \

--with-debug 

如果没有安装其他模块时,如未安装mp4支持模块,即使编译选项中增加了配置,也不会生效。后续如要生效,需重新编译安装nginx


nginx 编译选项:
https://nginx.org/en/docs/configure.html

Ubuntu 自动补全命令行:
步骤一: 在键盘上按“Ctrl+Alt+T”,打开终端:输入 root@ubuntu:~# apt-get install bash-completion root@ubuntu:~# source /etc/bash_completion
 步骤二: 配置文件,编辑/etc/bash.bashrc,在最后加入如下代码:
 if [ -f /etc/bash_completion ]; then /etc/bash_completion fi
 步骤三: 注销ubuntu,OK...

ubuntu的命令提示符挺不爽的,如果当前的工作目录很长的话,那prompt也非常长,不大爽,这个需要修改PS1变量, 修改方式:
 1.首先修改/etc/bash.bashrc文件 sudo vim /etc/bash.bashrc 
#PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\
$ ' PS1='[${debian_chroot:+($debian_chroot)}\u@\h:\W]\$ '
 2.修改/etc/profile文件 vim /etc/profile
 #PS1='\u@\h:\w\$ '
PS1='[\u@\h:\W]\$ '
 source /etc/profile
 3.修改用户目录下的.bashrc文件
 sudo vim ~/.bashrc 
#PS1='${debian_chroot:+($debian_chroot)}[33[01;32m]\u@\h[33[00m]:[33[01;34m]\w[33[00m]\$ '
PS1='[${debian_chroot:+($debian_chroot)}[33[01;32m]\u@\h[33[00m]:[33[01;34m]\W[33[00m]]\$ '
 #PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$'
PS1='[${debian_chroot:+($debian_chroot)}\u@\h:\W]\$ '
 相对于直接使用export PS1=XXX 的方式,此种修改方法保留了终端标题栏显示完整路径的功能。 

如果想要终端颜色丰富一些,我们可以开启~/.bashrc中的force_color_prompt=yes参数,这样终端会用颜色来区分各种不同的项目