大巧若拙,大辩若讷

最有智慧的人,真正有本事的人,虽然有才华学识,但平时像个呆子,不自作聪明;虽然能言善辩,但好像不会讲话一样。无论是初涉世事还是位居高官,无论是做大事还是一般人际关系,锋芒不可毕露。有了才华固然很好,但在合适的时机运用才华而不被或少被人忌,避免功高盖主,才算是更大的才华,这种才华对社会、对人对己才有真正的用处。

Ubuntu 配置SSL+Apache

启用ssl 模块, 并且重启Apache

sudo a2enmod ssl
sudo service apache2 restart

创建SSL密钥和证书保存的目录

sudo mkdir /etc/apache2/ssl

生成一个证书

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt

获取一个免费的有效证书https://www.startssl.com/
参考文章:http://blog.nicky1605.com/the-free-ssl-configuration-startssl-on-nginx.html

配置Apache:

sudo vim /etc/apache2/sites-available/default-ssl.conf

以下分别指向你的证书文件

SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.key

Fedora 安装Drupal 7出现files目录无权限

在安装Drupal 7时,竟然出现了Files目录无权限。但是我已经将我的files改成了 777(环境LAMP)
我的www目录是 /home/zhouitpro/d7
接着我在index.php 直接运行 mkdir(“./hello”); 也报了一个错误. 说没有权限

Warning: mkdir(): Permission denied

找到这里有一个解决办法: http://stackoverflow.com/questions/13908722/php-unable-to-create-a-directory-with-mkdir
应该是SELinux内容要重新设置一下类型

sudo chcon -R -t httpd_sys_content_rw_t /home/zhouitpro/www/

设置以后正学工作了

CentOS 安装LAMP

1. 基本安装

#yum install mysql-server httpd php php-mysql php-pdo php-gd php-pear php-dom php-mbstring

2. 开机启动mysql和Apache

#chkconfig httpd on
#chkconfig mysqld on

3. 配置mysql

#service mysqld start
#mysql_secure_installation
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y                                            
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] n
... Success!

By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

4. 测试PHP, 创建/var/www/html/info.php

phpinfo()

5. 配置虚拟主机
\
ServerAdmin zhouitpro@gmail.com
DocumentRoot /var/www/html/baifi.com
ServerName www.baifi.com
ServerAlias baifi.com
\

2013年总结

2013年总结: 2013年整年大部分时间都在玩Drupal . 貌似从没有做过任何新项目。整年都在修Bug. 不过技术进步得很大。开发了Drupal Baidu map模块, 成为了Views slideshow管理. Nice menus维护。创建了Drupal博客 www.drupalmodule.cn.
玩过框架
1. Symfony:听起来蛮历害的样子,但是仍然没有深入学习.
2. laravel:一个用来装B的PHP框架
3. ruby on alias: 一个听起来很历害的样子的语言
4. Golang: 真正值得入手的语言

看过的书
1. 黑客与画家: 这是一本唯一让我读两次的书。
2. 浪潮巅峰: 非常好.一本让我赞不决口的书.
3. HTTP权威指南: 看了一半看不下去了。有难度
4. 重活: 也是一本非常不错的书
5. 人月神话: 名字听起来蛮历害的样子