vultr服务器重启后ssh连接不上,view console只能guest登录,遍寻方法,无解,无奈重装系统。

  服务器地址:Los Angeles

  系统: Ubuntu 14.04 x64

  用户:root

  需要重新部署以下环境:

  一、php+mysql+redis+nginx安装

   apt-get update  

   apt-get install vim  lrzsz unzip make vim

  1、nginx安装

  sudo apt-get install nginx

  /etc/init.d/nginx start
 
sudo apt-get install php5-cli php5-cgi php5-fpm php5-mcrypt php5-mysql
 3、安装Redis
sudo apt-get install redis-server
redis-cli --version

4、phpredis安装
https://github.com/nicolasff/phpredis下载

rz上传至/etc/redis/

(apt-get install lrzsz)

unzip phpredis-develop.zip

(apt-get install zip)

编译安装

cd phpredis/

  • phpize(如果提示出错的话, 执行 apt-get install php5-dev )
  • ./configure
  • make
  • make install
cd /etc/php5/cgi或其他vim php.ini加上extension = redis.so

4、mysql安装apt-get install mysql-server mysql-client

sudo service mysql restart

sudo apt-get install php5-mysql

mysql -u root -p

  二、wordpress、phpmyadmin安装

1、phpmyadmin安装

sudo apt-get install phpmyadmin

服务选择默认的apache2

软连接

cd /var/www/html/

sudo ln -s /usr/share/phpmyadmin phpmyadmin

nginx配置

server {
    listen   80;  

    root /usr/share/phpmyadmin;
    index index.html index.htm index.php;  

    # Make site accessible from http://phpmyadmin.xxx/, http://www.phpmyadmin.xxx/
    server_name phpmyadmin.xxx www.phpmyadmin.xxx;  

    access_log /var/log/nginx/phpmyadmin/access.log;
    error_log /var/log/nginx/phpmyadmin/error.log;  

    # /var/www/example-php.com/404.html
    error_page 404 /404.html;
    location = /404.html {
        root /var/www/example-php.com;
    }  

    # redirect server error pages to the static page /50x.html
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
        root /usr/share/nginx/www;
    }  

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini  

        #fastcgi_pass 127.0.0.1:9000;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
    }
}

  检查:sudo nginx -t

  报错:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] open() "/var/log/nginx/phpmyadmin/access.log" failed (2: No such file or directory)
nginx: configuration file /etc/nginx/nginx.conf test failed

  sudo mkdir /var/log/nginx/phpmyadmin

成功

解析地址,访问成功

2、wordpress安装

apt-get install wordpress

软连接

cd /var/www/html/

sudo ln -s /usr/share/wordpress wordpress

配置nginx

server {
        listen   80;

        root /var/www/html/wordpress;
        index index.html index.htm index.php;

        # Make site accessible from http://phpmyadmin.xxx/, http://www.phpmyadmin.xxx/
        server_name www.rainbowz.cn rainbowz.cn;

        access_log /var/log/nginx/wordpress/access.log;
        error_log /var/log/nginx/wordpress/error.log;

        # /var/www/example-php.com/404.html
        error_page 404 /404.html;
    location = /404.html {
                root /var/www/example-php.com;
        }

        # redirect server error pages to the static page /50x.html
        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
                root /usr/share/nginx/www;
        }

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        location ~ \.php$ {
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini

                #fastcgi_pass 127.0.0.1:9000;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;
        }
}

  mkdir /var/log/nginx/wordpress

重启nginx

service nginx restart

  三、vpn重装

详见

  四、加速

  五、vote项目配置

  上传解压vote项目文件

  修改nginx配置文件

  vim /etc/nginx/sites-available/default

  pathinfo模式的thinkphp项目

  

server{
        listen 80;
        server_name vote.rainbowz.cn;
        root /var/www/html/vote;
        index index.php index.html index.htm;
        location /{
                if (!-e $request_filename){
                        rewrite ^(.*)$ /index.php?s=$1 last;
                        break;
                }
        }
        location ~ ^(.+\.php)(.*) {
                fastcgi_pass unix:/run/php5-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;

                set $path_info "";
                set $real_script_name $fastcgi_script_name;

                if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$"){
                        set $real_script_name $1;
                        set $path_info $2;
                }
                fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
                fastcgi_param SCRIPT_NAME $real_script_name;
                fastcgi_param PATH_INFO $path_info;
        }

}

  新建数据库vote

  导入数据结构及数据

  修改项目配置文件

  vim /var/www/html/vote/App/Common/Conf/config.php    数据库配置

  vim /var/www/html/vote/App/Common/Conf/webConfig.php    修改微信配置

  微信公众平台---开发---基本配置----服务器配置,添加服务器地址,令牌

  微信公众平台---开发---接口权限---网页服务---网页授权,添加域名并验证

  【注意】1、Call to undefined function Common\Tool\curl_init()错误

sudo apt-get install php5-curl

  

vultr系统重建的更多相关文章

  1. Android app被系统kill的场景

    何时发生 当我们的app被切到后台的时候,比如用户按下了home键或者切换到了别的应用,总之是我们的app不再和用户交互了,这个时候对于我们的app来说就是什么事情都可能发生的时候了,因为系统会认为你 ...

  2. FreeBSD_11-系统管理——{Part_0-基础}

    Tips: sysctl -d kern.maxvnodes #查看系统控制选项的含义 true > file #清空文件内容 alias ls 'ls -I(大写i)' #取消 root 的 ...

  3. sqlserver数据库维护脚本大全,值得收藏

    下面的代码非但有图文,简直是视频,地址http://www.cnthc.com/?/article/67http://www.cnthc.com/?/article/73 --创建一个玩的数据库Cre ...

  4. kernel32.dll出错解决方案

    kernel32.dll 一.什么是kernel32内核文件 kernel32.dll是Windows 9x/Me中非常重要的32位动态链接库文件,属于内核级文件.它控制着系统的内存管理.数据的输入输 ...

  5. 解析八大O2O典范:他们都做了什么?

    随着无线技术的发展二维码的发展以及智能手机的普及,零售的解决方案不仅在在一台电脑上解决,可以从线上到线下,为消费者贯通线上线下的购物体验.人人都爱O2O,可做得好的O2O案例却并不多.要解决利益分配. ...

  6. 磁盘阵列RAID

                                                                                  磁盘阵列RAID 年提出的.RAID名为独立 ...

  7. [转]Windows Shell 编程 第九章 【来源:http://blog.csdn.net/wangqiulin123456/article/details/7987969】

    第九章 图标与Windows任务条 如果问一个非程序人员Windows最好的特色是什么,得到的答案应该是系统最有吸引力的图标.无论是Windows98现在支持的通用串行总线(USB)还是WDM(看上去 ...

  8. Web应用程序架构的比较

    架构 技术优势 技术挑战 团队优势 团队挑战 单体 低延时 开发简单 没有重复的模型/验证 伸缩 由于代码库过大引起的复杂度 特性内沟通的开销低 失败的恐惧 特性间沟通的开销大 前端+后端 能够单独扩 ...

  9. Android 基础 二 四大组件 Activity

    Activity Intent IntentFilter 一理论概述 一. Activity 用来提供一个能让用户操作并与之交互的界面. 1.1 启动 startActivity(Intent int ...

随机推荐

  1. 编译FreePascal源代码(摘录自邮件询问)

    为了尝试编译FreePascal,我搜了官方文档,并给几位作者都发了邮件询问,目前结果如下: http://wiki.lazarus.freepascal.org/Getting_Lazarus#Co ...

  2. [RK3288][Android6.0] 关于uboot中logo相关知识点小结【转】

    本文转载自:http://blog.csdn.net/kris_fei/article/details/76256224 Platform: Rockchip OS: Android 6.0 Kern ...

  3. 中小企业可参考的数据库架构-mysql篇

    引言 数据库在众多互联网公司中应用日益广泛,不同的公司,使用姿势不尽相同,尤其是大公司,各种自研架构,羡煞旁人.但是,作为中小企业,由于分工和团队规模限制,很难实现自研,大多数情况下,使用开源架构. ...

  4. maven目录结构介绍篇

    bin  该目录包含了mvn运行的脚本,这些脚本用来配置java命令,准备好classpath喝相关的java系统属性 mvn是基于UNIX平台shell脚本,mvn.bat是基于Windows平台的 ...

  5. Android沉浸式状态栏(透明状态栏)最佳实现

    Android沉浸式状态栏(透明状态栏)最佳实现 在Android4.4之前,我们的应用没法改变手机的状态栏颜色,当我们打开应用时,会出现上图中左侧的画面,在屏幕的顶部有一条黑色的状态栏,和应用的风格 ...

  6. 使用Python操作Redis应用场景

    1. 安装pyredis 首先安装pip   1 2 3 4 5 6 7 8 <SHELL># apt-get install python-pip ...... <SHELL> ...

  7. Gerrit+apache+H2数据库简单安装配置及建库流程

    Gerrit 是一个基于 Web 的代码评审和项目管理的工具,面向基于 Git 版本控制系统的项目.因此需要Apache.Mysql.GIT等相关软件的支持 系统配置: 新装的UBANTU LINUX ...

  8. Rails 浅谈 ActiveRecord 的 N + 1 查询问题(copy)

    [说明:资料来自https://ruby-china.org/topics/32364] ORM框架的性能小坑 在使用ActiveRecord这样的ORM工具时,常会嵌套遍历model.例如,有两个m ...

  9. win10系统安装loadrunner11提示“为了对电脑进行保护 已经阻止此应用”的解决方案

    在执行loadrunner安装包中的setup.exe时会有如下提示: 解决方法:点击Win+R快捷键打开运行,输入“ gpedit.msc”按下回车键打开组策略编辑: 在左边选择[计算机配置]→[W ...

  10. Objective-C NSData/NSMutableData

    创建于完成: 2018/02/06 总览: http://www.cnblogs.com/lancgg/p/8404975.html  数据类   简介 处理比特列 Foundation/NSData ...