Chinaunix首页 | 论坛 | 博客
  • 博客访问: 268249
  • 博文数量: 59
  • 博客积分: 1368
  • 博客等级: 中尉
  • 技术积分: 1071
  • 用 户 组: 普通用户
  • 注册时间: 2012-02-02 06:06
文章分类

全部博文(59)

文章存档

2012年(59)

我的朋友

分类: 系统运维

2012-03-01 11:22:35

phpMyAdmin导入文件限制:
修改php.ini
upload_max_filesize = 50M
post_max_size = 50M

终端导入数据库:
mysql -u root -p database_name < filename.sql

关闭和打开外键检查:
  1. SET FOREIGN_KEY_CHECKS = 0;
  2. SET FOREIGN_KEY_CHECKS = 1;

关闭和打开索引:
  1. LOCK TABLES `test` WRITE;
  2. ALTER TABLE `test` DISABLE KEYS ;
  3. ALTER TABLE `test` ENABLE KEYS;
  4. UNLOCK TABLES;
DELAY_KEY_WRITE:
这个参数只对 MyISAM有效,可以再create table 时指定 delay_key_write ,如果表已经存在可以使用 alter table sometable delay_key_write =1;

建立和删除索引
  1. DROP INDEX email ON fuinfo;
  2. CREATE UNIQUE INDEX email ON fuinfo(email);
  3. CREATE UNIQUE INDEX email_fid ON fuinfo(email, fid);
  4. DROP INDEX email_fid ON fuinfo;
  5. DROP INDEX email ON fuinfo;
所有目录755 所有文件644
  1. find . -type d -print0 | xargs -0 chmod 0755
  2. find . -type f -print0 | xargs -0 chmod 0644
flush dns cache
  1. Flush nscd dns cache

  2. Nscd caches libc-issued requests to the Name Service. If retrieving NSS data is fairly expensive, nscd is able to speed up consecutive access to the same data dramatically and increase overall system performance. Just restart nscd:
  3. $ sudo /etc/init.d/nscd restart
  4. OR
  5. # service nscd restart

  6. Flush dnsmasq dns cache

  7. dnsmasq is a lightweight DNS, TFTP and DHCP server. It is intended to provide coupled DNS and DHCP service to a LAN. Dnsmasq accepts DNS queries and either answers them from a small, local, cache or forwards them to a real, recursive, DNS server. This software is also installed many cheap routers to cache dns queries. Just restart to flush out dns cache:
  8. $ sudo /etc/init.d/dnsmasq restart

  9. Flush caching BIND server dns cache

  10. A caching BIND server obtains information from another server (a Zone Master) in response to a host query and then saves (caches) the data locally. All you have to do is restart bind to clear its cache:
  11. # /etc/init.d/named restart
ini_set

  1. if(!ini_get('safe_mode')) {
  2.     set_time_limit(240);
  3.     ini_set('memory_limit', '16M');
  4.     ini_set('upload_max_filesize', '10M');
  5.     ini_set('post_max_size', '10M');
  6.     ini_set('max_input_time', 300);
  7. }








阅读(937) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~