LAMP Test

1. Why LAMP?
Answers:
• it's flexible, productive, widespread and low cost (all components can be downloaded for free from Internet)
• all servers work under Linux
• there are no alternative
• only professionals can work with other alternatives
2. Which ID always  has a *nix superuser ?
Answers:
• 100
• 0
• 1
• 10
3. What has a higher priority: a record from the hosts file or a record from the DNS-server?
Answers:
• nothing
• a record from the hosts file
• a record from the DNS-server
• both
4. Which of the following apache directory has all server configuration files?
Answers:
• cgi-bin
• logs
• htdocs
• conf
5. What language should you  use for writing a queries for database?
Answers:
• PHP
• Python
• SQL
• Java
6. What's the name of Apache configuration file?
Answers:
• https.conf
• config.conf
• httpd.conf
• config.ini
7. An alternate name for a host is…
Answers:
• AnotherServer
• ServerAlias
• SecondServer
• AlternatePath
8. What domain name will have the following address - 127.0.0.1?
Answers:
• there is no name for this address
• localhost
• test
• home
9. What's LAMP (in the most cases)?
Answers:
• Linux + Apache+MySQL +Perl
• Linux + Apache+MySQL +Python
• Linux + Apache+MySQL +PHP
• Linux + ASP+MySQL +Python
10. The name of a web-based interface for work with databases is called…
Answers:
• webDBadmin
• phpmyadmin
• mysqladmin
• myadmin
11. What is HTTP?
Answers:
• nothing
• Home Television Transfer Protocol
• Hypertext Transfer Protocol
• HyperThreading Transfer Protocol
12. What is the name of a superuser in Linux?
Answers:
• administrator
• admin
• linus
• root
13. What is GNU Linux?
Answers:
• the name of penguin
• programming language
• the nickname of Linus Torvalds
• operating system
14. Which PHP extension is required for work with MySQL?
Answers:
• php_my_sql
• php_msql
• php_mysql
• php_db
15. Are there any variations of  LAMP for other platforms?
Answers:
• no
• yes [WAMP, WIMP (for Windows), MAMP (Mac OS), BAMP (BSD)]
16. What will this command cp file1 file2 do?
Answers:
• Will make a copy of file1 in the current working directory and call it file2 and will delete file1
• Will make a copy of file1 in the root directory and call it file2 and will delete file1
• Will make a copy of file1 in the root directory and call it file2
• Will make a copy of file1 in the current working directory and call it file2
17. How can you block users by IP address or by domain?
Answers:
• using a .htaccess file
• .htpasswd
• this is impossible
• using a php.ini file
18. Which of the following represents root directory?
Answers:
• "/"
• "*/"
• "\"
• "\*"
19. You do not have to specify a length with which of the following MySQL datatypes?
Answers:
• All of the options are valid
• MEDIUMBLOB
• TINYTEXT
• TINYBLOB
20. What is MySQL?
Answers:
• it's a database server
• it's a programming language
• it's a PHP interpreter
• it's a variation of a structured query language
21. Which directive is used to determine a virtual host?
Answers:
• <VirtualHost>...</VirtualHost>
• <VHost>...</VHost>
• <NewSite>...</NewSite>
• <VirtHost>...</VirtHost>
22. Which of the following are VALID SELinux (Security Enhanced Linux) security policies?
Answers:
• httpd_ssi_exec
• All of the options are valid
• httpd_enable_homedirs
• httpd_enable_cgi
23. What is a superuser in mysql usually called ?
Answers:
• admin
• user
• mysql
• root
24. How can you start a session in PHP script?
Answers:
• session_start()
• start_ session()
• session_begin()
• sessionstart()
25. Which of the following Linux command can be used to change file owner and group ?
Answers:
• chown
• chwn
• chggrp
• chgowner
26. Where hosts file (on *nix systems) is usually located?
Answers:
• /etc/hosts
• /root/hosts
• /usr/etc/hosts
• /var/www/hosts
27. Which of the following is not a valid directive of Apache Control Command (apachectl)?
Answers:
• kill
• stop
• start
• status
28. Which of the following is the main Apache configuration file?
Answers:
• /etc/httpd/config.ini
• /etc/srm.conf
• /etc/httpd/conf/httpd.conf
• /etc/apache.conf
29. What does "." (DOT) signify in Unix?
Answers:
• Root Directory
• It is not supported
• Parent Directory
• Current directory
30. What will be the output of command mysqladmin -u root -p drop TEST?
Answers:
• It will drop TEST user
• It will drop TEST database
• It will drop TEST table
• Invalid Command
31. What will be the output of this command : ls list* ?
Answers:
• This will list all files in the current directory starting with list
• This will list all files in the current directory ending with list
• This will list all files in the root directory starting with list
• This will list all files in the root directory ending with list
32. How to see information about PHP configuration from a script?
Answers:
• php_info()
• php_config()
• phpconfig()
• phpinfo()
33. What's the name of file, where user's information can be stored?
Answers:
• config
• cookie
• php.ini
• biscuit
34. Which of the following Linux command can be used to change the group ownership of files ?
Answers:
• changegrp
• chgrp
• chggroup
• chggrp
35. Which of the following is NOT a main apache directory?
Answers:
• logs
• apps
• htdocs
• conf
36. What does the following error "Access denied for user 'root'@'localhost' (using password: YES)" mean?
Answers:
• wrong database name
• wrong username
• wrong password and username
• wrong password
37. What's the name of a time-based job scheduler in *nix systems?
Answers:
• chronos
• cron
• crontab
• shell
38. Directive for definition a hostname is called…
Answers:
• Hostel
• NameOfTheHost
• Host
• ServerName
39. What will be the output of command mysqladmin -u root -p create TEST?
Answers:
• It will create a new table TEST
• It will create a new user TEST
• Invalid Command
• It will create a new database TEST
40. What will be the ouput of this command:  head -5 test.txt
Answers:
• It will create a new file with first 5 lines from test.txt
• It will create a new file with last 5 lines from test.txt
• It will write the first 5 lines of test.txt to the screen
• It will write the last 5 lines of test.txt to the screen
41. When will a PHP session be closed?
Answers:
• when the browser is closed
• after a span of user inactivity
• every 15 minutes
• when the browser is closed or after a span of user inactivity
42. Which of the following is a way to restart Apache on *nix system?
Answers:
• apache reboot
• httpd restart
• apache restart
• httpd reboot
43. To quote a string within a string, which of the following can you use?
Answers:
• This is the "quoted" message
• 'This is the quoted" message"'
• 'This is the "quoted" message'
44. Which of the following Linux command outputs the available free space in local hard-disk partitions?
Answers:
• du
• df
• free
• fdisk
45. What is the size limit for strings in php?
Answers:
• 100Mbytes
• There is no limit (hardware limit)
• 256Kbytes
• 1024bytes
46. What port does squid listen, by default?
Answers:
• 4322
• 2314
• 3128
• 7334
47. Which of the following statement tells the server to reload the grant tables?
Answers:
• REFRESH PRIVILEGES
• FLUSH PRIVILEGES
• RESET PRIVILEGES
• UPDATE PRIVILEGES
• RELOAD PRIVILEGES
48. What will be the output of the following code? <? echo false; ?>
Answers:
• 1
• Syntax error
• Nothing
• None of the above
49. How to use other/additional extensions/file types for PHP scripts, instead of using just .php?
Answers:
• None of the above
• edit the extensions in php.ini
• edit the 'extension' directive in php.ini
• use AddType directive in httpd.conf
50. Which of the following command can be used to get the value of env variables?
Answers:
• Both env and printenv
• env
• printenv
• echo
51. Are the IOT (Index Organized Tables) supported by MySQL?
Answers:
• yes
• the support will be added in the next (6) version
• no [it's the Oracle's type]
52. Which of the following is an INVALID column in user table in mysql database?
Answers:
• Truncate_priv
• Select_priv
• Delete_priv
• Insert_priv
53. Which of the following Apache Control Command: apachectl directive restarts the Apache httpd daemon?
Answers:
• restart
• Both graceful and restart
• start
• graceful
54. What is SESSION in PHP?
Answers:
• a record in config file
• a file in the cloud
• a text file
55. Where can you set up a server's name?
Answers:
• /etc/hosts
• php.ini
• httpd.conf
56. What is the year range for MySQL datatype YEAR (2)?
Answers:
• 1970 to 2069
• 1099 to 2099
• 1900 to 2099
• 1969 to 2070
57. Which of the following is TRUE about Inetd?
Answers:
• (both are correct)
• (neither is correct)
• UNIX handles many of its services through the internet daemon (inetd), as opposed to a constantly running daemon
• Inetd is a super server that listens to the various ports and handles connection requests as it receives them
58. Which of the following is not a VALID MySQL datatype?
Answers:
• DATE
• STRING
• DOUBLE
• DATETIME
59. The command "service httpd ______" allows users to check the syntax of Apache's configuration files.
Answers:
• chkconfig
• configchk
• configtest
• testconfig
60. In which tcp_wrappers file can you specify all connections from all hosts?
Answers:
• /etc/hosts.allow
• /etc/tcp.conf
• /etc/hosts.deny
• /etc/hosts
61. One advantage of hard links over symbolic links is:
Answers:
• A hard link does not become disconnected from the underlying file if the file is moved
• A hard link can span different filesystems
• You can determine the inode used by a hard link, but not for a symbolic link
• A hard link allows you to change the permissions on the underlying file
62. Which of the following file is a MySQL configuration file?
Answers:
• /etc/conf/mysql.cnf
• /etc/my.cnf
• /etc/conf/my.cnf
• /etc/mysql.cnf
63. Who clears a session files on server?
Answers:
• garbage cleaner daemon
• Apache
• no one
• PHP [Garbage Collector]
64. The SELinux (Security Enhanced Linux) security policies are enabled/disabled through which file?
Answers:
• /etc/selinux/conf.d
• /etc/selinux/conf/httpd.conf
• /etc/selinux/httpd.conf
• /etc/selinux/config
65. What is the output of the command "service httpd configtest" if no errors are found in Apache's configuration file?
Answers:
• Syntax OK
• configtest OK
• Config OK
• *.conf files OK
66. Which of the following Linux command can be used to output the shared library dependencies ?
Answers:
• libdd
• libd
• ld
• ldd
67. What will happen if AUTO INCREMENT field reaches its maximum value?
Answers:
• everything will start again from 0
• None of the above
• error message will appear
• everything will start again from 1
68. Which of the following is NOT a valid unix env variable?
Answers:
• HOST
• ARCH
• HOME
• USR
69. Which of the following Linux command outputs the processor architecture ?
Answers:
• procarch
• arch
• info
• proc
70. What output will be If you try to perform an arithmetic operation on a column containing NULL values?
Answers:
• None of the above
• An error will be generated
• Cannot be determined
• 0
71. Which of the following command can be used to shutdown an already running MySQL server?
Answers:
• ./mysqladmin -u root -p shutdown
• ./safe_mysqld -u root -p shutdown
• ./mysqladmin -u root -p kill
• ./mysqld -u root -p shutdown
72. Which of the following commands can be used for setting attributes on files/folders?
Answers:
• chattr
• setattr
• attr
• chmod
73. The default PHP session lifetime is…
Answers:
• 60 min
• 30 min
• 24 min
• there is no lifetime
74. Which of the following commands can be used to set stick bit on a file?
Answers:
• chmod 1455 file
• set 466 file
• chmod 1645 file
• chmod 2644 file
75. At login which of the following is first read by C shell?
Answers:
• Both .cshrc and .login
• .cshrc
• .profile
• .login
76. Which of the following commands will match commands with keyword(s) on their main pages?
Answers:
• whatis
• head
• apropos
• man
77. Which of the following holds environment variables used when starting Apache?
Answers:
• /etc/httpd/conf.d
• /etc/sysconfig/httpd
• /etc/httpd/conf.d/application.conf
• /etc/httpd/conf/httpd.conf
78. What is the maximum allowable length of MySQL datatype VARCHAR?
Answers:
• 2000
• 256
• There is no limit
• 1000
79. What is the precision limit for MySQL datatype DOUBLE?
Answers:
• 54
• 53
• 62

• 59

No comments:

Post a Comment