Tuesday, November 28, 2017

php-screw-plus

There is a need to encrypt the php codes.

Here is free solution besides zend-guard:
1. php-screw: http://blog.csdn.net/water_cow/article/details/41872091
2. Based on php-screw, php-screw-plus works great. https://github.com/del-xiong/screw-plus
免费开源的php加密扩展,使用aes加密,服务器未破解的情况下99.99999%安全

Thursday, March 3, 2016

AWS LAMP Setup, Scrapy Setup

Tutorial: Installing a LAMP Web Server on Amazon Linux

sudo yum install -y httpd24 php56 mysql55-server php56-mysqlnd
sudo service httpd start
sudo chkconfig httpd on
sudo groupadd www
sudo usermod -a -G www ec2-user
sudo chown -R root:www /var/www
sudo chmod 2775 /var/www
find /var/www -type d -exec sudo chmod 2775 {} \;
find /var/www -type f -exec sudo chmod 0664 {} \;

# configure mysql, set root password
sudo mysql_secure_installation
sudo service mysqld restart
sudo chkconfig mysqld on

sudo yum-config-manager --enable epel
sudo yum install -y phpMyAdmin
sudo vim /etc/httpd/conf.d/phpMyAdmin.conf -- modify to enable remote access

# install Scrapy
sudo yum install libffi-devel
sudo yum groupinstall 'Development Tools'
sudo yum install openssl openssl-devel
sudo yum install libxslt-devel
sudo pip install Scrapy

# run Scrapy
scrapy startProject test
scrapy genspider test www.test.com

Tuesday, September 20, 2011

Before sleep

Dabao and beibei are watching Tom and jerry.

Sunday, September 18, 2011

MySQL UDF Execution - strong password

For mysql 5.5.8 or earlier on Windows, there is such danger about "User-defined-functions" execution.

So help, there is a need to 
1. Ensure the password is strong
2. Delete the "root" account for hostname "%" (i.e. others cannot use "root" account at other host)

A good habit:
1. Create new user privilege only on specific database it belongs to.
2. Have a strong password for the user account

What is a strong password:
Hint:
  • It needs to contain special characters such as @#$%^&
  • It must be at least 8 characters long.
  • It must not have any common words such as 123, password, your birth date, your login name and any words that can be found in the dictionary.
  • a variation of capitalization and small letters

Todo:
1. A password manager is needed to remember for you.

Friday, September 16, 2011

Dublin Core

The Dublin Core set of metadata elements provides a small and fundamental group of text elements through which most resources can be described and cataloged.


简单的都柏林核心原数据集(DCMES) 包括15种元数据元素:
  1. 标题(Title)
  2. 创建者(Creator)
  3. 主题(Subject)
  4. 描述(Description)
  5. 发行者(Publisher)
  6. 资助者(Contributor)
  7. 日期(Date)
  8. 类型(Type)
  9. 格式(Format)
  10. 标识符(Identifier)
  11. 来源(Source)
  12. 语言(Language)
  13. 关系(Relation)
  14. 范围(Coverage)
  15. 权限(Rights)
每一个都柏林核心元素都是可选合可以重复的。

 Now studying how greenstone or Dspace to make an online archive for qipao project.

Friday, August 19, 2011

Wordpress problem

For Worldpress web, need to enable

LoadModule rewrite_module modules/mod_rewrite.so

in httpd.conf

otherwise, the webpage can't show correctly.

http://155.69.146.102/category/networking/research-collaborator

Need to use the model to write to a pseudo html file

Monday, August 15, 2011

Backup innoDB database of mysql

Two main types of databases in mysql: MyISAM and InnoDB.

mysql/data contains all the databases. Each database is shown as a folder.

For MyISAM, just copy the data folder under mysql.
For InnoDB, can't just copy the frm files under data folder. There is a need to copy the "ibdata1" which contains the table info.

Best practice: use the backup function to export the database to mysql, then import.