Step by Step Linux Install
|
|
| Dennis Iversen |
| 22-Oct-2009 16:36:49 |
Dependencies
Please see the dependencies before you install the system. This is the long version of how to install the coscms system on your server. There is also an install script. This is the steps that the install scripts guide you through.
Clone the Master
git clone git://github.com/diversen/coscms.git
Now you have all the source you need. If you did not specify a clone directory then the source is located in coscms. Enter this directory:
cd coscms
If you want to be sure to get something fairly stable (and not the master) - then see the tags of the master by doing a:
git tag -l
You then select the largest tag or choose the master (which may or may not be more stable). E.g.:
git checkout 1.41
This will produce some git output like the following: "You are in 'detached HEAD' state." And some more. Don't take notice - it is OK. It is because it is not the master. If you have chosen the master then you will not get these warnings.
Apache2 Configuration
In your /etc/apache2/sites-available/yoursite.org, You need to set the document_root in apache to coscms/htdocs e.g.:
/home/yourname/www/coscms/htdocs
You can also use this command (which will only work on Debian based systems):
./coscli.sh apache2 --enable yoursite.net
This will try to create an apache2 virtual host with correct configuration, and enable name in the /etc/hosts file. This is good for development - because then you can just use sitenames like mytestsite or costest.
Create and edit config.ini file
You now need a configuration file. In the profiles/osnet dir you will need to copy the config.ini-dist file into the config dir. Like this or in an other way:
cp profiles/default/config.ini-dist config/config.ini
Edit config/config.ini to match your database url, username and password, host (in short: all database settings). Also match enabled servername (this is for testing which user runs the server, e.g. www-data). Other settings include session time (in secounds) and cookie time (in days), default timezone. Some of these settings can be overloaded by web modules, e.g. locales.
Create database
If your db user (specified in config/config.ini) can create databases you can create the database with the following command (please note that the database and all tables will be destroyed):
./coscli.sh db --load-db-default
If your database user can not create databases, you have to create a database before install, e.g. with the MySQL command line tool, or any other way and then execute the SQL found in
scripts/default.sql
Install Profile
A profile is basically a list of modules, templates, to install, some pre-defined configuration etc. We specify the default profile included in the distribution.
./coscli.sh install --install default
Now you will see that the command line will start to clone and install all module and template repos for this profile.
Add A Super User
Execute the following command which will create a super user for you:
./coscli.sh useradd --add
Create an email user, you should be able to login at the following address:
http://yoursite.net/account/login/index
