This site is providing technical information based on LAMP stack. My primary focus is on web systems and services, such as LAMP stack, Amazon Web Services(EC2, S3 and SQS) and software tools, plus Oracle Databse. I invite you to stop by the blog, where you can read and comment on programming, scientific posts or the information.
A root name server is a name server for the Domain Name System's root zone. It directly answers requests for records in the root zone
and answers other requests returning a list of the designated authoritative name servers for the appropriate top-level domain (TLD).
The newest DNS root zoon on.
|
# dig @a.root-servers.net ns |
If you run the following script, you got an error sometimes.
| if [ -e /tmp/* ]; then echo "files exist" else echo "No file exists" fi |
This is using -e (existing a file check) that is working fine on individual files. This code works fine if the result is one file;
but if you have more files returned, it fails with the following error:
line x: [: too many arguments
By default, RHEL 6 configures two workspaces.
To increase the number of available workspaces :
1. Right click with the mouse on the workspace control in the panel.
2. Select Preferences.
3. Simply increase the Number of workspaces value to the desired number.
The name of each workspace may be changed by double clicking on the default name in the list
(Workspace 1, Workspace 2 etc) and typing in a new name.
The portreserve program aims to help services with well-known ports that lie in the portmap range.
It prevents portmap from a real service's port by occupying it itself, until the real service tells it to release the
port (generally in the init script).
1. Install the package for RedHat / CentOS 6
|
# yum search portreserve # yum install portreserve |
|
<?PHP echo $$a_var; |
Output :
| This is a test. |
| <?php class foo { function do_foo() { echo "Execute do_foo function in class foo"; } } $bar = new foo; |
You can execute a method in a class object.
If you want to figure out large files in a specific directory.
|
# du -s /var/log/* | sort -nr | head -5 There are a lot of files in a current directory and want to figure out. # du -s ./* | sort -nr | head -5 |
This command is used to summarize disk usage of each file in a file system, recursively for directories.
The default MySQL's datadir is placed in the /var/lib/mysql.
if you plan on using MySQL tables to store a lot of data and your /var partition might be a small space, it causes a space problem.
You had better move the MySQL's datadir to another space.
1. Stop your mysql server
| # service mysqld stop (or /etc/init.d/mysqld stop) |
2. Create the new directories
3. chown the directory to the mysql:mysql user
If you install Nagios into CentOS v6, you need the following packages.
Check the packages before the installation.
| yum install httpd php yum install gcc glibc glibc-common yum install gd gd-devel yum install openssl-devel |