
OpenX was formerly OpenAds which was formerly PhpAdsNew which was formerly probably something else nobody can remember. Not too sure why they changed the name. Probably they were worried that the words “Open” and “Ads” (as in Advertisements) together project a kind of advertisement system which is open for everyone to see. Definitely not something someone who is interested in advertising on the Internet would want. Plus, OpenX sounds kind of mysterious. Or maybe the domain name “OpenX.org” was available? Who knows? Who cares? All that is important is that it is a great script which allows webmasters to effectively and efficiently serve advertisements on websites. Think of it as a advertisement (or banners) management system.
To setup OpenX, all you need is a webhost that supports Php and has MySQL database support. Most webhosts nowadays do have these features. If not, you can definitely do better by changing to another webhost. If I am not wrong, OpenX also supports PostgreSQL. However, this tutorial will not cover it. But the truth is, even setting up the PostgreSQL database is pretty straightforward. In fact, once you follow the following steps to setup OpenX, I am quite confident that you can install any other PHP based script available on the Internet without breaking a sweat. Scripts nowadays have become very user-friendly, which is good as it encourages more webmasters to go and understand more about the programming language.
Anyways, before I go off-topic again, I shall now start the tutorial. You will need some basic Webmaster and Windows knowledge to follow the tutorial. This is meant for beginners who have never installed OpenX before.

Your first step is to browse to OpenX’s website and download the latest version of the script. At the time of writing, the latest version was 2.6.0. You should always download the latest version as bugs and errors have to corrected over time by the developers. Download the zipped file and save it somewhere on your computer. Make sure you know where you have downloaded it to.

The next step is to extract the files in the zipped file out. You can use a third party software to do that. Or you can use Windows (WinXP and above) own extracting software to do it. I am using IZArc to extract out the files. It is a very stable and pretty user-friendly software to use.

Remember where you have extracted the files to. You will need to upload the files to your webserver and thus need to use an FTP Client to upload the files. For that to happen, you have to get the FTP username, password and hostname from your web host. However, there are some webhosts which uses a web-based interface for you to upload files to your server. In that case, you should refer to your webhost for more information on how to do it.

I am using Filezilla as my FTP Client. If you are using some other FTP Client, you should refer to the software’s documentation but the steps should be about the same. As you can see from the above image, I am creating a (sub)directory on my html directory. Basically, I don’t want my ad server to be exposed at the default directory and thus it makes sense to install your script in a subdirectory.

So I have created a subdirectory called “openx” where I will upload all the files to. Note that I am uploading the files to this subdirectory instead of the main directory.

Your next step is to upload your extracted files to your webserver. So if you are using Filezilla, choose all the files in the extracted folde, right click and choose Upload. There are some files which you actually don’t need to upload. Bascially they are the ones in Capital letters. However, in my case, I just upload all the files in the folder. It is not taking up a lot of space anyway.

It may take a while but soon enough, the files are all uploaded to your server. Isn’t life great?

Now start your browser and point it to your website. So for example, if your domain name is somebody.com, you should type in your browser the URL “http://www.somebody.com/openx”. Of course, if the subdirectory you have created in your server is something else other than “openx”, then you should change accordingly. You will be greeted with a webpage as above. Now click on Continue to well…err….continue.

On the next page, click on “I Agree” to continue.

On the next page, you will discover some errors (in red) which prevent you from continuing. These errors must be corrected first. You will need to change permissions for several folder, the”var” folder, the “var/cache” folder, the “var/plugins” folder, the “var/plugins/cache” folder, the “var/plugins/config” folder, the “var/templates_complied” folder and finally the “www/images” folder.
So the next step would be to go back to your FTP Client and change the permissions there.

So in your FTP Client, you can see the “var” folder. Right click and choose File attributes. If you are using some other FTP Client, they have similar methods to modify the privileges for the folders. Look for any options involving Chmod, attributes or privileges.

So, now let’s make the folder world-writable. Or some people call it chmod 777. So for the Owner permissions, group permissions and the public permissions, you should allow everything. Or just chmod the value “777″.

We would do the same for the cache folder inside the var directory. So right click on the cache folder and choose File attributes.

Yup, chmod 777. Same thing. You will have to do it for all the folders listed by the script.

Go to the plugins folder inside the var directory and do the same. It’s kind of tedious right? If only there was a way to automatically do it without much prompting.

Yes, again chmod 777.

Not enough? You still need to do it for the cache folder inside the “var/plugins” directory. Is there no end to this torture?

How many times do we have to see this screen? Make everything writable as above.

Well, now let’s do it for the config folder inside the “var/plugins” directory. Don’t you just love doing the same thing over and over again?

Nope, nothing new. Chmod 777.

You are not in luck. You still need to do it for the templates folder inside the “var” directory. Right click and click on File attributes.

Well, yet again, it’s chmod 777.

Yes, this is the last one! The final step is to change the permissions for the images folder under the “www” directory. My fingers are getting sore from repetitive clickings.

Hooray, do it one last time. Chmod 777 and you have completed the permissions portion! Sometimes all the hard work you have done plays off! Well not all the time though. Sometimes you just get stuck with a big fat headache.

Now let’s go back to our browser and scoll down all the way and click on Retry.
Yes, everything is done correctly! If you have any errors detected by the script, please go back and correct them. Now you should click on Continue. The next step requires you to know some information about your database. In this tutorial, we use MySQL database as our backend. If you have no idea how to create an MySQL database, please refer to my tutorials on creating a MySQL database using Cpanel or creating a MySQL Database using DirectAdmin.You will definitely need to get the username and password to access your web control panel. After you have created your database, you will be furnished with the database hostname, database name, username and password. You will need these information for the next step.

Ensure that for the database type, MySQL is chosen correctly. The hostname of your database is usally “localhost” and the port number is usually “3306″. Unless your webhost specifically tell you to change those settings, you should let them remain as default. For the Table names prefix, you can key in anything as long as it is unique in the database. If there is nobody else using the database, you can even leave it empty. Usually I keep it as default (ox_). There is no harm in having a prefix as in the future, you might have other scripts using the same database as well.

Looks like everything is okay, Click on Continue.

Unless you need to change them, you should use the default values. So if you would like the images folder to be placed somewhere else, you will need to edit the settings here. However, most users would not need to change them. Click on Continue.

It’s now time to create the administrator account. Please remember the username and password as you will need the information later to access your OpenX control panel to add your advertisers, your banners and so on.

Yes, happy days. Your OpenX installation is now complete! You are now free to login into your administrator console and start doing your “thang”. It wasn’t that difficult right? Finding advertisers and making money from them will be your next big step. I guess the tough part is after the installation.
Anyway if you find this guide useful, please leave a comment. And if you can afford it, please donate so that I can write more of such articles.

I read through it and the specific names of the files to change is helpful. I think that this would be really helpful to those that are not familiar with using ftp to change the permissions.
Thanks for putting this together.
Yes are welcome. Hope it really comes in useful.
This is a very detailed tutorial on OpenX. Thanks for taking the time to help us with the installation of this excellent ad script.
Great easy to follow Step by Step guide. Thank you very much, I had tried to get OpenX setup for days until I found your guide. Thanks again.
Wow, I appreciate your work. It took me very long time to understand how to install openX a year ago. I wish I found your blog =)
this tutorial is very useful to the starters who dont know much about the technology. thanks for this excellent tutorial.
A sincere request from me is that pls provide the step by step tutorial to install in linux also and i havent known how to use that filezilla.
Also provide some basic information on how to use openx. iam not knowing how to set campaings and banners and how to deploy my add in other website or atleast my website.
pls mail me to sudheergunturi@gmail.com for some helping informatin from you.
thanks you.
i have complete to install openx, but if i using “Working as Administrator account” and then accessing home i got this error message like this
Your home page is disabled
Your installation does not currently support SSL
To access the Home page, your ad server must be able to log on securely to our central system, using secure socket layer (SSL).
It is necessary to install a PHP extension to communicate with SSL, either openssl or SSL-enabled curl. For more information contact your system administrator.”
what the problem with my installation and how to fix this?
Ask your webhost to enable SSL for you.
It is really to useful But Can you please also write for Dashboard Error how can ui solve it and what is rpc conncection error
Very well described, its so easy to understand for an installation of openx for a common person. Pictures makes article so easy to understand. I really appriciate your efforts.