Author Archives: Andy

Securing default MySQL installation

Usually a MySQL installation will also create some default databases. In case they don’t exist you can create the default databases by running this: mysql_install_db Setting a MySQL root password The most important thing is to ensure that all root … Continue reading


MySQL commands – usually run from shell

Connecting to the server mysql -h localhost -u root The commands below asume the existance of the default databases. If this is not true take a look at securing a default MySQL installation. Selecting a specific MySQL database use database¬† … Continue reading


Installing PHP

In order to install PHP with MySQL support you first need to install mysql, mysql-lib, mysql-server and mysql-devel. Install instructions for MySql libs. Also you may need to install libxml2-devel in order to get xml2-config. yum install libxml2-devel Finally generate … Continue reading


Installing MySQL

In order to install MySQL you need to install these: mysql mysql-server mysql-lib mysql-devel yum install mysql mysql-lib mysql-server mysql-devel After php and php-mysql are installed you may start MySQL: /etc/init.d/mysqld start And you should get this: PLEASE REMEMBER TO … Continue reading


Apache IP based access

In order to use Apache to allow or deny access based on a specific IP you need mod_authz_host.

Hardware commands

Named-based virtual hosting

First you need to declare the IP used for virtual hosting with the NameVirtualHost directive: NameVirtualHost # ip above is just an example # the above directive specifies that requests for this IP must be further devised Second you … Continue reading


Main Apache Directives

The main Apache configuration directives The complete Apache directives list. Listen This directive sets the ip(s) and port on which the Apache server listens for connection. Listen: Instead of the actual IP must be used. Port 80 is … Continue reading


Apache structure

The /bin folder Contains various binarie: httpd This is the server binary itself apachectl This controlls the server (start, stop, restart) htpasswd This creates user data for Apache passworded directories. ab This is used for benchmarking apxs Apache extension tool: … Continue reading


Apache installation

Compile options Implicit options (DSO) ./configure –prefix=/install_path –enable-so –enable-mods-shared=all –enable-mods-shared=all This enables the installation of all available modules. –enable-so This enables modular support (DSO)



Query the local DNS server dig @localhost domain Reverse resolution query on local DNS server dig @localhost -x ip Query MX record from DNS server dig @ -t MX domain Query all records dig -t any domain