path: /etc/httpd/conf
ErrorLog logs/error_log
Set the log output destination in error_log of php.ini.
When describing the file name, write it with absolute path.
随机应变 ABCD: Always Be Coding and … : хороший
path: /etc/httpd/conf
ErrorLog logs/error_log
Set the log output destination in error_log of php.ini.
When describing the file name, write it with absolute path.
To display as HTML on the web, specify the log output level and turn on the log display setting.
display_errors = Off
To keep it in the file, set log_errors.
log_errors = On
just write php.ini
phpinfo();
which says “/etc/php.ini”
php command: php -i
[vagrant@localhost ~]$ php -i | grep php.ini Configuration File (php.ini) Path => /etc Loaded Configuration File => /etc/php.ini
php –ini
[vagrant@localhost ~]$ php --ini Configuration File (php.ini) Path: /etc Loaded Configuration File: /etc/php.ini Scan for additional .ini files in: /etc/php.d Additional .ini files parsed: /etc/php.d/20-bz2.ini, /etc/php.d/20-calendar.ini, /etc/php.d/20-ctype.ini, /etc/php.d/20-curl.ini, /etc/php.d/20-dom.ini, /etc/php.d/20-exif.ini, /etc/php.d/20-fileinfo.ini, /etc/php.d/20-ftp.ini, /etc/php.d/20-gd.ini, /etc/php.d/20-gettext.ini, /etc/php.d/20-iconv.ini, /etc/php.d/20-intl.ini, /etc/php.d/20-json.ini, /etc/php.d/20-mbstring.ini, /etc/php.d/20-mysqlnd.ini, /etc/php.d/20-pdo.ini, /etc/php.d/20-phar.ini, /etc/php.d/20-simplexml.ini, /etc/php.d/20-sockets.ini, /etc/php.d/20-sqlite3.ini, /etc/php.d/20-tokenizer.ini, /etc/php.d/20-xml.ini, /etc/php.d/20-xmlwriter.ini, /etc/php.d/20-xsl.ini, /etc/php.d/30-mysqli.ini, /etc/php.d/30-pdo_mysql.ini, /etc/php.d/30-pdo_sqlite.ini, /etc/php.d/30-wddx.ini, /etc/php.d/30-xmlreader.ini, /etc/php.d/40-zip.ini
locate php.ini
[vagrant@localhost ~]$ locate php.ini -bash: locate: コマンドが見つかりません
find
[vagrant@localhost ~]$ sudo find / -name php.ini /home/vagrant/app/translation/php-docs-samples/appengine/php55/wordpress/files/p hp.ini /home/vagrant/app/translation/php-docs-samples/appengine/php55/http/php.ini /home/vagrant/app/translation/php-docs-samples/appengine/php55/phpmyadmin/php.in i /home/vagrant/app/translation/php-docs-samples/appengine/php55/grpc/php.ini /home/vagrant/app/translation/php-docs-samples/appengine/php72/wordpress/files/p hp.ini /home/vagrant/app/translation/php-docs-samples/appengine/php72/trace/php.ini /home/vagrant/app/translation/php-docs-samples/appengine/php72/errorreporting/ph p.ini /home/vagrant/app/translation/php-docs-samples/appengine/php72/grpc/php.ini /home/vagrant/app/translation/php-docs-samples/appengine/flexible/wordpress/file s/php.ini /home/vagrant/app/translation/php-docs-samples/appengine/flexible/memcache/php.i ni /etc/php.ini
すげーーーーーーー
Log type
The logs are not all the same, but the purpose are different depending on the type.
– application log
– accessibility log
– security log
– other
Overall view of log processing
– collect: AmazonS3, Amazon Kinesis, Amazon DynamoDB, Amazon RDS(Aurora)
– process: AWS Lambda, KCL Apps
– analyze: Amazon EMR
– save: Amazon Redshift, Amazon Machine Learning
Logs output from AWS services
Log specific to each environment such as OS and application
VBoxManage Introduction
https://www.virtualbox.org/manual/ch08.html#idm3663
As briefly mentioned in Section 1.17, “Alternative Front-Ends”, VBoxManage is the command-line interface to Oracle VM VirtualBox. With it, you can completely control Oracle VM VirtualBox from the command line of your host operating system. VBoxManage supports all the features that the graphical user interface gives you access to, but it supports a lot more than that. It exposes all the features of the virtualization engine, even those that cannot be accessed from the GUI.
Display a list of virtual machines created by VirutalBox.
VBoxManage list vms
create virtual machine name
specify the virtual machine name to create the VirualBox configuration file.
VBoxManage createvm --name CentOS-6.4-x86_64-minimal
Virtual Machine Settings
Registered the virtual machine, there is nothing set up for the virtual machine, so set up the virtual machine.
In addition to the specifications of the above virtual machines, the clipboard sharing is specified bidirectionally, and the boot order is changed from HDD to DVD to NET here.
VBoxManage modifyvm CentOS-6.4-x86_64-minimal --ostype RedHat_6
Create a virtual hard disk
Create a virtual hard disk with a fixed size. Although you can specify an arbitrary folder with the -filename option, it is created by specifying the folder to save the VirtualBox.
VBoxManage createhd --size 8192 --variant Fixed --filename F:/VirtualBox/CentOS-6.4-x86_64-minimal/CentOS-6.4-x86_64-minimal.vdi
Add storage controller
Add a SATA(Serial ATA) controller to assign virtual hard disk and virutal DVD drive. In addition to sata, ide / sscsi / floppy can be specified. Also, by specifying -bootable on, it is set as a Bootable controller.
$ VBoxManage storagectl CentOS-6.4-x86_64-minimal --name SATA --add sata --sataportcount 5 --bootable on
Assign virtual hard disk
After adding the storage controller, assign the virtual hard disk by specifying the name of the added storage controller.
VBoxManage storageattach CentOS-6.4-x86_64-minimal --storagectl SATA --port 1 --type hdd --medium F:/VirtualBox/CentOS-6.4-x86_64-minimal/CentOS-6.4-x86_64-minimal.vdi
Assign virtual DVD drive
Like the virtual hard disk, assign a virtual DVD drive. The installation media specifies CentOs – 6.4 x86 – 64 minimal .iso.
$ VBoxManage storageattach CentOS-6.4-x86_64-minimal --storagectl SATA --port 2 --type dvddrive --medium I:/ISO/CentOS/CentOS-6.4-x86_64-minimal.iso
Starting a virtual machine
Now that the setting of the virtual machine has been completed, start the virutal machine.
VBoxManage startvm CentOS-6.4-x86_64-minimal
[vagrant@localhost tests]$ ls index.php test [vagrant@localhost tests]$ cat index.php <?php ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <script src="tinymce/js/tinymce/tinymce.min.js"></script> <script> tinymce.init({ selector:"#tiny", // menubar: false, plugins: "textcolor image link", toolber: [ "undo redo | formatselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent", "fontsizeselect forecolor image link" ], statusbar: false, }); </script> </head> <body> <textarea id="tiny" name=""></textarea> </body> </html> [vagrant@localhost tests]$ ln -s index.php copy [vagrant@localhost tests]$ ls copy index.php test [vagrant@localhost tests]$ cat copy <?php ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <script src="tinymce/js/tinymce/tinymce.min.js"></script> <script> tinymce.init({ selector:"#tiny", // menubar: false, plugins: "textcolor image link", toolber: [ "undo redo | formatselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent", "fontsizeselect forecolor image link" ], statusbar: false, }); </script> </head> <body> <textarea id="tiny" name=""></textarea> </body> </html>
すげーーーーーーー linux
-r
This is used to delete directories. Even if there is a directory in the directory, all deletion will be done.
-f
It is ok to delete the file on linux without confirmation. For example, when deleting a large number of files, it is commonly used option when it is troublesome to check each time. Also, no warning will be issued even if the file does not exist.
[vagrant@localhost tests]$ ls
dmm index.php test
[vagrant@localhost tests]$ rm -rf dmm
[vagrant@localhost tests]$ ls
index.php test
Check the permission with the “ll” command.
[vagrant@localhost tests]$ ll
合計 12
drwxr-xr-x 2 vagrant vagrant 4096 2月 17 14:36 2019 dmm
-rw-rw-r– 1 vagrant vagrant 551 2月 10 11:26 2019 index.php
drwxr-xr-x 4 vagrant vagrant 4096 2月 15 08:53 2019 test
[vagrant@localhost tests]$ cd dmm
[vagrant@localhost dmm]$ ll
合計 0
-rw-rw-r– 1 vagrant vagrant 0 2月 17 14:36 2019 dmm.txt
drwxr-xr-x is 755
-rw-rw-r– is 644
[vagrant@localhost tests]$ chmod -R 764 dmm
[vagrant@localhost tests]$ ll
合計 12
drwxrw-r– 2 vagrant vagrant 4096 2月 17 14:36 2019 dmm
-rw-rw-r– 1 vagrant vagrant 551 2月 10 11:26 2019 index.php
drwxr-xr-x 4 vagrant vagrant 4096 2月 15 08:53 2019 test
[vagrant@localhost tests]$ cd dmm
[vagrant@localhost dmm]$ ll
合計 0
-rwxrw-r– 1 vagrant vagrant 0 2月 17 14:36 2019 dmm.txt
originally tail is a command to display the last 10 lines(default) of the file.
As a command to be paired there is head, display the top 10 lines of the file. To change the number of lines to display, specify the number of lines with the -n option for both commands.
First i will make a sample file of 26 lines.
[vagrant@localhost tests]$ tail test.txt -数字表記- 0 --- 1 --x 2 -w- 3 -wx 4 r-- 5 r-x 6 rw- 7 rwx ※2進数に直した3bitに当てはめる。 [vagrant@localhost tests]$ tail -n 3 test.txt 6 rw- 7 rwx ※2進数に直した3bitに当てはめる。
tail -n
Even if it is displayed to the end of the file, it does not end and when the end of the file is updated, the addition is displayed continuously.
add new line
command line automatically updated.
こりゃ驚いた
The cp command on Unix/linux is a command to copy files and directories. Since the cp command has existed for a long time(it appeared in the first Unix V1), it can be used with any UNIX/Linux OS.
option
-R : copy directory recursively
[vagrant@localhost tests]$ ls
index.php test
[vagrant@localhost tests]$ cp -r test test2
[vagrant@localhost tests]$ ls
index.php test test2
すげーーーーーー