你好Bug

BUG球的站

Scroll Down

xxx is not in the sudoers file 解决

解决方案:
首需要切换到root身份
$su -
(注意有- ,这和su是不同的,在用命令"su"的时候只是切换到root,但没有把root的环境变量传过去,还是当前用户的环境变量,用"su -"命令将环境变量也一起带过去,就象和root登录一样)

然后
$visudo //切记,此处没有vi和sudo之间没有空格

1、移动光标,到最后一行
2、按a,进入append模式
3、输入
your_user_name ALL=(ALL) ALL
4、按Esc
5、输入“:w”(保存文件)
6、输入“:q”(退出)

这样就把自己加入了sudo组,可以使用sudo命令了。

安装Discourse时报错`require': cannot load such file -- bundler (LoadError)

qubot@qubot-virtual-machine:~$ bundle install
/home/qubot/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler (LoadError)

    from /home/qubot/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/bin/bundle:7:in `<main>'


安装bundler就行
qubot@qubot-virtual-machine:~$ gem install bundler
Fetching: bundler-1.16.1.gem (100%)
Successfully installed bundler-1.16.1
Parsing documentation for bundler-1.16.1
Installing ri documentation for bundler-1.16.1
Done installing documentation for bundler after 6 seconds
1 gem installed

安装了AMH,typecho后,后台登陆,以及打开文章出现404解决方案

nano /home/wwwroot/cn/vhost/qubot.cn.conf
location ~ ^(.+\.php)(.*)$
        {
                fastcgi_pass  unix:/tmp/php-cgi-cn-qubot.cn.sock;
                fastcgi_index index.php;
                fastcgi_split_path_info ^(.+\.php)(.*)$;
                fastcgi_param PATH_INFO $fastcgi_path_info;
                include fcgi.conf;
                fastcgi_param DOCUMENT_ROOT  /home/wwwroot/cn/domain/qubot.cn/web$subdomain;
                fastcgi_param SCRIPT_FILENAME  /home/wwwroot/cn/domain/qubot.cn/web$subdomain$fastcgi_script_name;
        }