This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ php -r 'echo date("r");' | |
Mon, 27 Oct 2014 14:15:48 +0300 | |
//--------------------------------------------------------- | |
<?php | |
ini_set('error_reporting', E_ALL); | |
error_reporting(E_ALL); | |
ini_set('log_errors',TRUE); | |
ini_set('html_errors',FALSE); | |
ini_set('error_log','php.log'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://xdebug.org/install.php#configure-php | |
http://blog.jetbrains.com/phpstorm/2013/08/debugger-configuration-validation-with-phpstorm/ | |
on CentOS: | |
1. You need to install PHP’s devel package for PHP commands execution | |
yum install php-devel | |
yum install php-pear | |
2. Next install GCC and GCC C++ compilers to compile Xdebug extension yourself. | |
yum install gcc gcc-c++ autoconf automake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum update | |
yum upgrade | |
tzselect | |
yum groupinstall "Web Server" | |
yum groupinstall "MySQL Database Server" | |
yum groupinstall "PHP Support" | |
service mysqld start | |
mysql_secure_installation | |
service httpd start | |
chkconfig httpd on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# backup /boot | |
dd if=/dev/sda1 conv=sync,noerror bs=1024K | gzip -c > /media/db471742-b20a-cf01-d047-1342b20acf01/boot.sda1.img.gz | |
# backup / | |
dd if=/dev/sda2 conv=sync,noerror bs=1024K | gzip -c > /media/db471742-b20a-cf01-d047-1342b20acf01/root.sda2.img.gz | |
# backup /var | |
dd if=/dev/sdb6 conv=sync,noerror bs=1024K | gzip -c > /media/db471742-b20a-cf01-d047-1342b20acf01/var.sdb6.img.gz | |
#################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sestatus | |
sestatus -b | grep sendmail | |
setsebool httpd_can_sendmail=1 | |
setsebool httpd_can_network_connect=1 | |
ls -lZ /etc/httpd | |
ls -dZ /var/www/domain | |
chcon -Rv --type=httpd_sys_content_t /var/www/domain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Enable dotnet3.5: | |
Dism /online /enable-feature /featurename:NetFx3 /All /Source:D:\sources\sxs /LimitAccess | |
Boot into safe mode: | |
msconfig.exe | |
Restore MBR: | |
bootrec.exe /fixmbr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) mkdir /newvar | |
2) mount /dev/md40 /newvar | |
3) cp -Rax /var /newvar | |
4) mv /var /oldvar | |
5) change fstab to mount /var to /dev/md40 | |
fix security labels after move: | |
$ restorecon /var |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set prefix=(hd0,1)/boot/grub2 | |
insmod (hd0,1)/boot/grub2/i386-pc/linux.mod | |
set root=(hd0,1) | |
linux /vmlinuz-nrj-desktop root=/dev/sda2 | |
initrd /initrd-nrj-desktop.img | |
boot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<unattend xmlns="urn:schemas-microsoft-com:unattend"> | |
<settings pass="oobeSystem"> | |
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<FolderLocations> | |
<ProfilesDirectory>d:\Users</ProfilesDirectory> | |
</FolderLocations> | |
</component> | |
</settings> | |
<cpi:offlineImage cpi:source="wim:F:/sources/install.wim#Windows 8 PRO" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# what's up in there: | |
cat /sys/block/sda/queue/scheduler | |
cat /sys/block/sda/queue/iosched/fifo_batch | |
# FileSys MountPt Type Options Dump Pass | |
tmpfs /tmp tmpfs defaults,noatime,mode=1777,size=15% 0 0 | |
tmpfs /var/tmp tmpfs defaults,size=5% 0 0 | |
tmpfs /var/log tmpfs defaults,size=5% 0 0 | |
# modes: |
OlderNewer