CD Directory name Enter directory
Cd.. Back to Parent Directory
LS lists the files in this directory
ll list the file attribute size in this directory, etc.
PWD Displays the current path
RM-RF directory or file (non-recoverable)
Chown-r owner. User group Directory name modify owner
Chmod-r 777 Directory name or file change permissions
-r,–recursive recursively process all files and subdirectories
-f,–silent,–quiet Remove most of the error messages
Chattr-i directory/.user.ini Remove read-only properties (can be modified later)
VI File name
I Insert
ESC exits edit State
: W Save
: Q exit
: Wq
: q! Do not save exit
:/aa Find AA
N Find Next
N Find Previous
/home/wwwroot/web Directory
/usr/local/nginx/conf/vhost
/usr/local/php
/usr/local/mysql
Netstat-ant Viewing TCP ports
LNMP Installation
Wget-c http://soft.vpser.net/lnmp/lnmp1.2-full.tar.gz && tar zxf lnmp1.2-full.tar.gz && CD Lnmp1.2-full &&/install.sh Lnmp
LNMP command
LNMP {start|stop|reload|restart|kill|status}//Overall operation
LNMP {nginx|mysql|mariadb|php-fpm|pureftpd} {start|stop|reload|restart|kill|status}//Single service operation
Lnmp vhost {Add|list|del}//Site operations
LNMP database {Add|list|del}//DB operation
LNMP FTP {Add|list|del} FTP operation
Open PathInfo Support Modification
/usr/local/php/etc/php.ini
Cgi.fix_pathinfo=1
Site configuration file
Server
{
Listen 90;
#listen [::]:80;
server_name cc.com;
Index index.html index.htm index.php default.html default.htm default.php;
root/home/wwwroot/cc.com;
#include n.conf;
#error_page 404 /404.html;
location/{
index index.htm index.html index.php;
#访问路径的文件不存在则重写URL转交给ThinkPHP处理
if (!-e $request _filename) {
rewrite ^/(. *) $ /index.php/$1 last;
break;
}
}
location ~ \.php/?. *$ {
#fastcgi_pass 127.0.0.1:9000;
fastcgi_pass Unix:/tmp/php-cgi.sock;
Fastcgi_index index.php;
#加载Nginx默认 the server environment variables configuration
Include fastcgi.conf;
#设置PATH_INFO并改写SCRIPT_FILENAME, SCRIPT_NAME Server environment variables
Set $fastcgi _script_name2 $fastcgi _script_name;
if ($fastcgi _script_name ~ "^ (. +\.php) (/.+) $") {
Set $fastcgi _script_name2 $;
Set $path _info;
}
Fastcgi_param path_info $path _info;
Fastcgi_param script_filename $document _root$fastcgi_script_name2;
Fastcgi_param script_name $fastcgi _script_name2;
}
Location ~. *\. (gif|jpg|jpeg|png|bmp|swf) $
{
Expires 30d;
}
Location ~. *\. (JS|CSS)? $
{
Expires 12h;
}
Access_log off;
}
Linux common commands and Nginx deployment thinkphp