linux 命令练习

来源:互联网 发布:nike跑步鞋推荐 知乎 编辑:程序博客网 时间:2024/04/25 16:07
  1. // Apache  
  2. //Task: Start Apache 2 Server /启动apache服务  
  3. # /etc/init.d/apache2 start  
  4. //or  
  5. $ sudo /etc/init.d/apache2 start  
  6. //Task: Restart Apache 2 Server /重启apache服务  
  7. # /etc/init.d/apache2 restart  
  8. //or  
  9. $ sudo /etc/init.d/apache2 restart  
  10. //Task: Stop Apache 2 Server /停止apache服务  
  11. # /etc/init.d/apache2 stop  
  12. //or  

  1. $ sudo /etc/init.d/apache2 stop  
查看 apache2命令
sudo /etc/init.d/apache2 -t

cd / 是进入到根目录

apt安装nginx方法
sudo apt-add-repository ppa:nginx/development
sudo apt-get update
sudo apt-get install nginx

apt卸载nginx方法
卸载方法1.
# 删除nginx,保留配置文件
sudo apt-get remove nginx
#删除配置文件
rm -rf /etc/nginx

卸载方法2.
#删除nginx连带配置文件
sudo apt-get purge nginx # Removes everything.

#卸载不再需要的nginx依赖程序
sudo apt-get autoremove


service nginx start


/etc/nginx/sites-available/default

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
/usr/lib/php5/20121212

0 0
原创粉丝点击