≡ Menu

OpenBSD 5.2 Web Server: Apache + MySql + PHP

OpenBSD is a great OS for hosting Apache/MySQL/PHP web apps. Because OpenBSD locks down Apache by default, and the version of PHP supplied by the OpenBSD team already has several security-enhancing patches in place.

Step 1: Set up the package manager

I’m using OpenBSD mirror at kartolo.sby.datautama.net.id for best speed in Indonesia.

Step 2: Installing Packages

1. Apache 2.2

2. PHP-MySql

Running the following command:

3. MySql Server

3. Setting MySql Instalation

4. Secure MySql Instalation

5. Installing phpMyAdmin

Running the following command:

Since Apache is locked away, it can’t talk to the database software, MySQL. The default install doesn’t automatically place MySQL inside Apache’s jail. Currently is impossible for the two to even communicate. You need to move the communication file: /var/run/mysql/mysql.sock

To make Apache happy we have to place this special file inside the jail. This can be done on startup using your handy rc.local file.

Put the following lines:

Step 3: Start OAMP services automatically

put the following lines:

Step 4: Reboot

Once everything is installed and configured to start automatically, reboot to make sure everything starts up as expected.

Step 5: Testing

Create phpinfo file:

Open phpinfo script:

phpInfo OpenBSD

Open phpMyadmin:

http://your-OpenBSD-ip-address/phpMyAdmin

phpmyadmin openbsd

Ref:
– http://www.h-i-r.net/p/hirs-secure-openbsd-apache-mysql-and.html
– http://www.openbsdsupport.org/e107_CMS.html

{ 7 comments }

How to Compress/Archive a Folder in Linux

To Compress a Folder in Linux you can running this command:

note:
-z: Compress archive using gzip program
-c: Create archive
-v: Verbose i.e display progress while creating archive
-f: Archive File name

To Exract an Arhive:

note:
-x: Extract files

{ 0 comments }

Centos 6 Remote Install Via VNC

centos logoIf you have a dedicate server that have installd CentOS 5/6 and you want to reinstall/reload it but you do not have iKVM/IPMI/IP KVM, you can check it out this tutorial how to install your server with CentOS Remote Install via VNC.

step 1: Determining network settings of the server

You need to know the network information of your server, to determine the network settings, you can use the following commands:

step 2: Loading Centos 6 64BIT Image

Step 3: Preparing the configuration and adding it to grub.conf

It is assumed that this configuration is the second item in the menu. You’ve specified that grub should make one attempt to load it. If something goes wrong, you’ll go back to the pre-set distribution after a restart, in 120 seconds.

Step 4: Reboot Server

Reboot the server and wait until it begins to respond to ping. Additional packages will take some time to load, then it will be possible to connect through VNC. If the network isn’t fast enough, it may take about 20-30 minutes.

Now connect to the server and do the same as on the local console: vncviewer 119.235.xxx.xxx:1
If you’re working from Windows, you can use TightVNC.

Happy ReInstall !

Ref: http://supportex.net/2011/06/install-centos-fedora-remotely/

{ 0 comments }

How to Create 10MB File in Linux

If you want to create 10mb file in your linux box, just running this command:

{ 0 comments }

Reset/change solusVM Admin password via ssh

If you have lost your admin password you can reset it via an SSH session on the master. Run the following command:

You will get an output similar to this:

That will be your newly created Admin Password

ref: http://wiki.solusvm.com/index.php/Generate_New_Admin_Password

{ 0 comments }

List of VPS OpenVZ Commands

Here are some of OpenVZ Command at Node VPS :

{ 0 comments }