Some common commands and access directories under Linux

Source: Internet
Author: User

1. Catalogue
LS List directory file name
  ll lists all directory file access rights and other related information, including. ..
  ls-a Lists all directory file names, including. ..
    LS-L lists information about access to directory files
    Ls-r Recursive display subdirectory structure
    Ls-ld Add directory name, display directory and link information
    CD ~
    CD/
    Cd.. /.. /
    Cd
2. Manually set the IP
First, DNS settings
sudo vim/etc/resolv.conf
file  for GLIBC resolver (3) generated by resolvconf (8)# does not EDIT this FILE by HAND-- R changeswould be overwritten nameserver 192.168.1.1114.114.114.1148.8.8.8

Second, IP settings

sudo vim/etc/network/interfaces

 #   this File describes the network interfaces available on your system  #   and how to activate them. For more information, see Interfaces (5).  #   The loopback network interface  auto loiface lo inet loopback  #   The primary network interface  auto eth0  #  iface eth0 inet dhcp  iface eth0 inet static  address  192.168.1.69gateway  192.168.1.1netmask  255.255.255.0  
3. See if the app is started
ps-ef|  grep nginxroot        939     1  0 09:42?        00:00:00 nginx:master process./sbin/nginxwww-data 940 939  0 09:42?        00:00:00 nginx: worker Processxiao      1797  1672  0 18:10 pts/3    00:00:00 grep--color=auto Nginx
ps-ef|  grep phproot        889     1  0 09:42?        00:00:01 Php-fpm:master Process (/data/service/php53/etc/php-fpm.  conf) Nobody     890   889  0 09:42?        00:00:00 php-fpm: pool wwwnobody     891   889  0 09:42?        00:00:00 php-fpm: pool Wwwxiao      1799  1672  0 18:11 pts/3    00:00:00 grep--color=auto php
4. Restart and close Nginx
   Smooth start    Sudo/data/service/nginx/sbin/nginx-s reload    off         /data/service/nginx/sbin/nginx-s Stop
5. Start PHP
cd/data/service/php53/sbin/php-fpm
889

6. Modify Mount command
sudo vim/etc/rc. Local  /bin/sh-c ' cd/data/service/php53;. /SBIN/PHP-FPM; ' /bin/sh-c ' mount-t cifs-o username=ubuntu,password=12345,gid=65534,uid=65534//192.168.1.25/papa/data/www-data/www '/bin/sh-c ' mount-t cifs-o username=ubuntu,password=12345,gid=65534,uid=65534//192.168.1.25/papa/home/xiao/work ' # start nginx/bin/sh-c ' Cd/data/service/nginx;. /sbin/nginx; ' # /bin/sh-c ' cd/data/service/mysql;./bin/mysqld_safe--user=mysql & '/bin/sh-c ' cd/usr/local/mysql;./bin /mysqld_safe--user=mysql & 'exit 0
7. nginx File Configuration
cd/data/service/nginx/conf/vhost/
sudo vim aa.conf
Server {Listen443; Server_Name App. Chenlu.cn; Root/data/www-data/www/chenlu_api/app3; #AutoIndex on;SSL on; Ssl_certificate/home/xiao/papa.CRT; Ssl_certificate_key/home/xiao/papa.Key; Ssl_session_timeout 5m; Ssl_protocols SSLv2 SSLv3 TLSv1; Ssl_ciphers All:! Adh:! export56:rc4+rsa:+high:+medium:+low:+sslv2:+EXP; Ssl_prefer_server_ciphers on; #CharSet Utf-8; #access_log Logs/host.access.log main; Location/{Index Index. HTML index.htm Index.PHP; } #error_page 404/404.html; #Redirect Server error pages to the static page/50x.htmlError_page502 503 504/50x.html; Location=/50x.HTML {root HTML; }location~ \.php$ {fastcgi_pass127.0.0.1:9000; Fastcgi_index Index.PHP; Fastcgi_param Script_filename$document _root$fastcgi_script_name; Fastcgi_param ENV Local; includeFastcgi_params; } #deny access to. htaccess files, if Apache ' s document Root #concurs with Nginx ' s one # #Location ~/\.ht { #deny all; #A}Set$rule _allow0; if($request _filename!~ "^.*. (gif|jpg|jpeg|png|ico|swf|css|js|txt|ttf| TTF) $ ") {Set$rule _allow2$rule _allow; } if($rule _allow= "20") {rewrite^/(. *)/index.php?$1Last ; } }

Some common commands and access directories under Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.