当前位置: 首页 > news >正文

虚拟机怎么做网站空间制作网站多少钱

虚拟机怎么做网站空间,制作网站多少钱,wordpress 单页分类,苏州营销型网站建设LNMP Linux Nginx MySQL PHP 安装Nginx 执行以下命令即可: apt-get install nginx不过源里的版本是0.7.65#xff0c;不喜欢老旧的玩意#xff0c;可以尝试编译安装。 编译安装nginx. 1.准备编译环境 apt-get install libpcre3-dev build-essential libssl-dev在这里 htt…LNMP Linux Nginx MySQL PHP 安装Nginx 执行以下命令即可: apt-get install nginx 不过源里的版本是0.7.65不喜欢老旧的玩意可以尝试编译安装。 编译安装nginx. 1.准备编译环境 apt-get install libpcre3-dev build-essential libssl-dev 在这里 http://nginx.org/en/download.html 能找到nginx的tar球最新的官方稳定版是 1.2.0. 执行 cd /opt/ wget http://nginx.org/download/nginx-1.2.0.tar.gz tar -zxvf nginx-1.2.0.tar.gz cd /opt/nginx-1.2.0/ configure: ./configure --prefix/opt/nginx --usernginx --groupnginx --with-http_ssl_module configure完成后会输出nginx的一些相关信息 nginx path prefix: “/opt/nginx” nginx binary file: “/opt/nginx/sbin/nginx” nginx configuration prefix: “/opt/nginx/conf” nginx configuration file: “/opt/nginx/conf/nginx.conf” nginx pid file: “/opt/nginx/logs/nginx.pid” nginx error log file: “/opt/nginx/logs/error.log” nginx http access log file: “/opt/nginx/logs/access.log” nginx http client request body temporary files: “client_body_temp” nginx http proxy temporary files: “proxy_temp” nginx http fastcgi temporary files: “fastcgi_temp” make,安装,执行 make make install 给nginx进程添加用户nginx: adduser --system --no-create-home --disabled-login --disabled-password --group nginx 下载并安装启动脚本 wget -O init-deb.sh http://library.linode.com/assets/552-init-deb.sh mv init-deb.sh /etc/init.d/nginx chmod x /etc/init.d/nginx /usr/sbin/update-rc.d -f nginx defaults 启动一下试试 /etc/init.d/nginx start 如果输出正常那nginx就安装成功了。 配置虚拟主机: 如果从源里安装的nginx那nginx配置文件位于/etc/nginx/sites-enabled 下面是一个虚拟主机的配置实例 server {     listen   80;     server_name www.example.com example.com;     access_log /srv/www/example.com/logs/access.log;     error_log /srv/www/example.com/logs/error.log;     location / {         root   /srv/www/example.com/public_html;         index  index.html index.htm;     } } 注意配置文件中出现的目录必须存在nginx并不会自动创建他们所以还需要执行 mkdir -p /srv/www/example.com/public_html mkdir -p /srv/www/example.com/logs 如果是编译安装的版本相关路径见上文configure部分配置文件位于/opt/nginx/conf可以直接在nginx.conf添加 server段为了便于管理还是把虚拟主机独立出来好修改nginx.conf, 如下在http段添加include部分。 http { # [...] include /opt/etc/nginx/sites-enabled/*; # [...] } 添加完虚拟主机后别忘了重启以下nginx服务。 /etc/init.d/nginx restart 删除虚拟主机只需要删除对应的配置文件并重新启动一下下nginx就好。 安装php with fastcgi 执行 apt-get install php5-cli php5-cgi psmisc spawn-fcgi 执行下面的命令会下载并安装fastcgi的控制脚本: cd /opt/ wget -O php-fastcgi-deb.sh http://library.linode.com/assets/554-php-fastcgi-deb.sh mv /opt/php-fastcgi-deb.sh /usr/bin/php-fastcgi chmod x /usr/bin/php-fastcgi wget -O init-php-fastcgi-deb.sh http://library.linode.com/assets/553-init-php-fastcgi-deb.sh mv /opt/init-php-fastcgi-deb.sh /etc/init.d/php-fastcgi chmod x /etc/init.d/php-fastcgi /etc/init.d/php-fastcgi start update-rc.d php-fastcgi defaults 然后在虚拟主机的配置文件里面添加php支持示例如下 server {     server_name www.example.com example.com;     access_log /srv/www/example.com/logs/access.log;     error_log /srv/www/example.com/logs/error.log;     root /srv/www/example.com/public_html;     location / {         index index.html index.htm index.php;     }     location ~ \.php$ {         include /etc/nginx/fastcgi_params;         fastcgi_pass  127.0.0.1:9000;         fastcgi_index index.php;         fastcgi_param SCRIPT_FILENAME /srv/www/example.com/public_html$fastcgi_script_name;     } } 最后重启一下nginx服务 /etc/init.d/nginx restart 安装MySQL: 执行 apt-get install mysql-server php5-mysql 安装过程中会要求输入数据库的初始密码 还可以执行一下 mysql_secure_installation 禁用root的远程登录即可。 如果需要重新设置MySQL的密码执行 dpkg-reconfigure mysql-server-5.0 最后重启一下fastcgi: /etc/init.d/php-fastcgi restart 至此LNMP安装完成。 本文翻译自Linode的Library文章http://library.linode.com/lemp-guides/ubuntu-10.04-lucid#sph_id7 文中的操作系统是Ubuntu 10.04你可以访问上面的连接获取更多信息。个人更推荐一键傻瓜安装包:
http://www.pierceye.com/news/134405/

相关文章:

  • 海宁做网站的公司seo怎么学在哪里学
  • 佛山做网站多少钱服务器学生
  • 自己建网站卖东西怎么进入wordpress修改界面
  • 网站建设与制作报价wordpress菜单怎么设置目录册
  • 学生免费建设网站建设网站是否等于开展网络营销
  • 旅游网站结构图网站编程图
  • 达内网站开发培训价格安装百度到手机桌面
  • 网站服务器慢建站设计网站
  • wordpress 多站点 插件怎么做网站主页设计
  • 网站建设初稿wordpress删除自豪的
  • 某网站突然不能浏览了网站不备案能用吗
  • 厦门做个网站多少钱360建筑网官网下载
  • 镇江外贸网站建设电子工程王粟
  • 申请网站建设经费wordpress做商城网站
  • google下载app西安分类信息seo公司
  • 淘宝是什么语言做的网站手机网站开发+手机模拟器
  • 视频网站开发框架小说类网站功能建设
  • 网站规划与设计案例网站建设方案设计
  • 漯河网站建设费用成都网站建设重庆最加科技
  • 莱芜 网站wordpress 关闭警告
  • 深圳做棋牌网站建设哪家技术好建设一个网站的规划
  • 网站开发流程比较合理网站已经申请了域名 接下来怎么
  • 校园电商平台网站建设网站网址模板
  • 沈阳有资质做网站的公司温州做网站定制
  • wordpress codex网站seo和sem是什么意思
  • 建网站平台哪家好装修设计软件app排行
  • 网站开发文档撰写企业管理培训课程图片
  • 网站开发公司资质wordpress文章管理模板
  • 建筑网站知识大全江苏有哪些网站建设的公司
  • 江汉网站建设用js做网站登录