分类 ‘Apache’ 归档文章

Apache says DocumentRoot doesn’t exist when it does

This is due to SELinux, once you disable the SELinux, by changing /etc/selinux/config.

Done.

开通新浪微博 @FreeLAMP

2013.12.12 继续开始写博客。微博需要实名认证,就放弃了。

2014.8.21 后记:请大家不要粉我了。我会继续把这个网站经营下去的。

=================================================================

由于没有很多的时间写作,只是会把自己看到的,想到的,直接转到微博上,加几句自己的评论。

欢迎上新浪微博粉我: @FreeLAMP

 

Soalris 上安静模式安装 SMI Agent

cd /var/tmp/Solaris

sh ./install.bin -f ../SilentInstallation.properties
Preparing to install…
Extracting the JRE from the installer archive…
Unpacking the JRE…
Extracting the installation resources from the installer archive…
Configuring the installer for this system’s environment…

Launching installer…

Preparing SILENT Mode Installation…

===============================================================================
Brocade SMI Agent                 (created with InstallAnywhere by Macrovision)
——————————————————————————-

===============================================================================
Installing…
————-

[==================|==================|==================|==================]
[——————|——————|——————|——————]

Installation Complete.

 

 

SilentInstallation.properties 文件内容:赋值部分:

INSTALLER_UI = silent
USER_INSTALL_DIR = /opt/SMI
INSTALLER_LOG_FILE = /var/tmp/installsmi.log
CIMOM_HTTP_PORT = 5988
CIMOM_HTTPS_PORT = 5989
CLIENT_AUTH_DISABLED = 1
IND_AUTH_DISABLED = 1
SECURITY_DISABLED = 1
WINDOWS_DOMAIN_AUTH_DISABLED = 1
CONSOLE_LOGGING_DISABLED = 1
FILE_LOGGING_ENABLED = 1
LOG_FILE_NAME = /var/adm/smi.log
LOG_FILE_COUNT = 5
LOG_FILE_SIZE = 10240
SERVICE_ENABLED = 1

Sparc 平台上检测机器型号和序列号

uname -a 不能正确显示型号,

# uname -a
SunOS xxxx 5.10 Generic_142900-15 sun4u sparc SUNW,SPARC-Enterprise

可以用 prtconf 命令检查  banner-name 来知道具体的型号。

# prtconf -bv
name:  SUNW,SPARC-Enterprise
model:  FF1
banner-name:  SPARC Enterprise M4000 Server
idprom:  01850021.286e5d5e.00000000.6e5d5e8d.00000000.00000000.00000000.00000000
openprom model:  SUNW,4.24.15
openprom version: ‘OBP 4.24.15 2010/09/29 10:16’

 

另外可以用 prtpicl 命令来检查机器序列号,而不需要通过 console 去检查,或者用执行时间比较长的: prtdiag -v

# prtpicl -vc chassis

:MfgName       Sun Microsystems, Inc

:SerialNumber  0839SSS888 <Faked one  for privacy>

:Description   SUNW,Sun Fire T2000 Chassis

在  Non-Sun 的 Sparc 平台上, 可以用:

prtpicl -v -c jupiter 来检查

 

Solaris x86 平台则可以用 smbios -t1 来查看序列号。

 

Sparc 上编译 filebench 1.4.8

filebench 是一个做磁盘,文件系统性能测试的工具,目前是 OpenSolaris 的一部分,最新的版本不提供安装包, 必须自己编译。

以下是简单的几个步骤: (更多…)

解决 Mambo 升级到 4.65 的问题以及 WordPress 不能升级的问题

Mambo 升级到  4.65 后,系统报告

Warning: Invalid argument supplied for foreach() in .../includes/cmtclasses.php on line 713
Warning: Invalid argument supplied for foreach() in ...l/includes/cmtclasses.php on line 653

Google 后发现 http://forum.mambo-foundation.org/showthread.php?t=7205 需要添加一个列到  mos_modules 表中。

mysql> alter table mos_modules  add column groups text not null;

WordPress 是不能自动升级,提示 "您没有足够的权限访问这个页面", Google 后发现 修改 wp_options 中的 一个  wp_user_roles 的 option_value: 


update wp_options set option_value='a:5:{s:13:"administrator";a:2:{s:4:"name";s:13:"Administrator";s:12:"capabilities";a:64:{s:13:"switch_themes";b:1;s:11:"edit_themes";b:1;s:16:"activate_plugins";b:1;s:12:"edit_plugins";b:1;s:10:"edit_users";b:1;s:10:"edit_files";b:1;s:14:"manage_options";b:1;s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:6:"import";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:8:"level_10";b:1;s:7:"level_9";b:1;s:7:"level_8";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;s:12:"delete_users";b:1;s:12:"create_users";b:1;s:17:"unfiltered_upload";b:1;s:14:"edit_dashboard";b:1;s:14:"update_plugins";b:1;s:14:"delete_plugins";b:1;s:15:"install_plugins";b:1;s:13:"update_themes";b:1;s:14:"install_themes";b:1;s:24:"NextGEN Gallery overview";b:1;s:19:"NextGEN Use TinyMCE";b:1;s:21:"NextGEN Upload images";b:1;s:22:"NextGEN Manage gallery";b:1;s:19:"NextGEN Manage tags";b:1;s:29:"NextGEN Manage others gallery";b:1;s:18:"NextGEN Edit album";b:1;s:20:"NextGEN Change style";b:1;s:22:"NextGEN Change options";b:1;s:17:"manage_newsletter";b:1;}}s:6:"editor";a:2:{s:4:"name";s:6:"Editor";s:12:"capabilities";a:34:{s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;}}s:6:"author";a:2:{s:4:"name";s:6:"Author";s:12:"capabilities";a:10:{s:12:"upload_files";b:1;s:10:"edit_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:4:"read";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;s:22:"delete_published_posts";b:1;}}s:11:"contributor";a:2:{s:4:"name";s:11:"Contributor";s:12:"capabilities";a:5:{s:10:"edit_posts";b:1;s:4:"read";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;}}s:10:"subscriber";a:2:{s:4:"name";s:10:"Subscriber";s:12:"capabilities";a:2:{s:4:"read";b:1;s:7:"level_0";b:1;}}}a:5:{s:13:"administrator";a:2:{s:4:"name";s:13:"Administrator";s:12:"capabilities";a:64:{s:13:"switch_themes";b:1;s:11:"edit_themes";b:1;s:16:"activate_plugins";b:1;s:12:"edit_plugins";b:1;s:10:"edit_users";b:1;s:10:"edit_files";b:1;s:14:"manage_options";b:1;s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:6:"import";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:8:"level_10";b:1;s:7:"level_9";b:1;s:7:"level_8";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;s:12:"delete_users";b:1;s:12:"create_users";b:1;s:17:"unfiltered_upload";b:1;s:14:"edit_dashboard";b:1;s:14:"update_plugins";b:1;s:14:"delete_plugins";b:1;s:15:"install_plugins";b:1;s:13:"update_themes";b:1;s:14:"install_themes";b:1;s:24:"NextGEN Gallery overview";b:1;s:19:"NextGEN Use TinyMCE";b:1;s:21:"NextGEN Upload images";b:1;s:22:"NextGEN Manage gallery";b:1;s:19:"NextGEN Manage tags";b:1;s:29:"NextGEN Manage others gallery";b:1;s:18:"NextGEN Edit album";b:1;s:20:"NextGEN Change style";b:1;s:22:"NextGEN Change options";b:1;s:17:"manage_newsletter";b:1;}}s:6:"editor";a:2:{s:4:"name";s:6:"Editor";s:12:"capabilities";a:34:{s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;}}s:6:"author";a:2:{s:4:"name";s:6:"Author";s:12:"capabilities";a:10:{s:12:"upload_files";b:1;s:10:"edit_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:4:"read";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;s:22:"delete_published_posts";b:1;}}s:11:"contributor";a:2:{s:4:"name";s:11:"Contributor";s:12:"capabilities";a:5:{s:10:"edit_posts";b:1;s:4:"read";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;}}s:10:"subscriber";a:2:{s:4:"name";s:10:"Subscriber";s:12:"capabilities";a:2:{s:4:"read";b:1;s:7:"level_0";b:1;}}}' 
where option_name="wp_user_roles";


解决 Discuz! 的 .htaccess 问题

Discuz! 移植到 GoDaddy 后,发现原来的 URL 优化在新的服务器上都是 404 错误了。  Google 搜索都说 通过 添加

# Options -Multiviews 或者  # Options +FollowSymLinks 来解决的,在我的环境下,证明这些打开都没有用而是去掉第一个 domain 的信息。

RewriteEngine On
RewriteBase /
RewriteRule ^forum-([0-9]+)-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2
RewriteRule ^archiver/((fid|tid)-[\w\-]+\.html)$ archiver/index.php?$1
RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ viewthread.php?tid=$1&extra=page\%3D$4&page=$2
RewriteRule ^space-(username|uid)-(.+)\.html$ space.php?$1=$2
RewriteRule ^tag-(.+)\.html$ tag.php?name=$1
~
~

问题随即解决。

原来的控制文件如下:

RewriteEngine On
RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$ $1/archiver/index.php?$2
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&page=$3
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3
RewriteRule ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2

gmail is:unread

Gmail is really fancy and high productivity. Though still need some mental labor to discover features.

I want to mark all my unread messages to be read, though difficult to select.

Use the advance search feature, from the drop down of the search criteria, select “unread messages”, the result will show you the search keywords as “is:unread”.

So just go to the label you want to check all unread, in the input bar, append “is:unread”, it will display all the unread messages for that label.

Server Migrated to GoDaddy

Bought a 7 USD per month hosting plan from GoDaddy, annual cost only 84 USD, compare with the local Chinese vendor charged me 4500 RMB, huge difference!

The migration is very easy. Just install the WordPress application on godaddy, then import the DBs on the old server, then copy the themes/plugins, That’s all.

The original latest LAMP software version RSS, need to fix though.   🙂

Upgrade Gallery 1.5 to Gallery 2

添加国庆节的照片到老的 Gallery 1.5 版本上出错了,终于决定升级系统到 Gallery 2。 有现成的文档可以参考。

虽然不能说不费吹灰之力,但是相对还是比较简单的。

URL 的重写虽然遇到了一点小问题,但是最终还是成功了。

明显的 G2 要比 G1 漂亮多了。 实际上,在研究的时候也发现,G3正式版 已经于 10/5 发布了。 等 G2 稳定一段时间后,再升级到? G3 吧, 或许是明年的春节呢。

Google+